Open bcutter opened 1 year ago
Thanks for your report :+1:
FileSearchBackend.php
Guess we need to catch ValueError from getTimestamp (cf. https://github.com/php/php-src/blob/master/ext/date/tests/bug52062.phpt). Dunno if the request (to search something) then works properly.
RRuleIterator
Looks similar.
Please patch your local Nextcloud installation and let us and the sabre team know if that works for you.
Please patch your local Nextcloud installation and let us and the sabre team know if that works for you.
Thx for that quick reaction. Questions on that (answers on a user level please, no dev on this end here 😀):
Regarding 2: Before creating the issue I tried to reproduce the errors - but couldn't redo the actions e. g. in the NC app (one incident seems to be related to background jobs for calendar events). So I decided to report this anyway as there are a few incidents in the logs.
Best I could do as of now is patch the necessary files and have a look at the log in a few weeks (new incidents?) which is not very efficient unfortunately. I would prefer being able to provoke the errors.
I don't know how else this error appears, but I also have this error (or at least the same error message) in my log. Running ncp on a raspberry pi 2B. Please let me know if there is anything else I can help with. More info is in the log entry below.
{"reqId":"ZvlugwfmNQKJ_hOwpFnpAAAADBI","level":3,"time":"2024-09-29T15:13:07+00:00","remoteAddr":"redacted","user":"redacted","app":"webdav","method":"SEARCH","url":"/remote.php/dav","message":"Epoch doesn't fit in a PHP integer","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.5.5","version":"28.0.10.1","exception":{"Exception":"ValueError","Message":"Epoch doesn't fit in a PHP integer","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":444,"function":"getTimestamp","class":"DateTime","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":391,"function":"castValue","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"function":"transformSearchOperation","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":359,"function":"array_map"},{"function":"transformSearchOperation","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":359,"function":"array_map"},{"function":"transformSearchOperation","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":359,"function":"array_map"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":320,"function":"transformSearchOperation","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","line":163,"function":"transformQuery","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Files/LazySearchBackend.php","line":62,"function":"search","class":"OCA\\DAV\\Files\\FileSearchBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/icewind/searchdav/src/DAV/SearchHandler.php","line":82,"function":"search","class":"OCA\\DAV\\Files\\LazySearchBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/icewind/searchdav/src/DAV/SearchPlugin.php","line":119,"function":"handleSearchRequest","class":"SearchDAV\\DAV\\SearchHandler","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"searchHandler","class":"SearchDAV\\DAV\\SearchPlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":380,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Files/FileSearchBackend.php","Line":444,"message":"Epoch doesn't fit in a PHP integer","exception":[],"CustomMessage":"Epoch doesn't fit in a PHP integer"},"id":"66fadf948f360"}
could that be the reason?
"On a 32bit OS, PHP uses 4 bytes (of 8 bit) to define an integer. On a 64 bit system, PHP uses 8 bytes (of 8 bit) to define an integer and thus allows it to store a far langer range of numbers. given you script doesn't need the etra 32 bits provided on a 64 bit system."
I run my nc on 32bit userspace - will upgrade it next year or in the christmas holidays. I'm somehow quite confident that it will solve the issue.
could someone confirm please? thanks!
⚠️ This issue respects the following points: ⚠️
Bug description
NOTE I'M RUNNING ON A 32 BIT OS (but I had to tick
Nextcloud Server is running on 64bit capable CPU, PHP and OS. *
to file this issue - and as NC v25 is still supporting 32 bit, that should make no difference until NC 26/October 2023)Encouraged by https://github.com/nextcloud/server/issues/34010#issuecomment-1358987042 and following up on https://github.com/nextcloud/server/issues/34010#issuecomment-1358527693 I'd like to report:
After applying the two 32 bit related changes (see linked issue), in nextcloud.log there sometimes (to be precise: quite rarely) is a
Epoch doesn't fit in a PHP integer
error.Here's the full log searched for that error. Note it also includes entries from before applying https://github.com/nextcloud/server/issues/34010#issuecomment-1358527693 (2022-12-19 23:52 local time): (see logs section below)
Steps to reproduce
Expected behavior
No log errors.
Installation method
Community Manual installation with Archive
Operating system
Other
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
Additional info
https://github.com/nextcloud/server/issues/34010#issuecomment-1358527693