capacitor-community / capacitor-community/electron

Unhandled Promise Rejection Error: ERR_FAILED (-2) loading

Open
#294 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
398
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.