Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when using S3: fclose() supplied resource is not a valid stream resource #1558

Closed
st3iny opened this issue May 26, 2021 · 6 comments
Closed
Labels

Comments

@st3iny
Copy link
Member

st3iny commented May 26, 2021

Describe the bug
The bookmark app produces the same error over and over again. This might be related to nextcloud/server#23373 and may be fixed easily by something like nextcloud/server#26072. I'm using s3 as primary storage.

To Reproduce
I can't provide a reliable way to reproduce this error. It does not seem to break anything and happens every other hour. I observed it during the last few months but can't point to a specific starting date.

Expected behaviour
There shouldn't be an error in the log if nothing breaks.

Screenshots
Bildschirmfoto von 2021-05-26 17-59-40

Desktop:
Not relevant

Server:

  • OS: Ubuntu 20.04
  • HTTP server: nginx
  • PHP version: 7.4
  • Nextcloud version: 21.0.2
  • Bookmarks app version: 4.2.1
  • S3 as primary storage

Nextcloud log

{
    "reqId":"tkuxsntiSFUZX8IQ3Ls9",
    "level":3,
    "time":"2021-05-26T09:55:26+00:00",
    "remoteAddr":"84.58.68.34",
    "user":"richard",
    "app":"PHP",
    "method":"PUT",
    "url":"/remote.php/dav/files/richard/Configs/bin/charge",
    "message":{
        "Exception":"Error",
        "Message":"fclose(): supplied resource is not a valid stream resource at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#96",
        "Code":0,
        "Trace":[
            {
                "function":"onError",
                "class":"OC\\Log\\ErrorHandler",
                "type":"::"
            },
            {
                "file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php",
                "line":96,
                "function":"fclose"
            },
            {
                "file":"/var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php",
                "line":117,
                "function":"stream_close",
                "class":"Icewind\\Streams\\Wrapper",
                "type":"->"
            },
            {
                "function":"stream_close",
                "class":"Icewind\\Streams\\CallbackWrapper",
                "type":"->"
            },
            {
                "file":"/var/www/nextcloud/custom_apps/bookmarks/vendor/guzzlehttp/psr7/src/Stream.php",
                "line":108,
                "function":"fclose"
            },
            {
                "file":"/var/www/nextcloud/custom_apps/bookmarks/vendor/guzzlehttp/psr7/src/Stream.php",
                "line":74,
                "function":"close",
                "class":"GuzzleHttp\\Psr7\\Stream",
                "type":"->"
            },
            {
                "function":"__destruct",
                "class":"GuzzleHttp\\Psr7\\Stream",
                "type":"->"
            }
        ],
        "File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
        "Line":92,
        "CustomMessage":"--"
    },
    "userAgent":"Mozilla/5.0 (Linux) mirall/3.2.1-20210429.171749.5901a0f98-1.0~groovy1 (Nextcloud, pop-5.11.0-7614-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)",
    "version":"21.0.2.1",
    "id":"60ae6f06efb68"
}
@st3iny st3iny added the bug label May 26, 2021
@devadattas
Copy link

I also get the exact same issue since last NC Upgrade. Any hints on how to solve this?

@marcelklehr
Copy link
Member

Mmh, weird. I'll investigate. If nextcloud/server#26072 had helped you wouldn't experience this anymore with v21.0.2, though, as that release has the fix already.

@hahagu
Copy link

hahagu commented Jul 2, 2021

Also having the same issue on my instance as well!
However, it isn't bookmarks.

Error: fclose(): supplied resource is not a valid stream resource at 
[Instance Directory]/3rdparty/icewind/streams/src/Wrapper.php#96<<closure>>OC\Log\ErrorHandler::onError()

[Instance Directory]/3rdparty/icewind/streams/src/Wrapper.php 
- line 96:fclose()

[Instance Directory]/3rdparty/icewind/streams/src/CallbackWrapper.php 
- line 117:Icewind\Streams\Wrapper->stream_close()<<closure>>Icewind\Streams\CallbackWrapper->stream_close()

[Instance Directory]/3rdparty/guzzlehttp/psr7/src/Stream.php 
- line 108:fclose()

[Instance Directory]/3rdparty/guzzlehttp/psr7/src/Stream.php 
- line 74:GuzzleHttp\Psr7\Stream->close()<<closure>>GuzzleHttp\Psr7\Stream->__destruct()

@marcelklehr
Copy link
Member

@icewind1991 Any idea about how to fix this?

@icewind1991
Copy link
Member

should be fixed with nextcloud/server#26701

@marcelklehr
Copy link
Member

Should be fixed with Nextcloud 22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

5 participants