Collabora will not load documents

I’m running Collabora and Nextcloud via docker compose through pfsense, let’s encrypt and HAproxy.

Collabora shows connected in Nextcloud–>Settings–>Collabora. When I browse to http://collabora.mycustomdomain.com I get “OK” in the upper left of the screen. Also, I can see Collabora running by issuing “netstat -tupln” as it is listening on TCP port 3306, so collabora is certainly running. However when I try to open or create, say, a spreadsheet file, I just get a blank nextcloud white screen. Below are many screenshots of what I thought to be relevant. What other information can I provide?

docker-compose.yml
Collabora settings showing connected
Nextcloud–>Settings–>Logging (also an expanded version of that below)

Exception: strtolower() expects parameter 1 to be string, null given

/var/www/html/lib/private/AppFramework/App.php - line 137:

OC\AppFramework\Http\Dispatcher->dispatch(OC\Core\Cont ... {}, "getPreviewByFileId")

/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OC\\Core\\C ... r", "getPreviewByFileId", OC\AppFramew ... {}, { _route: "c ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "c ... "})

/var/www/html/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "c ... "})

/var/www/html/lib/base.php - line 1007:

OC\Route\Router->match("/core/preview")

/var/www/html/index.php - line 37:

OC::handleRequest()

Caused by TypeError: strtolower() expects parameter 1 to be string, null given

/var/www/html/lib/private/Http/Client/Client.php - line 162:

strtolower(null)

/var/www/html/lib/private/Http/Client/Client.php - line 293:

OC\Http\Client\Client->preventLocalAddress("collabora.d ... g", { timeout: 1 ... ]})

/var/www/html/custom_apps/richdocuments/lib/Preview/Office.php - line 92:

OC\Http\Client\Client->post("collabora.d ... g", { timeout: 1 ... ]})

/var/www/html/lib/private/Preview/ProviderV1Adapter.php - line 54:

OCA\Richdocuments\Preview\Office->getThumbnail("Welcome to Nextcloud Hub.docx", 4096, 4096, false, OC\Files\View {})

/var/www/html/lib/private/Preview/GeneratorHelper.php - line 63:

OC\Preview\ProviderV1Adapter->getThumbnail(OC\Files\Node\File {}, 4096, 4096)

/var/www/html/lib/private/Preview/Generator.php - line 235:

OC\Preview\GeneratorHelper->getThumbnail(OC\Preview\ProviderV1Adapter {}, OC\Files\Node\File {}, 4096, 4096)

/var/www/html/lib/private/Preview/Generator.php - line 141:

OC\Preview\Generator->getMaxPreview(OC\Files\Sim ... {}, OC\Files\Node\File {}, "application ... t", "")

/var/www/html/lib/private/Preview/Generator.php - line 107:

OC\Preview\Generator->generatePreviews(OC\Files\Node\File {}, [ { width: 3 ... }], "application ... t")

/var/www/html/lib/private/PreviewManager.php - line 190:

OC\Preview\Generator->getPreview(OC\Files\Node\File {}, 32, 32, true, "fill", null)

/var/www/html/core/Controller/PreviewController.php - line 170:

OC\PreviewManager->getPreview(OC\Files\Node\File {}, 32, 32, true, "fill")

/var/www/html/core/Controller/PreviewController.php - line 143:

OC\Core\Controller\PreviewController->fetchPreview(OC\Files\Node\File {}, 32, 32, false, true, "fill")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 170:

OC\Core\Controller\PreviewController->getPreviewByFileId(21, 32, 32, false, true, "fill")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 100:

OC\AppFramework\Http\Dispatcher->executeController(OC\Core\Cont ... {}, "getPreviewByFileId")

/var/www/html/lib/private/AppFramework/App.php - line 137:

OC\AppFramework\Http\Dispatcher->dispatch(OC\Core\Cont ... {}, "getPreviewByFileId")

/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OC\\Core\\C ... r", "getPreviewByFileId", OC\AppFramew ... {}, { _route: "c ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "c ... "})

/var/www/html/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "c ... "})

/var/www/html/lib/base.php - line 1007:

OC\Route\Router->match("/core/preview")

/var/www/html/index.php - line 37:

OC::handleRequest()
1 Like

I have the exact same error. I do however use Traefik v2.
I have disabled SSL, are able to access the collabora server at office.server.tdl.
Nextcloud shows connection, however when I try to open a file, only a white page is shown.

1 Like

Same setup as you. Same issue.

I’m wondering if there’s some other corner of the internet we’re supposed to be asking these questions in? I created this thread 4 days ago and no response from anyone other than people with the same problem. I’m at a loss.

1 Like

managed to fix this…
it is finally working…

  documentserver:
    image: collabora/code
    restart: always
    container_name: nextcloud-documentserver
    hostname: office.xxx.xx
    networks:
      - docker_frontend
    environment:
      - TZ=Europe/Copenhagen 
      - domain=next\.xxx\.xx
#      - domain=office.xxx.xx
      - server_name=office.xxx.xx
      - CERT_DOMAIN=office.xxx.xx
      - DONT_GEN_SSL_CERT=True
      - username=xxx
      - password=xxx
      - dictionaries=en da
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
      - VIRTUAL_HOST=office.xxx.xx
      - VIRTUAL_PORT=9980
      - VIRTUAL_PROTO=http
      - LETSENCRYPT_HOST=office.xxx.xx
      - LETSENCRYPT_EMAIL=xxx@gmail.com      
    ports: 
      - "9980:9980"       

    labels: #Traefik v2
      - traefik.enable=true
      - traefik.http.routers.collabora.rule=Host(`office.xxx.xx`)
      - traefik.http.services.collabora.loadbalancer.server.port=9980
      - traefik.http.routers.collabora.entrypoints=secure
      - traefik.http.routers.collabora.tls.certresolver=le

Hey Benjamin, thanks for posting that. Any chance you have a copy of the old, non-working compose syntax? I’d like to compare the before and after to see what was the problem. Particularly as I don’t use Traefik, so I really need to isolate what your issue was.

Also, why do you have “” in your url examples? such as “domain=next.xxx.xx”?

Hi,

I do not. I did various changes, one at a time.
Suddently Nextcloud was actually showing collabora. I do not know why. I uninstalled the internal collabora code from apps and had only the collabora interface app installed. I tweaked the settings but nothing worked. A few hours later when I gave it a try, it did load collabora from nextcloud, however with an unauthorized wopi client error message. - This was down to syntax in the “domain=xx.xx.xx” string, I believe. The collabora takes some time to load and be ready for connections, however I somehow believe it was down to nextcloud being restarted. I have made the collabora dependency to nextcloud. I do not know if this changed much, but now it works.

depends_on:
  - documentserver
  - nextcloud-redis

Thanks for posting this solution. I will try it later today. Sorry to put this in this thread, but I am curious, are you experiencing other issues with nextcloud behind pfsense, haproxy ,acme certs packages? The two I have had with this setup are this collabora one that seems common with this setup… But I also have a problem with the email client. I just cant get that to connect to any accounts. Thanks again!