Skip to main content

GAMES.GG Desktop 1.0.7 – Electron preload bridge is broken; Sign In, external links, manual update and GAMES+ do not work

GAMES.GG Desktop 1.0.7 appears to have a broken Electron preload bridge.

Symptoms:

  • The application starts and the normal UI/navigation is rendered.

  • Home / GAMES+ shows: "We couldn't load GAMES+ right now. Check your connection and try again."

  • The same account and GAMES+ work normally on games.gg in Chrome.

  • Clicking "Sign in" in Settings does absolutely nothing.

  • Clicking "Open" for Terms of Service / Privacy Policy does absolutely nothing.

  • Clicking "Check for updates" does absolutely nothing.

  • The Settings page displays: "GAMES.GG Desktop v1.0.0" even though the actually installed version is 1.0.7.

  • The automatic update check in the Electron main process works and reports: "Update for version 1.0.7 is not available (latest version: 1.0.7, downgrade is disallowed)."

Troubleshooting already performed:

  • Complete clean uninstall/reinstall.

  • Removed old installation remnants and Electron app data.

  • Rebooted Windows.

  • Installed the latest version again to the default location.

  • Overwolf Electron Troubleshooter reports no relevant system/network/runtime issues.

  • Network, certificates, WebView2, permissions, antivirus checks, Overwolf packages, overlay package, etc. initialize successfully.

  • The same issue remains after a completely clean installation.

I inspected the distributed GAMES.GG Desktop 1.0.7 app.asar.

package.json contains:

"version": "1.0.7" "electronVersion": "39.8.13"

In dist/main.js, the BrowserWindow is created with:

webPreferences: { preload: path.join(__dirname, "preload.js"), contextIsolation: true, nodeIntegration: false, sandbox: true, ... }

However, dist/preload.js starts with:

const electron_1 = require("electron"); const json_1 = require("./shared/json");

This is the apparent cause of the issue.

The preload runs in Electron sandbox mode, but it tries to load a relative local CommonJS module:

require("./shared/json")

Sandboxed Electron preload scripts use a restricted require() and cannot load arbitrary local CommonJS modules this way. The local helper should be bundled/inlined into the preload instead.

This failure happens before:

contextBridge.exposeInMainWorld("gamesggOverwolf", bridge);

Therefore window.gamesggOverwolf is never exposed to the renderer.

This exactly matches the observed behaviour.

For example, the renderer uses bridge calls such as:

window.gamesggOverwolf?.signIn?.() window.gamesggOverwolf?.checkForUpdates?.() window.gamesggOverwolf?.openExternal?.(...)

Since gamesggOverwolf is undefined, optional chaining causes these button actions to silently do nothing.

There is also a very useful visible confirmation:

The Settings renderer uses the bridge version and falls back to "1.0.0" if the bridge is unavailable.

The actual installed package is 1.0.7, but Settings displays "GAMES.GG Desktop v1.0.0".

That strongly confirms that window.gamesggOverwolf was never exposed.

I locally tested a modified preload where the JSON type-guard helpers from ./shared/json are inlined directly into preload.js instead of using the relative require(). This preserves sandbox: true and allows the preload to continue to contextBridge.exposeInMainWorld().

Suggested fix:

Bundle/in-line the functions required from dist/shared/json.js into the preload bundle, so the final preload.js has no relative CommonJS require() calls while sandbox: true is enabled.

The relevant helpers currently used by preload.js are:

  • isBoolean

  • isJsonObject

  • isNumber

  • isString

I would not recommend disabling the Electron sandbox as the permanent fix. Bundling the preload into a single sandbox-compatible file would be preferable.

Environment:

  • GAMES.GG Desktop / GAMES.GG Guides 1.0.7

  • Electron 39.8.13

  • Windows

3 comments

Log in to comment and vote

Comments3

  • G3 Support

    Team•

    Sep 22

    Hi @Raadush thanks for flagging and reporting it.

    The fixed version (1.0.9) is going through release now and should be live within the next day or two. Once it's out, the app should update itself, or you can install the new version over the current one. No clean reinstall is needed this time.

  • Raadush

    •

    Sep 22

    [3016:0922/091318.136:INFO:CONSOLE:2] "Unable to load preload script: C:\Users\radek\AppData\Local\Programs\GAMES.GG Guides\resources\app.asar\dist\preload.js", source: node:electron/js2c/sandbox_bundle (2)

    [3016:0922/091318.136:INFO:CONSOLE:2] "Error: module not found: ./shared/json", source: node:electron/js2c/sandbox_bundle (2)

  • Raadush

    •

    Sep 22

    Additional finding:

    I attempted to test the suspected preload fix locally by replacing the relative require("./shared/json") with equivalent inlined helper functions.

    However, a modified app.asar cannot be runtime-tested in the distributed Windows build because Overwolf Electron enables ASAR integrity validation / OnlyLoadAppFromAsar. After modifying app.asar, the application terminates at startup because the archive no longer matches the integrity hash embedded in the signed executable.

    Therefore I could not runtime-confirm the patched preload using the production binary. A developer-signed/rebuilt version is required to test the fix.

    The static issue in the distributed 1.0.7 archive remains:

    BrowserWindow: contextIsolation: true nodeIntegration: false sandbox: true preload: .../preload.js

    dist/preload.js: const electron_1 = require("electron"); const json_1 = require("./shared/json");

    Electron's sandboxed preload require() only supports a restricted set of modules and cannot load arbitrary relative CommonJS modules. The preload should be bundled into a single sandbox-compatible file.

    If this require fails before contextBridge.exposeInMainWorld("gamesggOverwolf", bridge), it would explain all observed symptoms:

    • Sign in silently does nothing

    • Open external links silently does nothing

    • Check for updates silently does nothing

    • Settings falls back to v1.0.0 while the installed package is actually v1.0.7

    • other gamesggOverwolf bridge-dependent functionality fails