Web app crashes when embedded in another Electron app because window.ea is assumed to exist
Author: princinvCreated Sep 16, 2026Updated Sep 16, 2026
Version Used
19.0.1 web/web app (PWA)
Current Behavior
When the Super Productivity web app is embedded in another Electron application, it remains indefinitely on the loading screen. Super Productivity detects Electron from the host application's user agent and attempts to call its own Electron preload API, but window.ea does not exist in the foreign Electron host. Startup aborts with Cannot read properties of undefined (reading 'isGnomeWayland').
Expected Behavior
The web app should run normally when embedded in another Electron application. Electron-specific APIs should only be used when Super Productivity's own preload bridge is actually available.
Steps to Reproduce
- Open https://app.super-productivity.com inside an Electron belonging to another application. In my case this is Obsidian with the Custom Frames plugin.
- The webview user agent contains Electron/....
- Super Productivity remains on its loading screen.
- DevTools reports Cannot read properties of undefined (reading 'isGnomeWayland') from app.constants.ts.
- typeof window.ea returns "undefined".
- Removing the Electron/... token from the webview user agent and reloading immediately allows Super Productivity to load normally.
Can you reproduce this reliably?
Yes, I can reproduce it reliably.
Console Output
Uncaught TypeError: Cannot read properties of undefined (reading 'isGnomeWayland')
at app.constants.ts:22:58
at chunk-PE6UJDCZ.js:1:835
at main.ts:16:1
at chunk-PE6UJDCZ.js:1:902
at main.ts:593:4
Environment test:
navigator.userAgent contains:
Electron/43.3.0
typeof window.ea === "undefined"
Confirmed workaround:
const ua = webview.getUserAgent().replace(/\sElectron\/[^\s]+/i, '');
webview.setUserAgent(ua);
webview.reload();
After changing the user agent, Super Productivity loads normally.Documentation
Source: super-productivity/super-productivity