richdocumentscode: Could not find urlsrc in WOPI
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.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 56 (2 by maintainers)
Ok, I got it working!
Turns out, adding the line
RequestHeader set X-Forwarded-Proto httpshad nothing to do with my problem, it was instead a problem with fontconfig not configured on my Ubuntu Server 20.04.The url
https://<my.domain.address>/extra-apps/richdocumentscode/proxy.php?statuswas responding with ano_fontconfigerror, so I tried to install a bunch of packages to pull in some fontconfig dependencies (I don’t know exactly which are the correct ones):sudo apt install fontconfig-config build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-devAfter installing the libraries the proxy responds with
{"status":"OK"}and everything works as expected.The
no_fontconfigerror is also mentioned in #162 and #145Probably the error message in Nextcloud logs
Could not find urlsrc in WOPIwas misleading in this case, it should have returned the real proxy errorno_fontconfig.yes, I made that and I got it working on nextcloud-snap 😃
To answer my own question, with the snap it is enough to add @Verhoeckx’s solution at the
.htaccessfile, at/var/snap/nextcloud/current/nextcloud/config😃Indeed the problem seems to be related to some caching inside of the Nextcloud infrastructure. In my case the WOPI discovery went wrong for some reasons here with the following server response:
I was only able to figure that out by adding appropriate logging to the mentioned line of code.
It seems that this faulty response is cached for 1 hour in the Nextcloud cache. So I commented out this line to force the NC app to always fetch a fresh server response for the discovery. Now it seems to work.
Unfortunately I’m not able to tell where this error response was coming from or why it happend but in my case it was clearly a problem in combination with the Nextcloud infrastructure, which caches the error response. Hope this helps!
this is mine, and it works for me:
I got tons of AVC denial messages in journalctl after installing setroubleshoot. Then I disabled selinux temporally, edited a document and did a ausearch | audit2allow
Here my settings (Apache/2.4). The important thing was the line with ‘RequestHeader’
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”