Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only download dialog appears #2027

Closed
SimeonEhrig opened this issue Feb 7, 2022 · 14 comments
Closed

Only download dialog appears #2027

SimeonEhrig opened this issue Feb 7, 2022 · 14 comments

Comments

@SimeonEhrig
Copy link

Describe the bug

When I click on a file with the extension ods, odt or ods, only the download dialog appears. No Collabora window is opened.

The collabora should work, because it is used by a second nextcloud instance.

Expected behavior
A collabora window should open.

Client details:

  • OS: Linux Mint 20.3
  • Browser Firefox 96.0.3, Chromium 97.0
  • Device: desktop

Server details

The Nextcloud instance was restored from a backup. I used a copy of the user data folder, a database dump (dump.mysql) file and a nextcloud docker container. After restoring the database from the dump, nextcloud setup itself and installed all apps automatically.

Operating system: openmediavault 5.6.24-1

Web server: nginx

Database: mysql 10.5

PHP version: 8.0

Nextcloud version: 23.0.0

Version of the richdocuments app 5.0.1

Version of Collabora Online

tested solution

  • reinstall richdocuments via web interface
  • reinstall richdocuments via terminal
  • use test server
  • set mime type manually (not sure, if I did it correctly)
  • tried to create link to open document: https://domain.com:9443/index.php/apps/files/?dir=/Documents&fileid=9
@adelphi-company
Copy link

Maybe same like this: #1965

Try:

  • open /index.php/settings/admin/richdocuments
  • select "use your own server" and save" (it will automatically jump back to "use built in CODE")
  • reload website in browser and click on a file

@SimeonEhrig
Copy link
Author

I'm not sure, if I did correctly, what you suggest. That's my settings:

image
I simply tried to click on save and nothing happens. Switching to the demo server does also not solve the problem. I also tried to install the built-in server, but this crashed the installation, because some missings in the nginx config. I removed the built-in server via CLI. If it make sense, I can install again and try to configure it.

I also tried the suggestion of issue #1965 without success. I executed the following commands:

  • domain.com is my nextcloud domain
  • office.other.com is the domain of my collabora server
> php --define apc.enable_cli=1 occ config:app:set richdocuments public_wopi_url --value https://office.other.com/apps/richdocumentscode/proxy.php?req=
> php --define apc.enable_cli=1 occ config:app:set richdocuments wopi_url --value https://office.other.com/apps/richdocumentscode/proxy.php?req=
> php --define apc.enable_cli=1 occ richdocuments:activate-config
Client error: `GET https://office.other.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery` resulted in a `404 Not Found` response:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found (truncated...)

#0 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL)
#1 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 /var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 /var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait()
#10 /var/www/html/lib/private/Http/Client/Client.php(223): GuzzleHttp\Client->request('get', 'https://office....', Array)
#11 /var/www/html/custom_apps/richdocuments/lib/WOPI/DiscoveryManager.php(84): OC\Http\Client\Client->get('https://office....', Array)
#12 /var/www/html/custom_apps/richdocuments/lib/WOPI/DiscoveryManager.php(56): OCA\Richdocuments\WOPI\DiscoveryManager->fetchFromRemote()
#13 /var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php(41): OCA\Richdocuments\WOPI\DiscoveryManager->get()
#14 /var/www/html/custom_apps/richdocuments/lib/Command/ActivateConfig.php(70): OCA\Richdocuments\WOPI\Parser->getUrlSrc('Capabilities')
#15 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\RichDocuments\Command\ActivateConfig->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\RichDocuments\Command\ActivateConfig), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/console.php(99): OC\Console\Application->run()
#21 /var/www/html/occ(11): require_once('/var/www/html/c...')
#22 {main}
> php --define apc.enable_cli=1 occ config:app:set richdocuments public_wopi_url --value https://domain.com:9443/apps/richdocumentscode/proxy.php?req=
> php --define apc.enable_cli=1 occ config:app:set richdocuments wopi_url --value https://domain.com:9443/apps/richdocumentscode/proxy.php?req=
> php --define apc.enable_cli=1 occ richdocuments:activate-config
An unhandled exception has been thrown:
Error: Call to a member function xpath() on bool in /var/www/html/custom_apps/richdocuments/lib/WOPI/Parser.php:51
Stack trace:
#0 /var/www/html/custom_apps/richdocuments/lib/Command/ActivateConfig.php(70): OCA\Richdocuments\WOPI\Parser->getUrlSrc('Capabilities')
#1 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\RichDocuments\Command\ActivateConfig->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\RichDocuments\Command\ActivateConfig), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/console.php(99): OC\Console\Application->run()
#7 /var/www/html/occ(11): require_once('/var/www/html/c...')

@adelphi-company
Copy link

The difference is, that my installation uses "Use the built-in-CODE" all the time. It automaticaly switches to this even after saving "use your own server". I recommend to try to get the buit-in CODE working...

@SimeonEhrig
Copy link
Author

I was not able to install the built-in Code server. There was to many problems. But it looks like, that it does not solve the problem, because in this issue, there is the same problem like me with the built-in server: #2025

@neufeind
Copy link

This happened for me with Nextcloud 23.0.2 after moving from PHP 7.4 to 8.0. Switching back (and clearing cookies, logging in etc.) the office-documents opened with Collabora again. Most details between 7.4 and 8.0 (like opcache, APCu, ...) seem to be identical. Disabling apcu on 8.0 also didn't help.
PS: I'm using the "built-in CODE"-app.

@SimeonEhrig
Copy link
Author

SimeonEhrig commented Feb 20, 2022

@neufeind Thanks for the answer. Unfortunately, it does not solve the problem. I built a php 7.4 version of the nextcloud fpm container (took the same recipe and replace the base image), disabled the APCu cache and I used a web browser, which I never used to login in this nextcloud instance. But the problem still exists.

I also controlled via user survey in the settings, that php 7.4 is used.

@gerazo
Copy link

gerazo commented Feb 25, 2022

This happened to me after upgrading to NC 23.0.2, an to richdocuments 5.0.2
Despite CODE server was accessible, doc creation menu points were available, only download happened on clicking on docs. I tried a lot of things, including service restarts. They did not help.
And finally, I solved it with by:

  1. Disabling and Removing richdocuments app
  2. Installing it again from appstore
  3. Going into Nextcloud Office configuration and enabling "using simplified webroot" and than disabling it again.

I do not exactly know the reasons, but some garbage settings are not properly updated between version upgrades and it seems, you have to reapply them by hand. I can imagine that barely point 3 can solve the problem, but I do not have a way to retry it.

@SimeonEhrig
Copy link
Author

@gerazo Thanks for your answer. I think you mean Use Canonical webroot or I'm wrong? I tried all 3 steps, but does not help.

I also forgot to write, that collabora also does not work, if I create a new file. A dialog appears, that I can choose a template, but then the error Unable to create new file from template is thrown. The file was created but I could not open it.

@gerazo
Copy link

gerazo commented Feb 28, 2022

@SimeonEhrig Yes, I meant that. And your error on creation never happened to me.

@gerazo
Copy link

gerazo commented Mar 4, 2022

@SimeonEhrig I have updated to the newest richdocuments 5.0.3 and richdocumentscode 21.11.204 (which is probably a stupid move based on that recently these two are the most fragile parts of all NextCloud by far). Anyway, after updating, opening a document I get an infinite opening... screen and also your error on creation: unable to create file from template. Cleaning cache and restarting things, I get the document being downloaded instead of opening and also the unable to create from template thing. But again, enabling using canoncila webroot (leaving the field empty and clicking on the submit button), waiting a bit until things settle, than unchecking and waiting again... and it is good and working again.

I always update these components from command line and still, the update process seems to be quite fragile. I wonder if there is any step, restarting a service or something which I miss.

@samtigall
Copy link

@SimeonEhrig I was able to fix that bug today by updating the collabora server. When i then hit the save button in nextcloud frontend it started loading documents but failed. I had to update the permissions on new subfolder structure on collabora server.

@Wikinaut
Copy link
Contributor

Wikinaut commented Mar 4, 2022

@gerazo Exactly same issue here (on one of two NC 23.0.2 instances).

@SimeonEhrig
Copy link
Author

I updated richdocuments to version 5.0.3 and the collabora image to version 6.4.14.3 (the latest version does not work in general on all my administrated NC instances) but is does not solve the problem. Therefore I'm waiting for PR #2095 Hopefully it shows a useful error message.

@SimeonEhrig
Copy link
Author

I solved the problem by "disabling" creating from template:

php occ config:system:set skeletondirectory
php occ config:system:set templatedirectory

After running the commands, I can open existing files and create new one. But if I create a new file, the creation from template dialog still appears and works now.

I got the hint from a friend, who used this commands to solve another problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants