Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Electron: Failed to load with error: ERR_NETWORK_ACCESS_DENIED on Windows #32088

Closed
3 tasks done
hyunbeomheo opened this issue Dec 2, 2021 · 3 comments
Closed
3 tasks done
Labels
blocked/need-repro Needs a test case to reproduce the bug bug 🪲

Comments

@hyunbeomheo
Copy link

hyunbeomheo commented Dec 2, 2021

Preflight Checklist

Electron Version

13.1.8

What operating system are you using?

Windows

Operating System Version

Windows 11 Pro 21H2 build 22000.318

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

The app will launch successfully.

Actual Behavior

The app failed to launch while loading a specific URI.

Testcase Gist URL

No response

Additional Information

Hello, developers.

Please read the logs below.

i 「wdm」: Compiled successfully.
(node:21816) electron: Failed to load URL: http://localhost:1212/index.html with error: ERR_NETWORK_ACCESS_DENIED
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:21816) UnhandledPromiseRejectionWarning: Error: ERR_NETWORK_ACCESS_DENIED (-138) loading 'http://localhost:1212/index.html'
    at rejectAndCleanup (electron/js2c/browser_init.js:213:985)
    at Object.failListener (electron/js2c/browser_init.js:213:1198)
    at Object.emit (events.js:315:20)
(node:21816) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21816) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:\projects\analysis-app> C:\projects\analysis-app\node_modules\electron\dist\electron.exe exited with signal SIGINT

I think It is not exactly an Electron's bug but I needed help from other developers using this framework.

In my opinion, this issue seems a permission issue of Windows.

I'm using Visual Studio Code and changed permission to run as an Administrator, however, it did not work.

I tried to google in so many ways but I couldn't find a hint.

How can I run the command inside of the IDE without a permission error?

Please share your experience.

Thanks for reading.

@alehchain
Copy link

Check if you are being blocked by a firewall, it depends on what has been added to the list of conditions and exceptions in the firewall table.

@nornagon
Copy link
Member

Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment.

Thanks in advance! Your help is appreciated.

@nornagon nornagon added the blocked/need-repro Needs a test case to reproduce the bug label Jan 28, 2022
@mrmotallebi
Copy link

mrmotallebi commented Jan 12, 2023

I'm having the same issue with an Electron app. How did you resolve this? (Sorry mentioned wrong person initially.)
@hyunbeomheo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/need-repro Needs a test case to reproduce the bug bug 🪲
Projects
None yet
Development

No branches or pull requests

4 participants