richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

Collabora does not start when Nextcloud's Plus menu is used

Open scroom opened this issue 4 years ago • 9 comments

Describe the bug if, for example, a new presentation is to be created via the Plus menu of Nextcloud, Collabora Online does not load. However, if files are clicked, Collabora loads directly.

To Reproduce Steps to reproduce the behavior:

  1. click on Nextclouds plus menu
  2. enter a name and press enter
  3. Nextcloud tries to load Collabora and fails

Expected behavior Collabora should be started

Client details:

  • OS: Ubuntu but doesn't matter
  • Browser: Firefox
  • Version: 91.0.2
  • Device: [desktop

Server details

Operating system: Ubuntu 20.04

Web server: Nginx

Database: MySQL

PHP version: 7.4

Nextcloud version: 21.0.4

Version of the richdocuments app4.2.2

Version of Collabora Online 6.2

Logs

Nextcloud log (data/nextcloud.log)

{"reqId":"30dAWucNJxJ0rTijNQz0","level":3,"time":"2021-08-29T18:33:49+00:00","remoteAddr":"*.*.*.*","user":"username","app":"PHP","method":"GET","url":"/apps/richdocuments/index?fileId=%7BfileId%7D&requesttoken=4cvVtGoZ41hrR3E4%2Bz3lG9Q3DrYICycR1KU0MJWvitw%3D%3A2aav%2ByhrhBsfBTBAkH%2BMdq0DP%2BQ8e0s6gc5cd9v9xqQ%3D","message":{"Exception":"Error","Message":"Undefined offset: 0 at /var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php#208","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php","line":208,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"index","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","version":"21.0.4.1","id":"612bd40b76e87"}

{"reqId":"30dAWucNJxJ0rTijNQz0","level":3,"time":"2021-08-29T18:33:49+00:00","remoteAddr":"*.*.*.*","user":"username","app":"richdocuments","method":"GET","url":"/apps/richdocuments/index?fileId=%7BfileId%7D&requesttoken=4cvVtGoZ41hrR3E4%2Bz3lG9Q3DrYICycR1KU0MJWvitw%3D%3A2aav%2ByhrhBsfBTBAkH%2BMdq0DP%2BQ8e0s6gc5cd9v9xqQ%3D","message":{"Exception":"Exception","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"index","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php","Line":212,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","version":"21.0.4.1","id":"612bd40b76e4b"}

scroom avatar Aug 30 '21 18:08 scroom

If you open your nextcloud data/appdata_<random string>/richdocuments/empty_templates directory with eg. www-data user, do you see the default template files there? (document.ott / presentation.otp / spreadsheet.ots)

If for some reason they are not there (I cannot imagine why), it might be worth running the command occ richdocuments:update-empty-templates.

Am I correct assuming you have not added new templates after installation? (this can be done in Nextcloud settings, under Collabora Online, under Global templates)

thebearon avatar Aug 30 '21 21:08 thebearon

The empty templates are there. In fact, the files get created but then Collabora doesn't load.

I haven't added any templates up to now.

scroom avatar Aug 30 '21 21:08 scroom

Just tested. Creating a document via the Plus menu on the Nextcloud iPad-App does work and Collabora is loading properly.

scroom avatar Aug 30 '21 21:08 scroom

To be clear, when you report "Collabora Online does not load," does that mean its UI doesn't even appear, and an error message is shown within Nextcloud, or it fails with an error message in Collabora Online?

thebearon avatar Sep 01 '21 16:09 thebearon

The UI doesn't appear and I get an error message. Bildschirmfoto vom 2021-09-01 20-59-04

Today I've tried it on a windows client with Chrome as browser and it did work. But on Ubuntu with Firefox as browser Collabora isn't laoding.

scroom avatar Sep 01 '21 19:09 scroom

Here comes the output of the Browser Console. firefox.txt

scroom avatar Sep 02 '21 08:09 scroom

Could you check if the issue still exists with the latest richdocuments release?

juliusknorr avatar Oct 05 '21 12:10 juliusknorr

Just tested. Issue still exists under Nextcloud 21.0.5 and latest release of richdocuments.

scroom avatar Oct 16 '21 22:10 scroom

Same problem here for Text documents on nextcloud 22.2.3 with latest collabora/CODE and richdocuments 4.2.3. Default template files are there and readable for www-user. Clicking plus and giving the text document a name results in a hang for a few seconds and then the aforementioned error message appears. After that you can see that the empty text document has been created in nextcloud but collabora was not loaded correctly. Clicking the empty document now, loads collabora as expected.

mhoffmann75 avatar Jan 26 '22 15:01 mhoffmann75

This should be fixed now and end to end tests are passing fine for this on all supported branches. I'll close this but please don't hesitate to reopen if this is still an issue.

juliusknorr avatar Nov 08 '23 22:11 juliusknorr