I have no idea why this is happening and what to check- Not loading on some clients

So i have a pfsense gateway, and 2 vms behind it.

I have nextcloud in one, and CODE in the other.

I have configured everything and it worked for a week or so with no problems.

Now, i cannot edit documents if i access the instance (nextcloud+code) from another location except one in particular (where i work).

So the pfsense gateway has a public ip. There are no direct connections to those vms.

So if i try to open a document from home for example, the editor does not load.

If i try this from the workplace (on the same public URL), it works.

This is the haproxy config on the pfsense gateway

frontend https_proxy
bind xxxxxxx:443 name xxxxxx:443 ssl crt-list /var/etc/haproxy/https_proxy.crt_list
mode http
log global
option http-keep-alive
option forwardfor
acl https ssl_fc
http-request set-header X-Forwarded-Proto http if !https
http-request set-header X-Forwarded-Proto https if https
timeout client 30000

acl nextcloud_ACL var(txn.txnpath) -m beg -i /nextcloud
acl office_ACL var(txn.txnhost) -m str -i office.xxx.xx
acl aclcrt_https_proxy var(txn.txnhost) -m reg -i ^cloud.xxx.xx(:([0-9]){1,5})?$
acl aclcrt_https_proxy var(txn.txnhost) -m reg -i ^office.xxx.xx(:([0-9]){1,5})?$

http-request set-var(txn.txnpath) path
http-request set-var(txn.txnhost) hdr(host)
http-request deny if { req.hdr_cnt(content-length) gt 1 }
http-response deny if { res.hdr_cnt(content-length) gt 1 }

use_backend cloud.xxx.xx_ipvANY if nextcloud_ACL aclcrt_https_proxy
use_backend office.xxx.xx_ipvANY if office_ACL aclcrt_https_proxy
backend cloud.xxx.xx_ipvANY
mode http
id 100
log global
timeout connect 30000
timeout server 30000
retries 3
option httpchk OPTIONS /

server cloud.xxx.xx 10.0.101.1:80 id 101 check inter 1000

backend office.xxx.xx_ipvANY
mode http
id 102
log global
timeout connect 30000
timeout server 30000
retries 3
server office.xxx.xx 10.0.101.2:9980 id 103 check inter 1000

I simply dont understand why is would work in one place and not another, since im using the same public hostname.

Im thinking that maybe haproxy has something to do with it, but i cannot think of anything.

Has anyone ever had a situation like this ?

So from what i can see on the clients where its not working the bundle.js file is incomplete.

Uncaught SyntaxError: Unexpected end of input (at bundle.js:1:421346)
Office.vue:198

Welcome to the forum @fxandrei , hm I’m concerned with that Office.vue line

I think I remember some problem in the past with cache and that vue app from NC, I will bring it up in today.s community meeting

Yeah. This is really strange.
Now this does not work from anywhere.
The thing is i installed it again from scratch on a container, and on a full vm, on ubuntu 20.04 and 22.04, and it has the same behaviour.

Is there anything i could check or do on my side ?

yes if you could paste here some logs that would be helpful. Logs from web dev tools → console in your browsers and also the logs from nextcloud available from admin account > settings > logging

So this would be from the collabora admin console:

Uncaught SyntaxError: Unexpected end of input
admin.html:56
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:56:55
admin.html:62
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:62:75
admin.html:63
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:63:166
admin.html:77
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:77:114
admin.html:78
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:78:124
admin.html:79
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:79:120
admin.html:80
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:80:112
admin.html:81
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:81:122
admin.html:93
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:93:102
admin.html:94
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:94:112
admin.html:95
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:95:108
admin.html:96
Uncaught ReferenceError: l10nstrings is not defined
at admin.html:96:100
admin.html:107
Uncaught ReferenceError: Admin is not defined
at admin.html:107:13
admin.html:109
Uncaught ReferenceError: l10nstrings is not defined

This would be from when accesing a file from nextcloud:

bundle.js:1

   Uncaught SyntaxError: Unexpected end of input (at bundle.js:1:421346)

Office.vue:198

   FAILED

In both cases collabora seems to generate incomplete js files. So admin-bundle.js and bundle.js is incomplete.

In nextcloud i dont get any errors when opening the file.

So it seems that the problem is just the fact the those js files are incomplete.
You said that you remember something about a cache problem with the vue app. Is there any way to force this ?

EDIT:
I also see this in the logs when accesing the admin console:

WRN client - server version mismatch, disabling browser cache. Expected: deaf0cb| wsd/FileServer.cpp:510

and this when accesing a document:

kit-05757-04965 2022-05-23 09:12:43.096284 +0000 [ kit_spare_03f ] ERR Failed to mount [/opt/cool/systemplate] → [/opt/cool/child-roots/uKyH6ls43xUd4iH8/] readonly.| common/JailUtil.cpp:59
kit-05757-04965 2022-05-23 09:12:43.096405 +0000 [ kit_spare_03f ] ERR Failed to mount [/opt/cool/systemplate] → [/opt/cool/child-roots/uKyH6ls43xUd4iH8/], will link/copy contents.| kit/Kit.cpp:2548
kit-05757-04965 2022-05-23 09:12:43.100278 +0000 [ kit_spare_03f ] ERR Failed to unmount [/opt/cool/child-roots/uKyH6ls43xUd4iH8/tmp]| common/JailUtil.cpp:70
kit-05757-04965 2022-05-23 09:12:43.104015 +0000 [ kit_spare_03f ] ERR Failed to unmount [/opt/cool/child-roots/uKyH6ls43xUd4iH8/lo]| common/JailUtil.cpp:70
kit-05757-04965 2022-05-23 09:12:43.107939 +0000 [ kit_spare_03f ] ERR Failed to unmount [/opt/cool/child-roots/uKyH6ls43xUd4iH8/]| common/JailUtil.cpp:70
kit-05757-04965 2022-05-23 09:12:43.108202 +0000 [ kit_spare_03f ] ERR statfs failed on ‘/opt/cool/child-roots/uKyH6ls43xUd4iH8/’ (ENOENT: No such file or directory)| kit/Kit.cpp:185
wsd-04958-04980 2022-05-23 09:12:42.231589 +0000 [ websrv_poll ] ERR #143: read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| ./net/Socket.hpp:1124
wsd-04958-05756 2022-05-23 09:12:43.127127 +0000 [ docbroker_003 ] WRN Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:720
wsd-04958-04980 2022-05-23 09:12:43.238772 +0000 [ websrv_poll ] ERR #151: read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| ./net/Socket.hpp:1124
kit-05757-04965 2022-05-23 09:12:43.413152 +0000 [ kit_spare_03f ] ERR mknod(/opt/cool/child-roots/uKyH6ls43xUd4iH8//tmp/dev/random) failed. Mount must not use nodev flag. (EPERM: Operation not permitted)| common/JailUtil.cpp:262
kit-05757-04965 2022-05-23 09:12:43.413294 +0000 [ kit_spare_03f ] ERR mknod(/opt/cool/child-roots/uKyH6ls43xUd4iH8//tmp/dev/urandom) failed. Mount must not use nodev flag. (EPERM: Operation not permitted)| common/JailUtil.cpp:274
wsd-04958-05756 2022-05-23 09:12:43.317591 +0000 [ docbroker_003 ] WRN Waking up dead poll thread [HttpSynReqPoll], started: false, finished: false| ./net/Socket.hpp:720

PS: collabora is running in a container on ubuntu 20.04, but i have the same problem when running in a full vm.

So im not sure if this could be a problem, but collabora is running behing pfsense and haproxy. And from what im seeing in the dev tools in chrome is not establishing the websocket connection.
But it weird, because im passing everything from the domain to the collabora container.

Any news or i fo about this?

I have this exact same issue and setup. pfsense with haproxy, nextcloud in docker and collabora in docker as well. I have tried many combos of configurations from many posts.

The debug console says the same exact error as above… when I open bundle.js from the link in the debug console in chrome it is indeed cut short.

@fxandrei did you ever get this figured out?

No i did not.
Im not sure what i could try.

For now i have given up on using collabora code.

What are you using instead? I’d like to have an online office solution.

Im not using anything right now. I just using the nextcloud client, installed on my pc, and whenever i need to edit anything i access the documents from windows explorer.

Im thinking of using online office server, but havent managed to configure everything yet.

Edit:

The only other solution to this would be onlyoffice, but that has a limitation of the number of users using the same document . I think its 20.
After that, the document is readonly.

So i ended up changing the configuration a little bit.
So im not going through haproxy anymore. Im doing pure NAT now.
I have configured the collabora vm to use SSL (so no more ssl termination, so i have the cert in that vm).

Now everything works.

Im not sure why i had that problem with the incomplete js files.
The only thing i can observe is that when it goes through haproxy it does not establish the websocket connection, and i dont know why, because i have been using different application that use websockets and they work.

Anyway, not it works.