Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix app load blocked due to key load failure

Abhinav12ab5bc8a811
diff --git a/apps/photos/src/pages/index.tsx b/apps/photos/src/pages/index.tsx
index 08730aef86..98f528e3ff 100644
--- a/apps/photos/src/pages/index.tsx
+++ b/apps/photos/src/pages/index.tsx
@@ -132,7 +132,11 @@ export default function LandingPage() {
const user = getData(LS_KEYS.USER);
let key = getKey(SESSION_KEYS.ENCRYPTION_KEY);
if (!key && isElectron()) {
- key = await ElectronAPIs.getEncryptionKey();
+ try {
+ key = await ElectronAPIs.getEncryptionKey();
+ } catch (e) {
+ logError(e, 'getEncryptionKey failed');
+ }
if (key) {
await saveKeyInSessionStore(
SESSION_KEYS.ENCRYPTION_KEY,