Collabora docker fails to open files with special chars

I have a file called “testé.ods” that won’t open:

kit-00391-04 00:07:59.855309 [ kit_queue_0004 ] Failed to load: file:///user/docs/391/test%C3%A9.ods, error: Unsupported URL <file:///user/docs/391/test%C3%A9.ods>: "type detection failed" kit-00391-04 00:07:59.855317 [ kit_queue_0004 ] Failed to get LoKitDocument instance.

If I rename it to test.ods it opens smoothly.

+1 on my installation too i can’t.

Docker last version Collabora with 5.1

Ubuntu 16.04.

Just tested only #, ? and % cause the problem

For me it’s all accent characters :
é è ü à ? ! # etc…

works fine for me…
йцукенгшщзфывапролджэ.юбьтимсчяé è ü à.odt

Maybe there is something to config in docker for use your correct language.
Utf-8, utf-16, etc…

Not sure if it made the difference, I created DB using this:
CREATE DATABASE 'nextcloud' CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';

This bug doesn’t belong with the Database of Nextcloud,
I also created it with UTF-8 Character Set.
It belongs with Docker config or Collabora image who have a problem with character set.

I’m gonna look on docker documentation about it.

My Nextcloud tables are all using UTF8 also, so it cannot be related.

Looking at the error message I think it is related on how special chars are encoded in the URI retrieved by collabora. It is somewhat not encoded properly, or not decoded properly before processing it:

Failed to load: file:///user/docs/391/test**%C3%A9**.ods

On the docker side the character set is on POSIX so ANSCII.
I’ve made an apt-get update and apt-get install locale
i can made a dpkg-reconfigure locales and chose 191 en_US.UTF8
but i cannot change the default LANG etc to en_US.UTF8…

I’m still on the search if some could help at the same time…

I had the same error and solved the problem by adding an environment setting to the initial docker run command: “sudo docker run… -e LANG=C.UTF-8 collabora/code”

Strange it doesn’t work for me.

Here is my starter line :
docker run -t -d -p 127.0.0.1:9980:9980 -e LANG=C.UTF8 -e “domain=nextcloud.mydomain.com” --restart always --cap-add MKNOD collabora/code

I enter into docker with bash : docker exec -i -t CONTAINER ID /bin/bash
and ask locale : i got everything in C.UTF8

I start to edit a file called : éssai.ods and i got the same error :
Failed to load: file:///user/docs/33/%C3%A9ssai.ods, error: Unsupported URL <file:///user/docs/33/%C3%A9ssai.ods>: “type detection failed”

1 Like

Same error here on Ubuntu 16.04… Pokémon.odt

Try it again with LANG=C.UTF-8 instead of C.UTF8

1 Like

Sorry for the bad copy-paste it was C.UTF-8 indeed.

Finally i got it working extracting files from docker to my server with no problem with é à etc…

I cannot get it working using systemd:

`[Unit]
Description=Collabora Online
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
Restart=always
RestartSec=10s
Type=notify
NotifyAccess=all
ExecStartPre=/usr/bin/docker pull collabora/code
ExecStart=/usr/bin/systemd-docker --cgroups name=systemd run -t -d -p 127.0.0.1:9980:9980 --name collabora -e “domain=office.domaine.com” -e LANG=C.UTF-8 --cap-add MKNOD collabora/code

[Install]
WantedBy=multi-user.target`

Got it working. My bad: I needed to rm the container. I also added the --rm option
to prevent such issue in the future:

`[Unit]
Description=Collabora Online
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
Restart=always
RestartSec=10s
Type=notify
NotifyAccess=all
ExecStartPre=/usr/bin/docker pull collabora/code
ExecStart=/usr/bin/systemd-docker --cgroups name=systemd run --rm -t -d -p 127.0.0.1:9980:9980 --name collabora -e LANG=C.UTF-8 -e “domain=office.domain.com” --cap-add MKNOD collabora/code

[Install]
WantedBy=multi-user.target`

I used this : Collabora "connecting" delay for 20 seconds

Read all the comments after.
There is also a mistake at the end for launching loolwsd :
sudo -u lool /usr/bin/loowsd --o: and not --o.

Did you compile it from sources to fix the 20 seconds delay? I saw in this thread that you are running the docker image …

I made both.
First i used docker on my VPS at OVH
Then i wanted to compile loolwsd and loleaflet but for that i had to compile libreoffice too (1GB just the files from git)
I started to compile LO and then no space left have to stop (5GB used just for LO compile). I only have 10GB on my VPS so i gave up.

Then they said me that i can make docker cp CONTENER_ID:/pathorigin/ /pathdestination/ to have LOOL working without docker.

So i lunch myself in the oddysee and wrote my problems on this topic.
Finally it’s quite handy because it’s just files to copy and loolwsd.xml to edit. No need of apache proxy mod. You use the same certs as your nextcloud server. You don’t wait 20 sec. per files. You don’t use docker. Great