Runtime error login bug

Login (local login with email and password) is not responding because of the following runtime error:

**publickeycredential is not defined.**
passkeyConditionalLogin
installModifier
install
untrack
install

Everytime you click the login button that appears in the console.

Env: invite only, login only system. Trying to login as admin. THe only I can get in is with email containing a one time session link.

Thanks for the report, I will take a look. Which browser (or browsers) is this happening on, do you know?

1 Like

firefox (Tor). I will thank you so much if you can fix it!
the setup again for reproducing: registered users only and invite only.

I can see an error as well in Firefox (not Chrome):

1 Like

I thought I was going crazy! For me it was PublicKeyCredential is not defined. Are you also invite and login only?

Any updates? its pretty disastrous for me

A fix is going to be merged soon :+1:

2 Likes

damn! thank you both and all who are fixing this. So then I run rebuild and it should be good , yeah? Or discourse-setup pulls from the repo too? Also I believe there is an error with the default onion template: the onion links redirects to the clearnet page and I have to run the doctor script becuase of some errors. I dont think it makes sense to manually turn off the redirect in nginx, since the rest of requests will still go through clearnet right?

THANKS FOR THE COMMIT. When is it gonna be merged usually?

Can I technically add those couple lines myself so I dont add more down time with rebuilding? Where is that app directory? And would launcher restart be enough?

It’s coming, it’s coming. I just pushed a modification to the fix, it’s tricky because the passkeys’ conditional UI is unevenly supported by browsers.

There is an API to check if the feature is supported, described here: PublicKeyCredential: isConditionalMediationAvailable() static method - Web APIs | MDN, but the call to isConditionalMediationAvailable() behaves differently on different browsers.

In Firefox. it is completely unsupported. In Safari on iOS, the feature is supported, but calling isConditionalMediationAvailable() returns false… so I had to modify the code to add a feature check just for Firefox.

Once tests pass, I will merge the change, it should be then available in about an hour.

3 Likes

thank yeah I saw the second commits… I am changing things locally so I wont rebuild right now and just restart container. It will work yeah? Did you just locally manually?

I just added the changes and restarted the container, but it still does not work. I still get the Publickeycredentials is not defined error.

I just merged the PR, once it’s in tests-passed, you can rebuild and it should fix the issue. I was testing locally with TOR and Firefox on macOS.

Keep an eye on GitHub - discourse/discourse at tests-passed, once the commit shows up there, you can rebuild.

2 Likes

Do I have to rebuild? why is not working when I locally edit the files and run launcher restart? Because I just did exactly that

Because the changes you’re making are on the source files, you need to rebuild the assets.

How long will take to this update be official? My android app it’s showing that error

The fix is now merged, and I see it is deployed to meta.discourse.org, can you reproduce the issue here on your Android device? If so, please share browser version, thanks.

1 Like