mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
[PM-5796] Improve desktop biometric browser integration error handling (#7727)
* Re-register native messaging host integrations on startup * Check for errors when generating the manifests * Add log to component * Switch to Promise.all * Add injectable service
This commit is contained in:
@@ -291,12 +291,20 @@ export class Main {
|
||||
this.powerMonitorMain.init();
|
||||
await this.updaterMain.init();
|
||||
|
||||
if (
|
||||
(await this.stateService.getEnableBrowserIntegration()) ||
|
||||
(await firstValueFrom(
|
||||
this.desktopAutofillSettingsService.enableDuckDuckGoBrowserIntegration$,
|
||||
))
|
||||
) {
|
||||
const [browserIntegrationEnabled, ddgIntegrationEnabled] = await Promise.all([
|
||||
this.stateService.getEnableBrowserIntegration(),
|
||||
firstValueFrom(this.desktopAutofillSettingsService.enableDuckDuckGoBrowserIntegration$),
|
||||
]);
|
||||
|
||||
if (browserIntegrationEnabled || ddgIntegrationEnabled) {
|
||||
// Re-register the native messaging host integrations on startup, in case they are not present
|
||||
if (browserIntegrationEnabled) {
|
||||
this.nativeMessagingMain.generateManifests().catch(this.logService.error);
|
||||
}
|
||||
if (ddgIntegrationEnabled) {
|
||||
this.nativeMessagingMain.generateDdgManifests().catch(this.logService.error);
|
||||
}
|
||||
|
||||
this.nativeMessagingMain.listen();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user