Operating system: Debian 8
Web server: Apache 2.4
Database: mysql 5.5.49-0+deb8u1
PHP version: 7.02
Nextcloud version: 10 / 9.1.0.16 - was also in 9.0.53
Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/htdocs/lib/private/Files/Filesystem.php:773 Stack trace: #0 /var/www/htdocs/lib/private/Files/View.php(2034): OC\Files\Filesystem::normalizePath('/MaT/files/Musi...') #1 /var/www/htdocs/lib/private/Files/View.php(1152): OC\Files\View->unlockFile('/Music - World/...', 1) #2 [internal function]: OC\Files\View->OC\Files\{closure}() #3 /var/www/htdocs/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #5 {main} thrown at /var/www/htdocs/lib/private/Files/Filesystem.php#773
This happens with the audioplayer app from Rello -> https://github.com/Rello/audioplayer
He told me it is an core related issue and not with the app - he cannot resolve it
I found the issue now also when i click normal songs in folders switch from one to the other by short click
in OC is the same issue - owncloud/core#22370
i think they find a way to reproduce it/find more info about
i hope this can help NC too to resolve this issue
cc @icewind1991
Encountering the same issue without any additional apps, only the files app and the Windows client. The file is shared by [user]
to [another user]
.
Sep 01 17:51:39 Nextcloud[54349]: {PHP} fopen(/var/storage/nextcloud/[user]/files/[path]): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/files/storage/local.php#261
Sep 01 17:51:39 Nextcloud[54349]: {webdav} Exception: {"Message":"HTTP\/1.1 503 Could not open file","Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(83): OCA\\DAV\\Connector\\Sabre\\File->get()\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#4 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(55): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/nextcloud\/remote.php(138): require_once('\/var\/www\/nextcl...')\n#7 {main}","File":"\/var\/www\/nextcloud\/apps\/dav\/lib\/connector\/sabre\/file.php","Line":306,"User":"[another_user]"}
Sep 01 17:51:39 Nextcloud[50767]: {PHP} fopen(/var/storage/nextcloud/[user]/files/[path]): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/files/storage/local.php#261
Sep 01 17:51:39 Nextcloud[50767]: {webdav} Exception: {"Message":"HTTP\/1.1 503 Could not open file","Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(83): OCA\\DAV\\Connector\\Sabre\\File->get()\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#4 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(55): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/nextcloud\/remote.php(138): require_once('\/var\/www\/nextcl...')\n#7 {main}","File":"\/var\/www\/nextcloud\/apps\/dav\/lib\/connector\/sabre\/file.php","Line":306,"User":"[another_user]"}
Sep 01 17:51:47 php-fpm7.0[52286]: ool www[52286]: {PHP} Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/files/filesystem.php:798
It seems a bit strange that there seem to be so many PIDs reporting the problem with the first message being repeated.
More details on this issue: it looks like the server is trying to access a file that is supposed to be in the data folder of the share owner but somehow (in the filesystem) wound up in the data folders of one of the users the folder is shared with. Then, when trying to read the file from the filesystem it crashes with the above error. The database looks correct but the files in the data folder are all in different directories from where they are supposed to be.
Is there any way to easily find out which files are affected and move them back to the share owners data directory? Any information I could provide to help debugging this?
Here is what I think happened (as relevant for the server): due to user problem or a client bug, some shared folders were deleted. Afterwards we restored the folders using the trashbin view. Apparently the files were not restored into the data directory of the share owner but into the data directory of the share recipient.
Not sure if that makes sense to you, but, as I mentioned, feel free to ask me for further information if it can help you to debug it.
I also found this in our logs:
Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in lib/private/Files/Filesystem.php:773
Stack trace:
#0 lib/private/Files/View.php(2034): OC\\Files\\Filesystem::normalizePath('/icewind/files/...')
#1 lib/private/Files/View.php(1152): OC\\Files\\View->unlockFile('/Photos/San Fra...', 1)
#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()
#3 3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))
#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()
#5 {main}
thrown at lib/private/Files/Filesystem.php#773
This was a PROPFIND against remote.php/webdav by @rullzer
It also only happened once in the past 30 days. Looks like a race condition 馃槩
Afaik this is a race condition in php's garbage collection on scrim exit, if we have a CallbackWrapper
stream that is garbage collected after Filesystem::$normalizedPathCache
has been gc'd
The solution to this is making sure we close streams before exiting the script, this used to be fairly consistent with webdav but was fixed by closing the output stream in sabre/dav
@icewind1991 Please check out the issue at owncloud. There are some reproduction steps.
Ping @icewind1991
I encountered the same problem while copying files to nextcloud via the builtin webdav-client in Mac OS Sierra. It was a batch of 300 pictures and it slowed down the process tremendously. Seems like it happened on almost every file.
Maybe you can find anything useful in there.
This is from nextcloud.log
Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in \/var\/www\/nextcloud\/lib\/private\/Files\/Filesystem.php:773\nStack trace:\n#0 \/var\/www\/nextcloud\/lib\/private\/Files\/View.php(2034): OC\\Files\\Filesystem::normalizePath('\/jonathan\/files...')\n#1 \/var\/www\/nextcloud\/lib\/private\/Files\/View.php(1152): OC\\Files\\View->unlockFile('\/Photos\/Fotos2b...', 1)\n#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()\n#3 \/var\/www\/nextcloud\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#5 {main}\n thrown at \/var\/www\/nextcloud\/lib\/private\/Files\/Filesystem.php#773","level":3,"time":"2016-11-08T14:40:29+00:00","method":"PUT","url":"\/remote.php\/webdav\/Photos\/Fotos2b\/02%20Wandertag\/Besuch%20bei%20Josef%20(21).JPG","user":"jonathan"}
And from Apache:
[Tue Nov 08 16:04:39.766925 2016] [:error] [pid 1611] [client 192.168.1.2:50756] PHP Fatal error: Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:773\nStack trace:\n#0 /var/www/nextcloud/lib/private/Files/View.php(2034): OC\\Files\\Filesystem::normalizePath('/jonathan/files...')\n#1 /var/www/nextcloud/lib/private/Files/View.php(1152): OC\\Files\\View->unlockFile('/Photos/Fotos2b...', 1)\n#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()\n#3 /var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#5 {main}\n thrown in /var/www/nextcloud/lib/private/Files/Filesystem.php on line 773
I have the same problem here.
Files cannot be downloaded via IE 9. Firefox and Chrome are working as expected (on desktop)
Nextcloud version: 10.0.1
Two instances have the same behavior
PHP version: PHP 7 (7.0.12-1)
Apache error log:
nextcloud.log
{"reqId":"\/CVc\/qCRcgykbjeE8J8k","remoteAddr":"127.0.0.1","app":"PHP","message":"Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in \/opt\/nextcloud-share\/public\/lib\/private\/Files\/Filesystem.php:776\nStack trace:\n#0 \/opt\/nextcloud-share\/public\/lib\/private\/Files\/View.php(2034): OC\\Files\\Filesystem::normalizePath('\/marcel\/files\/t...')\n#1 \/opt\/nextcloud-share\/public\/lib\/private\/Files\/View.php(1152): OC\\Files\\View->unlockFile('\/test-share2\/Ne...', 1)\n#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()\n#3 \/opt\/nextcloud-share\/public\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#5 {main}\n thrown at \/opt\/nextcloud-share\/public\/lib\/private\/Files\/Filesystem.php#776","level":3,"time":"2016-11-30T10:36:00+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"marcel","version":"9.1.1.5"}
Both given logs are from the instance installed via git
Would be very happy if somebody can fix this. I have several users which are restricted to use IE9
Hi, i noticed that i have the same messages in Logfile with Nextcloud 11:
Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:806 Stack trace: #0 /var/www/nextcloud/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath('/thorsten.hense...') #1 /var/www/nextcloud/lib/private/Files/View.php(1156): OC\Files\View->unlockFile('/Snowboard.mkv', 1) #2 [internal function]: OC\Files\View->OC\Files\{closure}() #3 /var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #5 {main} thrown at /var/www/nextcloud/lib/private/Files/Filesystem.php#806 2016-12-19T06:18:57+0100
Operating system: CentOS 7
Web server: Apache 2.4.6
Database: Ver 15.1 Distrib 5.5.52-MariaDB
PHP version: PHP 7.0.14
Nextcloud version: 11
The File in the error message is shared by me with other users and the error message came up in NC 11 log file when these users access NC11 with the Nextcloud-Sync Clients.
I saw this same problem when copying a large number of files via gvfs with webdavs. About 1k of the files transferred correctly, but once it his this error about 5 times the connection locked until i killed the gvfs process.
Just to confirm this as well:
Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:806
Stack trace:
#0 /var/www/nextcloud/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath('/[email protected]...')
#1 /var/www/nextcloud/lib/private/Files/View.php(1156): OC\Files\View->unlockFile('/_VMs/Nextcloud...', 1)
#2 [internal function]: OC\Files\View->OC\Files\{closure}()
#3 /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))
#4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close()
#5 {main} thrown at /var/www/nextcloud/lib/private/Files/Filesystem.php#806
There have been some debugging here: https://github.com/owncloud/core/issues/22370 And @PVince81 created some PRs to fix this:
https://github.com/owncloud/core/pull/26775
https://github.com/icewind1991/Streams/pull/5
https://github.com/owncloud/core/pull/26762
Nextcloud 11
Ubuntu Server 16.04
Apache 2.4
MySQL 5.7
And another one
Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/minion/ovin-11.0.0.9/lib/private/Files/Filesystem.php:806
Stack trace:
#0 /var/www/minion/ovin-11.0.0.9/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath('/arthur/files/P...')
#1 /var/www/minion/ovin-11.0.0.9/lib/private/Files/View.php(1156): OC\Files\View->unlockFile('/Public/release...', 1)
#2 [internal function]: OC\Files\View->OC\Files\{closure}()
#3 /var/www/minion/ovin-11.0.0.9/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))
#4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close()
#5 {main}
thrown at /var/www/minion/ovin-11.0.0.9/lib/private/Files/Filesystem.php#806
Ping @icewind1991
@icewind1991 Didn't you mention that you have an idea what this could cause?
I have the same issue. I'm wondering if it somehow is connected to using php7?
ownCloud solved it it seems: https://github.com/owncloud/core/issues/22370#issuecomment-273442712
That sounds great! :)
That means updating icewind/streams to 0.5.2 and then apply https://github.com/owncloud/core/pull/26775
@icewind1991 Can you check this out please?
Fix is in #3160
Will this fix work for version 11.0.1?
@ryannix123 tried 11.0.1, still have the error in my logs.
It will land in 11.0.2 earliest
Fix is in #3160
Merged -> will be in 12.0. Let's see if we want to backport this. cc @karlitschek
Please backport! :)
yes. please backport
Error still present in 11.0.2.
Not backported yet. :(
It's backported: https://github.com/nextcloud/server/pull/3293
Sorry if this is a dumb question but I can't figure out how to download a backported version of 11.0.2
I'd like to get more involved in testing patches like this. Is there an easy way to download the individual files that were changed or do I get the whole package somewhere?
@Steve8291 This will be released in 11.0.3, and if you want the changes right now you have to change the files as it's changed here: https://github.com/nextcloud/server/pull/3293/files or apply a patch with git.
@Steve8291 You can also use Nextcloud daily packages (the script targets the stable branch). I've tried and now Nextant works. :)
@Steve8291 You can also use Nextcloud daily packages (the script targets the stable branch). I've tried and now Nextant works. :)
Used that and I get still the same error.
All changes from the pull request seem to be there.
Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:806 Stack trace: #0 /var/www/nextcloud/lib/private/Files/View.php(2018): OC\Files\Filesystem::normalizePath('/me/files/and...') #1 /var/www/nextcloud/lib/private/Files/View.php(1156): OC\Files\View->unlockFile('/android/cracke...', 1) #2 [internal function]: OC\Files\View->OC\Files\{closure}() #3 /var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #5 {main} thrown at /var/www/nextcloud/lib/private/Files/Filesystem.php#806
Still in 11.0.3 @icewind1991 :(
{"reqId":"ohJj0U04682MubsHahot","remoteAddr":"93.244.11.162","app":"PHP","message":"Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in \/var\/www\/nextcloud\/lib\/private\/Files\/Filesystem.php:806\nStack trace:\n#0 \/var\/www\/nextcloud\/lib\/private\/Files\/View.php(2018): OC\\Files\\Filesystem::normalizePath('\/[email protected]...')\n#1 \/var\/www\/nextcloud\/lib\/private\/Files\/View.php(1156): OC\\Files\\View->unlockFile('\/_VMs\/Nextcloud...', 1)\n#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()\n#3 \/var\/www\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#5 {main}\n thrown at \/var\/www\/nextcloud\/lib\/private\/Files\/Filesystem.php#806","level":3,"time":"2017-04-24T21:44:07+02:00","method":"GET","url":"\/\/ocs-provider\/","user":"--","version":"11.0.3.2"}
@enoch85
Hi, I saw the method in https://github.com/owncloud/core/issues/22370#issuecomment-273442712
(you commented on 18 Jan)
Fixes were merged and backported, closing.
For stable9.1 it was these two PRs:
update icewind/streams lib: owncloud/3rdparty#284
prevent fclose to be skipped when PHP connection lost: https://github.com/owncloud/core/pull/26939
I found that in 11.0.3, icewind/streams lib has been updated but doesn't do the second step.
And I fixed the problem after do the second step. :)
cc @icewind1991
@yp05327 Thanks! Will patch it. To bad that was missed in the merge for Nextcloud. :/
Just to confirm, adding https://github.com/owncloud/core/pull/26939 solved it, finally no more spamming!
4491
Backport to stable11 was merged - will be released as 11.0.4
Manually applied the patch yesterday and can't find any error _yet_.
Most helpful comment
ownCloud solved it it seems: https://github.com/owncloud/core/issues/22370#issuecomment-273442712