[eric] browser: disable FedCM so Google sign-in buttons fall back to the classic popup Electron can actually drive; account chooser proven live on pinterest (ENG-238)

This commit is contained in:
ciregenz
2026-08-11 14:06:18 -07:00
parent 514c21e0ef
commit 5516c8d808
+5
View File
@@ -486,6 +486,11 @@ app.on('open-url', (event, url) => {
// (Chromium keeps painting invisible frames instead of pausing), zero impact when window is
// foreground. If this doesn't help, removing the flag is a one-line revert with no UX trace.
const _disabledFeatures = ['HardwareMediaKeyHandling'];
// Google's GSI sign-in button prefers FedCM, whose account-chooser UI Electron cannot render, so
// the click silently does NOTHING in a browser card (Eric reproduced on pinterest.com). With FedCM
// off, GSI falls back to its classic popup flow, which our popup-UA machinery already handles and
// which shows a normal Google sign-in page whether or not an account is signed in (ENG-238).
_disabledFeatures.push('FedCm');
if (process.platform === 'darwin') _disabledFeatures.push('MacWebContentsOcclusion');
app.commandLine.appendSwitch('disable-features', _disabledFeatures.join(','));
// disableHardwareAcceleration() was tried as a fallback but did not stop the 0xC0000005 crashes, confirming the segfault is not GPU-side. Dev mode (http origin) never crashed, packaged (file:// origin) always crashed, so the embedded localhost HTTP server (see startFrontendServer below) is the real fix and we keep GPU acceleration on.