#294·electron

Unhandled Promise Rejection Error: ERR_FAILED (-2) loading

Author: keithfawcettCreated Aug 28, 2024Updated Feb 18, 2025

Describe the bug The app is throwing this error when attempting to launch it a second time or when attempting to launch it via a Deep Link in Windows. This only happens when DeepLink is enabled in capacitor.config.js.

I have not tested in other OSes.

Unhandled Promise Rejection Error: ERR_FAILED (-2) loading 'capacitor-electron://-' at rejectAndCleanup (node:electron/js2c/browser_init:2:85056) at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:85443) at WebContents.emit (node:events:513:28)

To Reproduce Attempt to launch the app a second time via executable or through a deep link.

Expected behavior The second instance should close without an error.

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: Electron Community version 5.0.1

Source: capacitor-community/electron