question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updater causes uncaught exception in the main process if download interrupted

See original GitHub issue
  • Version: electron-builder: 19.52.1 electron-updater: 2.18.2

  • Target: platform=win32 arch=x64

While the updater has a download in progress, have the download interrupted. I was testing locally using the http-server npm package, so I just terminated the server, but other interruptions like unplugging your network cable, disconnecting WiFi, putting your computer to sleep, should have the same effect.

The following dialog shows: image

[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: net::ERR_CONNECTION_RESET

[OK]

I have tried to catch the error unsuccessfully through the following methods:

  • updater.downloadUpdate(...).then(...).catch(function(error) { ... }
  • updater.signals.emitter.addListener("error", function(error) { ... }

It can be caught by putting process.on('uncaughtException', function (error) { ... }, in NodeJS’s entry .js file, but there is no more context to the error than what you see above, so there is no way to determine that the error came from the updater. image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
gbodeencommented, Nov 6, 2019

I ran into the problem today also. It remains unresolved and I’ve found no way to catch and handle the error graciously.

0reactions
Evilucommented, Jan 7, 2020

This issue should NOT be closed, I ran the exact same issue with "electron-updater": "4.2.0". if the latest.yml file on my s3 bucket is deleted, all the clients will receive this message.

The only way to avoid this is to listen to the uncaughtException events of node. A little risky practice.

EDITED: just update to electron 7.1.7. the error will be passed as an updater error event as intended.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the Unhandled Exception Has Occurred Error on ...
Step-3: In the Windows Update section, click on Check for updates. Update and install if any updates are present. Updates Step-4: You should ......
Read more >
A Javascript Error Occurred in the Main Process Windows 10 ...
There aren't many determined causes for this problem and most ... in the main process, Uncaught Exception that is triggered when they try...
Read more >
Javascript error upon turning on Teams. Failed to get ...
Javascrip error occurred in the main process. Uncaught Exception: Error: Failed to get 'download' path. We tried to uninstalled Teams, ...
Read more >
Fatal Error: What It Is and How to Fix It - Lifewire
Update the software. The developers may have released a patch designed to fix the specific problem. Most programs and apps either download and ......
Read more >
XPC connection interrupted | Apple Developer Forums
An XPC connection is interrupted when the remote process terminates. ... app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found