502 Bad gateway when try to access synlocud Web GUI

Hello,

I’m having trouble logging in to the Syncloud web interface today:

502 Bad Gateway / nginx/1.24.0

Services like Bitwarden and Nextcloud are still working. My device is listed as active on https://www.syncloud.it. SSH access to my Raspberry Pi is also working without any issues. The Paperless service isn’t working either, but that’s probably because authentication isn’t working due to the “502 Bad Gateway” error.

I need help :upside_down_face: how can I debug this issue? I’m a bit at a loss as to what I should check on the box; I’m not very familiar with snap and snapctl.

Here’s some information that might be related to the problem. I saw on the box that a new version was apparently installed on April 16, 2026:

root@syncloud:/snap/platform# ls -al
total 8
drwxr-xr-x  4 root root 4096 Apr 16 23:31 .
drwxr-xr-x 11 root root 4096 Feb 17 12:47 ..
drwxr-xr-x 12 root root  198 Apr  6 09:40 2643
drwxr-xr-x 12 root root  198 Apr 16 19:24 2649
lrwxrwxrwx  1 root root    4 Apr 16 23:31 current -> 2649

I definitely haven’t tried it since April 16, 2026, since there weren’t any obvious issues with the services. I wanted to use Paperless today and then ran into the problems.

I think I’ve analyzed a problem:

root@syncloud:/snap/platform# ls -la /var/snap/platform/current/authelia.socket
ls: cannot access '/var/snap/platform/current/authelia.socket': No such file or directory
root@syncloud:/snap/platform# ls -la /snap/platform/current
lrwxrwxrwx 1 root root 4 Apr 16 23:31 /snap/platform/current -> 2649
root@syncloud:/snap/platform# ps aux | grep -i authelia
root      6039  0.0  0.0   6112  1536 pts/0    S+   13:36   0:00 grep -i authelia
root     28197  0.3  0.0   6752  2560 ?        Ss   Apr16  19:51 /bin/bash -e /snap/platform/2649/bin/service.authelia.sh

The authelia socket is missing :face_with_raised_eyebrow:

After a restart, the socket appears and the login screen is displayed again

root@syncloud:/snap/platform# snap restart platform.authelia
Restarted.
root@syncloud:/snap/platform# ls -la /var/snap/platform/current/authelia.socket
srwxrwxrwx 1 root root 0 Apr 21 13:37 /var/snap/platform/current/authelia.socket

However, after logging in, the only message that appears is:

{"success":false,"message":"invalid state"}


:anxious_face_with_sweat:

I have cleared the browser cookies, but after this I get:

{"success":false,"message":"no OIDC session"}

Tried to check the logs of the backend during login:

journalctl -u snap.platform.backend -f
Apr 21 13:59:11 syncloud platform.backend[14283]: info rest/middleware.go:92 error {"error": "no session found"}
Apr 21 13:59:11 syncloud platform.backend[14283]: info rest/middleware.go:102 GET: /rest/activation/status
Apr 21 13:59:11 syncloud platform.backend[14283]: info rest/middleware.go:102 GET: /rest/oidc/login
Apr 21 13:59:20 syncloud platform.backend[14283]: info rest/middleware.go:102 GET: /rest/oidc/callback?code=authelia_ac_ZxICE8pwKuzhk2WjgNLSQKz5DYcwtUdTQYJ7j4QDKTs.DZSNEk-DbiCiIeu5AMfCFPnp5UgLKSqXif9wvLyFKsM&iss=https%3A%2F%2Fauth.ralfbwebde.syncloud.it&scope=openid+profile+email+groups&state=4cybi72Ie994w6eC6yDCyktoIvULXtCm
Apr 21 13:59:20 syncloud platform.backend[14283]: error rest/middleware.go:125 error {"error": "no OIDC session"}
Apr 21 13:59:20 syncloud platform.backend[14283]: github.com/syncloud/platform/rest.(*Middleware).Fail
Apr 21 13:59:20 syncloud platform.backend[14283]:         /drone/src/backend/rest/middleware.go:125
Apr 21 13:59:20 syncloud platform.backend[14283]: github.com/syncloud/platform/rest.(*Backend).OIDCCallback
Apr 21 13:59:20 syncloud platform.backend[14283]:         /drone/src/backend/rest/backend.go:310
Apr 21 13:59:20 syncloud platform.backend[14283]: github.com/syncloud/platform/rest.(*Backend).Start.(*Middleware).FailIfNotActivated.func4
Apr 21 13:59:20 syncloud platform.backend[14283]:         /drone/src/backend/rest/middleware.go:45
Apr 21 13:59:20 syncloud platform.backend[14283]: net/http.HandlerFunc.ServeHTTP
Apr 21 13:59:20 syncloud platform.backend[14283]:         /usr/local/go/src/net/http/server.go:2322
Apr 21 13:59:20 syncloud platform.backend[14283]: github.com/syncloud/platform/rest.(*Middleware).JsonHeader-fm.(*Middleware).JsonHeader.func1
Apr 21 13:59:20 syncloud platform.backend[14283]:         /drone/src/backend/rest/middleware.go:104
Apr 21 13:59:20 syncloud platform.backend[14283]: net/http.HandlerFunc.ServeHTTP
Apr 21 13:59:20 syncloud platform.backend[14283]:         /usr/local/go/src/net/http/server.go:2322
Apr 21 13:59:20 syncloud platform.backend[14283]: github.com/gorilla/mux.(*Router).ServeHTTP
Apr 21 13:59:20 syncloud platform.backend[14283]:         /go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210
Apr 21 13:59:20 syncloud platform.backend[14283]: net/http.serverHandler.ServeHTTP
Apr 21 13:59:20 syncloud platform.backend[14283]:         /usr/local/go/src/net/http/server.go:3340
Apr 21 13:59:20 syncloud platform.backend[14283]: net/http.(*conn).serve
Apr 21 13:59:20 syncloud platform.backend[14283]:         /usr/local/go/src/net/http/server.go:2109

Doesn’t know what this exactly mean … I have restarted the backend - same result :face_with_spiral_eyes:

@boris Do you have an idea what is going wrong???

Sorry recent authelia changes broke few things, fix is in the works I will let you know, should auto update and fix when ready.

1 Like

Thanks for the quick info @boris and good luck by fixing the problem.

Could you upgrade please

snap refresh platform

I have done the update

root@syncloud:~# snap refresh platform
platform 2695 from Syncloud✓ refreshed
root@syncloud:~# ls -al /snap/platform/
total 8
drwxr-xr-x  4 root root 4096 Apr 22 05:32 .
drwxr-xr-x 11 root root 4096 Feb 17 12:47 ..
drwxr-xr-x 12 root root  198 Apr 21 19:18 2691
drwxr-xr-x 12 root root  198 Apr 22 01:43 2695
lrwxrwxrwx  1 root root    4 Apr 22 05:32 current -> 2695

but still get

{"success":false,"message":"no OIDC session"}

after login. I have removed all Cookies, used Chrome, also with new inkognito tab, instead of Safari - same error :frowning:

Could you send logs from settings?
Is it just chrome, what about other browsers?
Also ate you able to login if you go directly to auth.[domain]?

Login with https://auth[domain] works and I can see the GUI. I’m on MacOS 26.4.1 and mainly use Safari (Version 26.4 (21624.1.16.11.4)). For testing I have downloaded Chrome, just to verify if it’s a browser issue. Can you please advice which settings logs you need? Just go to the GUI / Support / send logs?

Yes just setting send logs to support?

Done - hope it helps to analyze.