Nextcloud version: 19.0.1
Logging tab is full of:
Error | PHP | XMLReader::read(): Load Data before trying to read at /var/www/nextcloud/3rdparty/sabre/xml/lib/Reader.php#63
-- | -- | --
I have exactly the same problem.
have the same on 19.0.2 full
I had the same issue with 19.0.1.
When i looked at the whole error message, it looks like that it was related to an external storage i've added recentrly:
[PHP] Error: XMLReader::read(): Load Data before trying to read at /var/www/html/3rdparty/sabre/xml/lib/Reader.php#63
GET /index.php/apps/files_external/userstorages/3?testOnly=false
from 10.42.6.0 by pd at 2020-08-28T18:11:33+00:00
After removing the external storage, the error was gone.
I’m not so lucky, mine gives the following error:
{"reqId":"123abc","level":3,"time":"2020-08-28T21:14:24+00:00","remoteAddr":"x.x.x.x","user":"xyz","app":"PHP","method":"SEARCH","url":"/nextcloud/remote.php/dav","message":"XMLReader::read(): Load Data before trying to read at /var/www/html/nextcloud/3rdparty/sabre/xml/lib/Reader.php#63","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.4","version":"19.0.1.1"}`
same problem here : 10 times per second I had this error :
{"reqId":"XXXXXX","level":3,"time":"2020-09-12T20:41:49+00:00","remoteAddr":"109.xx.xx.xx","user":"XXXX","app":"PHP","method":"SEARCH","url":"/remote.php/dav","message":"XMLReader::read(): Load Data before trying to read at /var/www/MYNEXTCLOUD.TLD/3rdparty/sabre/xml/lib/Reader.php#63","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.6","version":"19.0.2.2"}
I revoked the security TOKEN for my iOS app... and the error vanished ... for now !
I could solve it too, it was always the same user and the same IP-Address for weeks. Since IPs change I figured it was probably some request that got stuck in a loop or something and deleted the user. That solved the problem.
same problem here. The logfile easily eats up my 6TB hard drive after a few weeks.
As far as I understand this happens when \XMLReader::read is called. The Sabre dav handles the returned false as error condition but apparently the method throws an \Error. In Nextcloud 19 the Sabre lib was updated. Previous versions called @$this->read (suppressing errors) and now it just uses $this->read.
Possibly related in some way is the error reporting changes in 19: https://github.com/nextcloud/server/pull/19867. What do you all have error reporting set to via your php.ini?
Oh and somehow this traces back to the ancient bug report https://bugs.php.net/bug.php?id=64230. It shows closed, but looks like that was either never addressed or is a regression. The linked commit doesn't exist either …
So one thing to try would be if changing 3rdparty/sabre/xml/lib/Reader.php:63 from if (!$this->read()) { to if (!@$this->read()) { helps.
Found it! sabre/[email protected] contained a regression that was fixed with 2.2.1 and later (https://github.com/sabre-io/xml/pull/183). I'll prepare a PR.
PR for 19 is at https://github.com/nextcloud/server/pull/24306. Please help review and test :v:
Most helpful comment
PR is at https://github.com/nextcloud/server/pull/24251 and https://github.com/nextcloud/3rdparty/pull/527.