Office online server Exception: Could not find urlsrc in WOPI

Hi all,
I’ve setup an Office Online server running on Windows Server 2016. As it has been setup for testing purpose http is enabled and
The command “(GetOfficeWebAppsFarm).machines” is returning a healthy status and I get a wopi xml file that seems ok ith the /hosting/discovery url.
The Office online Server is reachable via http in The Office Online App for Nextcloud.

However I get these errors when trying to edit some office files:

Error

Failed to open the requested file.

[Nextcloud version : Nextcloud 22.1.1
Operating system and version : Ubuntu 20.04
Apache or nginx version: 2.4
PHP version r7.4.23

Output of the nextcloud log:

Exception: Could not find urlsrc in WOPI

    /var/www/nextcloud/apps/officeonline/lib/TokenManager.php - line 208:

    OCA\Officeonline\WOPI\Parser->getUrlSrcForFile()

    /var/www/nextcloud/apps/officeonline/lib/Controller/DocumentController.php - line 241:

    OCA\Officeonline\TokenManager->getToken("*** sensiti ... *")

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:

    OCA\Officeonline\Controller\DocumentController->index()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:

    OC\AppFramework\Http\Dispatcher->executeController()

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 156:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 301:

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.php - line 1000:

    OC\Route\Router->match()

    /var/www/nextcloud/index.php - line 36:

    OC::handleRequest()

Does anyone came accross this error?
Is there any detailed documentation about how to setup OOS with Nextcloud.

Thanks

I am having the same issue, Have you found a solution?

I have same problem.

I have installed Nextcloud 24.0.1 as described here: Example installation on Ubuntu 22.04 LTS — Nextcloud latest Administration Manual latest documentation (not docker install).

Ubuntu 20.04.4 LTS.

Apache 2.4.41.

mysql Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2.

PHP version 7.4.3.

Microsoft Office Online Server 16.0.10338.20039 installed on MS Windows Server 2012 R2, which is a member of the domain, not DC. Status of Office Web Apps machine is healthy.

Office Online Server is working as expected, I see a Web Application Open Platform Interface Protocol (WOPI)-discovery XML file in web browser ( http://owaserver/hosting/discovery ).

When I try open any DOC/DOCX/XLSX/PPTPX file, I got an error:

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

  1. /media/hdd2/www/nextcloud/apps/officeonline/lib/TokenManager.php line 208

OCA\Officeonline\WOPI\Parser->getUrlSrcForFile()

  1. /media/hdd2/www/nextcloud/apps/officeonline/lib/Controller/DocumentController.php line 241

OCA\Officeonline\TokenManager->getToken("*** sensitive parameters replaced ***")

  1. /media/hdd2/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225

OCA\Officeonline\Controller\DocumentController->index()

  1. /media/hdd2/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133

OC\AppFramework\Http\Dispatcher->executeController()

  1. /media/hdd2/www/nextcloud/lib/private/AppFramework/App.php line 172

OC\AppFramework\Http\Dispatcher->dispatch()

  1. /media/hdd2/www/nextcloud/lib/private/Route/Router.php line 298

OC\AppFramework\App::main()

  1. /media/hdd2/www/nextcloud/lib/base.php line 1023

OC\Route\Router->match()

  1. /media/hdd2/www/nextcloud/index.php line 36

OC::handleRequest()

GET /index.php/apps/officeonline/index?fileId=3349&requesttoken=2e9u4x7oLR5CkAshTjyjt7YKCfWkPghvNBwj846rqe8%3D%3Av7ZBmU7ZYV0voFhXI1vXgOdYeobPU2s%2BB0RC3N6T2Lw%3D&path=%2Ftest%2Ftest2.docx

I tried install officeonline app as described here: GitHub - nextcloud/officeonline: officeonline

« Just clone this repo into your apps directory (Nextcloud server installation needed). Additionally, npm and Node.js are needed for installing JavaScript dependencies and building the frontend code.

Once npm and Node.js are installed, this can be done by running:

npm ci

npm run dev »

But the error still remains.

What is the reason for this error?