diff --git a/libs/importer/src/services/import.service.ts b/libs/importer/src/services/import.service.ts index e868a5ac516..da080bacaad 100644 --- a/libs/importer/src/services/import.service.ts +++ b/libs/importer/src/services/import.service.ts @@ -10,6 +10,7 @@ import { CollectionView, } from "@bitwarden/admin-console/common"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; +import { DeviceType } from "@bitwarden/common/enums"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service"; import { PinServiceAbstraction } from "@bitwarden/common/key-management/pin/pin.service.abstraction"; @@ -144,7 +145,22 @@ export class ImportService implements ImportServiceAbstraction { const capabilities$ = combineLatest([type$, browserEnabled$]).pipe( map(([type, enabled]) => { let loaders = availableLoaders(type, client); - if (!enabled) { + + let isUnsupported = false; + + if (enabled && type === "bravecsv") { + try { + const device = this.system.environment.getDevice(); + const isWindowsDesktop = device === DeviceType.WindowsDesktop; + if (isWindowsDesktop) { + isUnsupported = true; + } + } catch { + isUnsupported = true; + } + } + // If the feature flag is disabled, or if the browser is unsupported, remove the chromium loader + if (!enabled || isUnsupported) { loaders = loaders?.filter((loader) => loader !== Loader.chromium); }