d3473r / jitsi-keycloak

Login to jitsi with keycloak https://github.com/d3473r/jitsi-keycloak/pkgs/container/jitsi-keycloak
https://github.com/d3473r/jitsi-keycloak
MIT License
54 stars 23 forks source link

vue.runtime.esm.js:1897 TypeError: Cannot read property 'token' of null #59

Closed ykorzikowski closed 2 years ago

ykorzikowski commented 2 years ago
TypeError: Cannot read property 'token' of null
    at a.openJitsi (App.vue:71)
    at re (vue.runtime.esm.js:1863)
    at a.n (vue.runtime.esm.js:2188)
    at re (vue.runtime.esm.js:1863)
    at a.Ln.t.$emit (vue.runtime.esm.js:3903)
    at a.click (VBtn.ts:163)
    at re (vue.runtime.esm.js:1863)
    at HTMLButtonElement.n (vue.runtime.esm.js:2188)
    at HTMLButtonElement.Qi.o._wrapper (vue.runtime.esm.js:6961)
oe @ vue.runtime.esm.js:1897
ie @ vue.runtime.esm.js:1888
ne @ vue.runtime.esm.js:1848
re @ vue.runtime.esm.js:1871
n @ vue.runtime.esm.js:2188
re @ vue.runtime.esm.js:1863
Ln.t.$emit @ vue.runtime.esm.js:3903
click @ VBtn.ts:163
re @ vue.runtime.esm.js:1863
n @ vue.runtime.esm.js:2188
Qi.o._wrapper @ vue.runtime.esm.js:6961

Run inside docker container.

The SSO login is working, but on the auth page a. the Room is not automatically filled inside the form b. when doing manually, this error occurs

d3473r commented 2 years ago

Hi, this error occures when the config could not be loaded from the server. Are there any other errors in the console/network tab before this one?

ykorzikowski commented 2 years ago

Hi Fabian, you mean the config from the keycloak server?

d3473r commented 2 years ago

No, the frontend makes a request against /api/config to get the jwt token and other configuration from the backend. I think this request is failing hence you are getting an error accessing the token afterwards

ykorzikowski commented 2 years ago

Yey I found, its because:

2022-08-26 16:47:43,886 WARN  [org.keycloak.events] (executor-thread-97) type=LOGIN_ERROR, realmId=master, clientId=jitsi, userId=null, ipAddress=79.***.***.70, error=invalid_redirect_uri, redirect_uri=http://auth-meet.***.eu/api/config?auth_callback=1

It is redirecting to http, even I set everything to https.

        environment:
          JITSI_SECRET: "***"
          DEFAULT_ROOM: "meet"
          JITSI_URL: "https://meet.***.eu/"
          JITSI_SUB: "meet.***.eu"
ykorzikowski commented 2 years ago

omg its working now. It was a network issue. the jitsi lxc container could not reach the sso lxc. :)

thank you for your replies, Fabian.