Skip to content

Google OAuth sign-up fails silently, scripts (ui.js, nav.js) loaded twice causing SyntaxErrors #358

Description

@hocklate

When creating a new account via Google OAuth on the registration page, the popup completes the full Google sign-in (including 2FA) successfully, but then just closes and returns to the sign-up screen with no account created and no visible error to the user.

Console output on the main tab right after the popup closes:

Uncaught SyntaxError: Identifier 'DropDown' has already been declared (at ui.js?v=13299:1:1)
Uncaught SyntaxError: Identifier 'NavigationBar' has already been declared (at nav.js?v=13299:1:1)
[GSI_LOGGER]: The value of 'callback' is not a function. Configuration ignored.
jQuery.Deferred exception: Cannot read properties of null (reading 'getElementsByClassName') TypeError: Cannot read properties of null (reading 'getElementsByClassName')
at new Output (form.js?v=13299:191:34)
at new Form (form.js?v=13299:1057:5)
at intializeRegisterForm (register.js:12:22)
at HTMLDocument. (register.js:84:3)
[GSI_LOGGER]: google.accounts.id.initialize() is called multiple times. This could cause unexpected behavior and only the last initialized instance will be used.

How to reproduce:

Go to the registration page
Click "Sign up with Google"
Complete the Google sign-in flow, including 2FA if prompted
Popup closes, page returns to sign-up screen, nothing happens

It looks like ui.js and nav.js get loaded/executed twice, causing SyntaxErrors on redeclared top-level identifiers, which breaks the rest of the page's JS execution. This appears to also cause google.accounts.id.initialize() to run twice, so the second (broken) init overwrites the working one, leaving no valid callback to actually process the returned Google token. The result is the OAuth flow completing on Google's end but silently failing to create the account.

Browser/env: Microsoft Edge, cookies/cache cleared before testing (ruled out as a caching issue on my end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions