nextcloud / nextcloud/richdocuments
Exception":"Error","Message":"Call to a member function xpath() on bool
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 453
- Forks
- 147
- Avg merge
- 14h 54m
- Merged PRs (30d)
- 83
Description
Describe the bug
When opening an ODS file, there's a spinning circle and eventually a timeout occurs.
To Reproduce
Steps to reproduce the behavior:
- Create an ODS file offline
- Let the server sync
- Try to open it using the web UI
- See error
Expected behavior
Spreadsheet should open w/o issues
Screenshots
Client details:
- OS: Reproducible on Ubuntu 24.04 and OSX 14.6.1
- Browser: Opera 112.0.5197.53 and Firefox 129
Server details
Operating system: Debian Bookworm
Web server: Apache 2.4.61-1~deb12u1
Database: Postgresql 15.8-0+deb12u1
PHP version: 8.2.20-1~deb12u1
Nextcloud version: 29.0.4
Version of the richdocuments app 8.4.4
Version of Collabora Online How do I verify this?
Configuration of the richdocuments app
{
"apps": {
"richdocuments": {
"disable_certificate_verification": "yes",
"public_wopi_url": "https:\/\/linuxinlaws.eu\/nextcloud\/apps\/richdocumentscode\/proxy.php?req=",
"installed_version": "8.4.4",
"enabled": "yes",
"types": "prevent_group_restriction",
"wopi_url": "http:\/\/linuxinlaws.eu\/apps\/richdocumentscode\/proxy.php?req="
}
}
}
Nextcloud log (data/nextcloud.log)
{"reqId":"HX3d8psLdlyu4oHdJldw","level":3,"time":"2024-08-10T06:42:47+00:00","remoteAddr":"79.219.166.209","user":"<user>","app":"index","method":"POST","url":"/nextcloud/index.php/apps/richdocuments/token","message":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 56","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0","version":"29.0.4.1","exception":{"Exception":"Exception","Message":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 56","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"Error","Message":"Call to a member function xpath() on bool","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","line":39,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/TokenManager.php","line":326,"function":"getUrlSrcValue","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php","line":389,"function":"getUrlSrc","class":"OCA\\Richdocuments\\TokenManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"token","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","Line":56},"message":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 56","exception":{},"CustomMessage":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 56"}}<user>
More than happy to provide additional input if required.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the ODS opening flow and inspect apps/richdocuments/lib/WOPI/Parser.php around lines 39 and 56, where the xpath() failure is reported. Trace the call through TokenManager.php and DocumentController.php, then verify that the token request succeeds and the ODS file opens without timing out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100