Closed mikkorantalainen closed 3 weeks ago
The stacktrace refers to following code in function redirect()
:
// old code will not replace {state} and will fail witgh JSON error if we try to parse
if (searchParams.get('state') && !searchParams.get('state').includes('{state}')) {
state = JSON.parse(decodeURIComponent(searchParams.get('state'))); // -- line 51
}
which is called from
function initApp() {
firebase.auth().onAuthStateChanged(function(user) {
if (!user) {
// ...
} else {
user.getIdTokenResult(true).then(idTokenResult => redirect(idTokenResult)); // -- line 133
}
The comment at line 49 suggests that there is some legacy behavior here but I would guess unhandled exception is not part of the design here.
Just ran into this. Even removing the data after the # didn't work for us.
(We are using jisti-meet-electron.)
https://meet.jit.si/ is still broken. Is this expected and the fix is only applied to source code for now?
It is only in the code now, there was no release on meet with this, when this happens I will update the ticket.
@mikkorantalainen @asmaloney Can you try now and see is it fixed for you? Thank you
Seems to work for me again. Thank you so much @damencho!
@mikkorantalainen @asmaloney Can you try now and see is it fixed for you? Thank you
I'm confirming that meet.jit.si does work correctly again! Thanks for the fix.
Description:
When one uses options in URL hash and
meet.jit.si
requires user to authenticate to open a new room, the login flow hangs in errorUncaught (in promise) SyntaxError: Expected ',' or '}' after property value in JSON
(see details below).Steps to reproduce:
Expected behavior:
The login should work correctly and I should enter the room successfully.
Actual behavior:
The URL that hangs is as follows:
https://web-cdn.jitsi.net/auth-static/meet-jit-si/v10/signin.html?state=%7B%22room%22%3A%22b98b8c44-c7a6-40f2-9cf9-d44ff704b999%22%2C%22roomSafe%22%3A%22b98b8c44-c7a6-40f2-9cf9-d44ff704b999%22%2C%22config.prejoinConfig.enabled%22%3Afalse%2C%22config.subject%22%3A%22%2522Example%2520Title%2522%22%7D#room=b98b8c44-c7a6-40f2-9cf9-d44ff704b999&subdir=
Note the room id in both hash part of the URL and in the state query parameter. Note that the parameter
userInfo.displayName
has already been lost at this step.Following error can be see in JavaScript console on the page that hangs:
Full text for both the shortened parts in the error message appears to be
https://web-cdn.jitsi.net/auth-static/meet-jit-si/v10/signin.html?state={"room":"b98b8c44-c7a6-40f2-9cf9-d44ff704b999","roomSafe":"b98b8c44-c7a6-40f2-9cf9-d44ff704b999","config.prejoinConfig.enabled":false,"config.startWithVideoMuted":true,"config.subject":"%22Example%20Title%22"}
That is, the URL of the hanging page.
Server information:
Client information:
Additional information:
Login can be completed successfully if you remove the hash part from the original URL so this is related to either incorrect encoding or decoding of the hashed data during the OpenID Connect login flow. I was unable to follow the code logic to figure this out by myself.
Partial documentation of the URL address syntax can be found here: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe