nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
350 stars 115 forks source link

Exception":"Error","Message":"Call to a member function xpath() on bool #3895

Open monochromec opened 1 month ago

monochromec commented 1 month ago

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:

  1. Create an ODS file offline
  2. Let the server sync
  3. Try to open it using the web UI
  4. See error

Expected behavior Spreadsheet should open w/o issues

Screenshots

Client details:

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.

matrixes commented 3 weeks ago

I'm experiencing the same issue when loading spreadsheets in Collabora (Nextcloud Office) version collabora/code:24.04.6.1.1

juliushaertl commented 3 weeks ago

Can you run a curl request on your Nextcloud server manually to see if the response is a proper XML response from Collabora?


curl -v https://linuxinlaws.eu/nextcloud/apps/richdocumentscode/proxy.php?req=/hosting/discovery
ReneBoehm commented 1 week ago

same issue here, after upgrading to nextcloud 29.0.5 (docker) today. The version of richdocuments is 8.4.5.

ndj888 commented 1 week ago

same issue here {"reqId":"ZpLUDPmTjLA6Hnu6LmTZ","level":3,"time":"2024-09-01T07:58:48+00:00","remoteAddr":"124.43.77.73","user":"longbob","app":"index","method":"POST","url":"/apps/richdocuments/token","message":"Call to a member function xpath() on bool in file '/var/www/html/custom_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/128.0.0.0 Safari/537.36","version":"29.0.4.1","exception":{"Exception":"Exception","Message":"Call to a member function xpath() on bool in file '/var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php' line 56","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Richdocuments\\Controller\\DocumentController"],"token"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\DocumentController","token",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["richdocuments.document.token"]]},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/token"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/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/html/custom_apps/richdocuments/lib/WOPI/Parser.php","line":39,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->","args":["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},{"file":"/var/www/html/custom_apps/richdocuments/lib/TokenManager.php","line":326,"function":"getUrlSrcValue","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->","args":["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},{"file":"/var/www/html/custom_apps/richdocuments/lib/Controller/DocumentController.php","line":408,"function":"getUrlSrc","class":"OCA\\Richdocuments\\TokenManager","type":"->","args":[["OC\\Files\\Node\\File"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"token","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->","args":[485949,null,null,null]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Richdocuments\\Controller\\DocumentController"],"token"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Richdocuments\\Controller\\DocumentController"],"token"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\DocumentController","token",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["richdocuments.document.token"]]},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/token"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php","Line":56},"message":"Call to a member function xpath() on bool in file '/var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php' line 56","exception":{},"CustomMessage":"Call to a member function xpath() on bool in file '/var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php' line 56"}}

fregux commented 1 day ago

Hi,

I had the same issue, I've updated the add "Community Document Server" to v 0.1.18 and have to re-enable this app, then it works again.

Hope it helps! Regards