An error occurred at login modal (same as topic 293167)

AI-generated summary

A bug has been reported where, upon clicking login, the ‘Welcome back :wave:’ modal is immediately followed by an error message: ‘Sorry, an error occurred’. Dismissing the error allows normal authentication to proceed. The error originates from passkeyLogin in login.js and is logged in the console hellekin. The issue occurs in Firefox 115.7.0esr (64-bit) on Debian 12, running Discourse v3.3.0.beta1-dev hellekin. Moin confirmed it matches a previously reported issue on Meta Moin. Arkshine traced the regression to a specific commit in webauthn.js, suggesting the error-handling code should be moved inside a try{} block to avoid UI disruption. pmusaraj acknowledged the report and confirmed a fix is in progress via PR #25549, reproducible on Windows/macOS with the same Firefox version, though the fix should apply universally.

I have noticed this bug before on Meta, but then it appeared on my deployments after the latest upgrade: when clicking login, the “Welcome back :wave:” modal appears, and is immediately shadowed by “Sorry, an error occurred”. Clicking OK removes the error modal and you can resume authentication normally.

There’s an error log in the console:

ajax-error.js:9:12
    l ajax-error.js:9
    p ajax-error.js:95
    passkeyLogin login.js:147
2 Likes

Which browser do you use?

Firefox 115.7.0esr (64-bit) on Debian 12.

:information_source: Discourse v3.3.0.beta1-dev — Commits · discourse/discourse · GitHub — Ember v5.5.0

1 Like

Then I think it is the same issue as Error message displaying at login with Linux/Firefox

2 Likes

This is a regression introduced here: FEATURE: Allow users to confirm session with passkeys (#24337) · discourse/discourse@c6ead3f · GitHub

I think the code needs to be moved in the try{} below; otherwise, the error will use the UI instead of the console.

4 Likes

Thanks for the report. This should be fixed via FIX: Handle old Firefox versions that do not support isConditionalMed… by pmusaraj · Pull Request #25549 · discourse/discourse · GitHub, I could only repro with that version of Firefox on Windows/macOS, but the fix should apply to other OSs as well.

3 Likes

This topic was automatically closed after 4 days. New replies are no longer allowed.