richdocumentscode icon indicating copy to clipboard operation
richdocumentscode copied to clipboard

Could not find urlsrc in WOPI

Open chrissooo opened this issue 3 years ago • 56 comments

Hi,

have Update to 6.4.705 an have a error when try to open a document:

I am on a CentOS 7 installation, PHP 8 and Apache. No Docker Image.

[richdocuments] Error: Exception: Could not find urlsrc in WOPI at <<closure>>

0. ******/apps/richdocuments/lib/TokenManager.php line 217
   OCA\Richdocuments\WOPI\Parser->getUrlSrc("application/vnd ... t")
1. ******/apps/richdocuments/lib/Controller/DocumentController.php line 256
   OCA\Richdocuments\TokenManager->getToken("*** sensitive parameters replaced ***")
2. ******/lib/private/AppFramework/Http/Dispatcher.php line 218
   OCA\Richdocuments\Controller\DocumentController->index("*** sensitive parameter replaced ***", null)
3. ******/lib/private/AppFramework/Http/Dispatcher.php line 127
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Richdocument ... {}, "index")
4. ******/lib/private/AppFramework/App.php line 157
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Richdocument ... {}, "index")
5. ******/lib/private/Route/Router.php line 302
   OC\AppFramework\App::main("OCA\\Richdocume ... r", "index", OC\AppFramework\ ... {}, {_route: "richdocuments.document.index"})
6. ******/lib/base.php line 993
   OC\Route\Router->match("/apps/richdocuments/index")
7. ******/index.php line 37
   OC::handleRequest()

GET /apps/richdocuments/index?fileId=19121&requesttoken=jRd3y0CoWLcTBxakWricr3nu%2FiSZLT0S23weF5TaFSY%3D%3Apjg2nBfyKJhqdlXDIt391S2evFb%2FGFRrlTRpb9uLbVU%3D

Manual Downgrade to 6.4.608 Fixed it.

chrissooo avatar Mar 23 '21 10:03 chrissooo

https://github.com/nextcloud/richdocuments/issues/1442 is related.

timar avatar Mar 23 '21 10:03 timar

Hi, you are right ... after waiting a while, now its work ... maybe cache or something?

chrissooo avatar Mar 23 '21 10:03 chrissooo

Hi again,

today not working again. Nothing changed since yesterday. Same Error like in first post.

chrissooo avatar Mar 24 '21 10:03 chrissooo

Just install 6.4.608 again, no problems anymore.

chrissooo avatar Mar 24 '21 12:03 chrissooo

I have a feeling that it has nothing to do with richdocumentscode.

timar avatar Mar 24 '21 15:03 timar

fresh install, x86 pc, debian 64 bit, docker image, same problem

frezeen avatar Mar 24 '21 20:03 frezeen

I also ran into this issue on nextcloud 20.0.8 ("Could not find urlsrc in WOPI"). At first I tried downgrading Collabora Online - Built-in CODE Server from 6.4.705 down to 6.4.608 release by release but Collabora Online was not working. Next I upgraded the CODE Server back to 6.4.705 and tried downgrading Collabora Online from version 3.7.17. And right away version 3.7.16 was working again.

ppascher avatar Mar 24 '21 22:03 ppascher

Collabora Online 4.0.4, Collabora Online - Built-in CODE Server 6.4.608 on Nexcloud 21 work without problems

chrissooo avatar Mar 25 '21 13:03 chrissooo

Have test a another constalation: Collabora Online 4.0.3 an Built-in CODE Server 6.4.705 work also...

chrissooo avatar Mar 25 '21 15:03 chrissooo

Hi again, sorry for this mutch reporting, but the constalation "Collabora Online 4.0.3 an Built-in CODE Server 6.4.705" dont work today anymore. The only one konstalation thats work for longer time ist for me: "Collabora Online 4.0.4, Collabora Online - Built-in CODE Server 6.4.608"

chrissooo avatar Mar 26 '21 09:03 chrissooo

Hi,

Same issue here, running Nextcloud 20.0.7 (latest snap available), made the mistake of upgrading Collabora Online to 3.7.17 and Built-in CODE Server to 6.4.705, and getting the same issue as the original post.

Not a critical issue as it's a test of Nextcloud used only by 2 persons, but still pretty annoying :/

@ppascher : I'm pretty new to NC, how did you downgrade to Collabora Online to 3.7.16 version ? Manual deployment from zip ? Cross-restore of a VM backup and manual copy of needed files ?

dsysvdu avatar Mar 29 '21 08:03 dsysvdu

@dsysvdu I was wondering the same thing and basically tried what you proposed. Here are the steps:

  1. Change into the custom_apps folder that is located right below the root folder of your Nextcloud installation
  2. Download the previous version of Collabora from here https://github.com/nextcloud/richdocuments/releases/download/v3.7.16/richdocuments.tar.gz using wget for example
  3. un-tar what you just downloaded: tar -xzf richdocuments.tar.gz -C .
  4. then change into the root directory of your NC installation and run ./occ app:enable richdocuments as www-data user (i.e. you might need to prefix the previous command with sudo -u www-data

Now in the admin web UI of your Nextcloud server, you should see Collabora showing up as an available app update and when you try to open a document it should be working again. At least it did work for me :wink:

FMeinicke avatar Mar 31 '21 12:03 FMeinicke

@FMeinicke Thank you very much for this detailed procedure, I'm sure that it will help many :)

I'll try this in the coming days and edit this post to tell the result (but I'm confident it will work)

dsysvdu avatar Mar 31 '21 18:03 dsysvdu

@FMeinicke thanks for the instruction. Unfortunately NextCloud insist on autoupdating, but even without that a downgrade did not seem to help in my case. More tips appreciated!

dspoel avatar Apr 25 '21 17:04 dspoel

Hi. Nextcloud snap 20.0.9 / Collabora Online 3.7.19 / CODE 6.4.705. Ubuntu 20.04 Fresh install Same pb...

Styrone avatar Apr 29 '21 15:04 Styrone

@FMeinicke Thank you very much I tried your solution on my Nextcloud V21.0.1 both with downgraded versions of collabora V3 (not compatible) and V4. Unfortunately the problem persist again

cheesgno avatar May 05 '21 09:05 cheesgno

I got the same error, running Nextcloud 21.0.2 Collabora Online v4.1.1 Collabora Online - Built-in CODE Server v6.4.806

installed the 2 app within NC, didn't work.

yewkay avatar Jun 08 '21 02:06 yewkay

same

JamesDAdams avatar Jun 28 '21 07:06 JamesDAdams

I have received the message mod_fcgid: stderr: richdocumentscode (proxy.php) error exit, PID: 212444, Message: exec_disabled

Is it neccessary that I activate the function exec that it is working?

tt33tt avatar Jun 30 '21 13:06 tt33tt

I've the same problem on a fresh install on centos. When I disable selinux (setenforce 0) it is working

martinr63 avatar Jul 11 '21 09:07 martinr63

Can confirm that solves the problem for me also on Fedora 33 Server and running NextCloud 21.0.3.

MagnusWestin avatar Jul 11 '21 14:07 MagnusWestin

Not for me. By default selinux in my case is disabled, and today I have updated Collabora to 4.2.1.

neoacevedo avatar Jul 30 '21 19:07 neoacevedo

Getting the same issue using NC22, Collabora Online - Built-in CODE Server (6.4.1004), Collabora Online (4.2.1)

Exception: Could not find urlsrc in WOPI

anpct avatar Aug 04 '21 23:08 anpct

Same issue here (NC 21.0.3, CO 4.2.1, CODE 6.4.1004): "Collabora Online server is reachable." but when opening a document, I always receive this message: "Failed to load Collabora Online - please try again later". Logging reports "Exception: Could not find urlsrc in WOPI". Had a lot of different combinations installed, but never got it working ... Tried with a docker collabora/code on DSM7, but this one was not able to get connected to it :-(

NeoThomasAAnderson avatar Aug 06 '21 11:08 NeoThomasAAnderson

same problem Exception: Could not find urlsrc in WOPI

fuzunspm avatar Aug 27 '21 16:08 fuzunspm

Update: never mind, after restarting and having SeLinux off, it started working again...

turning off selinux no longer works for me and "Exception: Could not find urlsrc in WOPI" is back again after I updated the app.

MagnusWestin avatar Sep 03 '21 07:09 MagnusWestin

On my installation there was 2 Problems. One was selinux. I had to set own rules with ausearch -c 'AppRun' --raw | audit2allow -M my-AppRun

After updating nextcloud and the apps, I got the same error message and in my Browser Console there was

Refused to send form data to 'http://nextcloud..de/apps/richdocumentscode/proxy.php?req=/loleaflet/2afbc52/loleaflet.html?WOPISrc=https%3A%2F%2Fnextcloud..de%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F3248_ocyhdvybdxcf&title=******.ods&lang=de&closebutton=1&revisionhistory=1' because it violates the following Content Security Policy directive: "form-action 'self'

This problem was caused from my reverse proxy not sending all X-Forwarded Header to the nextcloud server.

martinr63 avatar Sep 03 '21 07:09 martinr63

This problem was caused from my reverse proxy not sending all X-Forwarded Header to the nextcloud server.

Would you mind sharing what exactly you have changed in your proxy config? I'm suspecting that I have the same problem, but it's quite hard to reproduce (only some users see it).

fschrempf avatar Sep 24 '21 11:09 fschrempf

This problem was caused from my reverse proxy not sending all X-Forwarded Header to the nextcloud server.

I'm also very curious what you did because I have the exact same problem!

Verhoeckx avatar Sep 25 '21 21:09 Verhoeckx

Would you mind sharing what exactly you have changed in your proxy config? I'm suspecting that I have the same problem, but it's quite hard to reproduce (only some users see it).

Here my settings (Apache/2.4). The important thing was the line with 'RequestHeader'

<VirtualHost *:443>
ServerName nextcloud.xxxxx.de:443

ProxyRequests Off
ProxyPreserveHost On

ProxyPass "/" "http://192.168.111.222/"
ProxyPassReverse "/" "http://192.168.111.222/"

RequestHeader set X-Forwarded-Proto https

martinr63 avatar Sep 27 '21 10:09 martinr63