diff --git a/apps/browser/src/popup/app.component.ts b/apps/browser/src/popup/app.component.ts index a0fea35b218..f83fc594205 100644 --- a/apps/browser/src/popup/app.component.ts +++ b/apps/browser/src/popup/app.component.ts @@ -213,7 +213,13 @@ export class AppComponent implements OnInit, OnDestroy { */ do { this.shouldRerunAuthRequestProcessing = false; - await this.processPendingAuthRequests(); + + try { + await this.processPendingAuthRequests(); + } catch (error) { + this.logService.error(`Error processing pending auth requests: ${error}`); + this.shouldRerunAuthRequestProcessing = false; // Reset flag to prevent infinite loop on persistent errors + } // If an "openLoginApproval" message was received while processPendingAuthRequests() was running, then // shouldRerunAuthRequestProcessing will have been set to true } while (this.shouldRerunAuthRequestProcessing); diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index 1e5b5102722..18a57b38df7 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -521,11 +521,16 @@ export class AppComponent implements OnInit, OnDestroy { */ do { this.shouldRerunAuthRequestProcessing = false; - await this.processPendingAuthRequests(); + + try { + await this.processPendingAuthRequests(); + } catch (error) { + this.logService.error(`Error processing pending auth requests: ${error}`); + this.shouldRerunAuthRequestProcessing = false; // Reset flag to prevent infinite loop on persistent errors + } // If an "openLoginApproval" message was received while processPendingAuthRequests() was running, then // shouldRerunAuthRequestProcessing will have been set to true } while (this.shouldRerunAuthRequestProcessing); - break; case "redrawMenu": await this.updateAppMenu();