Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FallbackRequested Error #12663

Open
1 task done
DubiousDoggo opened this issue Jan 2, 2025 · 10 comments
Open
1 task done

FallbackRequested Error #12663

DubiousDoggo opened this issue Jan 2, 2025 · 10 comments
Labels
browser Browser Extension bug

Comments

@DubiousDoggo
Copy link

Steps To Reproduce

Apologies for the lack of info, this is on a company-internal website, so unfortunately I cant give the full picture.
Every so often something from the Bitwarden browser extension is hitting our crash handler.
When it does occur, it happens repeatedly about every 5 or 10 minutes. It seems that it might only be when the vault is locked.

Expected Result

No error

Actual Result

Crash handler stack trace (some information redacted)

[0]:"Error: FallbackRequested"
[1]:" at EventTarget.onDestroyListener (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:325:50)"
[2]:" at Messenger. (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:353:28)"
[3]:" at Generator.next ()"
[4]:" at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:233:71"
[5]:" at Object.safeInvoke "
[6]:" at Core$Promise$executorWrapper"
[7]:" at new Promise ()"
[9]:" at new Core$Promise$ctor "
[10]:" at __awaiter (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:229:12)"
[11]:" at Messenger.destroy (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:352:16)"
[12]:" at destroy (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:604:28)"
[13]:" at messenger.handler (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:618:13)"
[14]:" at Messenger. (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:330:26)"
[15]:" at Generator.next ()"
[16]:" at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:233:71"
[17]:" at Object.safeInvoke"
[18]:" at Core$Promise$executorWrapper"
[19]:" at new Promise ()"
[21]:" at new Core$Promise$ctor "
[22]:" at __awaiter (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:229:12)"
[23]:" at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:306:27"

Screenshots or Videos

No response

Additional Context

No response

Operating System

Windows

Operating System Version

No response

Web Browser

Chrome

Browser Version

No response

Build Version

2024.12.4

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@DubiousDoggo DubiousDoggo added browser Browser Extension bug labels Jan 2, 2025
@bitwarden-bot
Copy link

Thank you for reporting this issue! We've added this to our internal tracking system.
ID: PM-16671

@jtodddd
Copy link

jtodddd commented Jan 3, 2025

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@jacobg213
Copy link

jacobg213 commented Jan 9, 2025

I recently started occasionally getting the same error from the Chrome extension (also an internal company website). I'm also on build 2024.12.4.
Stack:

VM34461 fido2-page-script.js:353 
FallbackRequestedError: FallbackRequested
    at EventTarget.onDestroyListener (VM34461 fido2-page-script.js:325:50)
    at _ZoneDelegate.invokeTask (zone.js:398:33)
    at _ZoneImpl.runTask (zone.js:158:47)
    at ZoneTask.invokeTask [as invoke] (zone.js:479:34)
    at invokeTask (zone.js:1109:18)
    at globalCallback (zone.js:1140:29)
    at EventTarget.globalZoneAwareCallback (zone.js:1173:16)
    at Messenger.<anonymous> (VM34461 fido2-page-script.js:353:28)
    at Generator.next (<anonymous>)
    at VM34461 fido2-page-script.js:233:71

It looks like an unhandled promise rejection in fido2-page-script.js:353

    /**
     * Cleans up the messenger by removing the message event listener
     */
    destroy() {
        return __awaiter(this, void 0, void 0, function* () {
            this.onDestroy.dispatchEvent(new Event("destroy"));
            if (this.messageEventListener) {
                yield this.sendDisconnectCommand();
                this.broadcastChannel.removeEventListener(this.messageEventListener);
                this.messageEventListener = null;
            }
        });
    }

that seems to be coming from fido2-page-script.js:324

            const destroyPromise = new Promise((_, reject) => {
                onDestroyListener = () => reject(new FallbackRequestedError());
                this.onDestroy.addEventListener("destroy", onDestroyListener);
            });

To produce this error I opened my Chrome on the website where I've seen it a few times, opened dev tools, locked my PC and waited a few minutes. It was there after unlocking again. Seems to be a problem with MessagePort cleanup?

@TexRx
Copy link

TexRx commented Jan 14, 2025

@jacobg213 another interesting aspect is that I've hidden Chrome extension errors from console (console > top > settings > 'Selected context only', but the fido2 error from BitWarden extension continues to appear in the console logs (these console settings DO work for other Chrome extension errors logged to console).

@jacobg213
Copy link

@TexRx Same happens to me. I don't know how extensions work exactly but if it's the postMessage call that's failing then I'm guessing it's using the top window and that's why it's visible... maybe? 😅

@kairauer
Copy link

kairauer commented Jan 17, 2025

I have the same console error, sometimes. I think it can only be reproduced on a Angular site (or other sites which are using zone.js):

Image

As you can see, the console.error(e) comes from zone.js. This script is not part of the Bitwarden extension, its inside the client bundle for my local Angular application. All uncaught errors are just displayed as a console.error.
When adding breakpoints, I can see that the FallbackRequestedError is created every time, but I dont get the console.error every time. I assume this is due to a race condition and the zone.js script isn't ready to execute the console.error logic when the error is created by the bitwarden extension.

I guess the fix would be to correctly catch the FallbackRequestedError within the bitwarden extension and handle it "somehow".
Updated today to version 2025.1.0 of the bitwarden chrome extension, same issue with that version.

@TexRx This also explains why the error still shows up when chrome extension error are hidden. The error itself is created from the zone.js script, which is not part of a chrome extension.

@DubiousDoggo @TexRx and @jacobg213 are you also having this issue on Angular sites?

@sysmat
Copy link

sysmat commented Jan 20, 2025

  • The same problem here:
  • stack:
Error: FallbackRequested
    at EventTarget.onDestroyListener (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:331:50)
    at f.invokeTask ( polyfills-YP52636E.js:1:7075)
    at X.runTask ( polyfills-YP52636E.js:1:2355)
    at T.invokeTask [as invoke] ( polyfills-YP52636E.js:1:8149)
    at M ( polyfills-YP52636E.js:1:15201)
    at $ ( polyfills-YP52636E.js:1:15497)
    at EventTarget.V ( polyfills-YP52636E.js:1:15755)
    at Messenger.<anonymous> (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:359:28)
    at Generator.next (<anonymous>)
    at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:237:71
    at new L ( polyfills-YP52636E.js:2:2232)
    at __awaiter (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:233:12)
    at Messenger.destroy (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:358:16)
    at destroy (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:612:28)
    at messenger.handler (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:626:13)
    at Messenger.<anonymous> (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:336:26)
    at Generator.next (<anonymous>)
    at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:237:71
    at new L ( polyfills-YP52636E.js:2:2232)
    at __awaiter (chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:233:12)
    at chrome-extension://nngceckbapebfimnlniiiahkandclblb/content/fido2-page-script.js:312:27

@jacobg213
Copy link

@kairauer Yep. It's an Angular site I'm mainly getting this on. I've seen it on other sites as well though.

@TexRx
Copy link

TexRx commented Jan 23, 2025

@kairauer @jacobg213 Yes! AFAIR, this is only happening on Angular sites.

@sudhir4ev
Copy link

I get this error on React sites as well.
Noticed in console during development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser Browser Extension bug
Projects
None yet
Development

No branches or pull requests

8 participants