electron-userland/electron-builder

Error: Request timed out on app update on Mac

Closed this issue · 7 comments

Specs

  • Versions:
"electron": "^8.0.3",
"electron-builder": "^22.4.0",
  • Target:
Mac

Issue

Hi. I'm facing some serious problems with electron-builder when autoupdating my app.

After running the app, it searches for new update and automatically starts downloading it. This works fine: more and more bytes are downloaded, connection is stable and speed is quite good (4 - 7 Mb/s).

image

But on the bottom of the console, you'll se an error. It occurs every time and always after about 45 seconds.

I'm also attaching log from autoupdater:

[2020-03-06 13:54:46.250] [error] Error: Error: Request timed out
    at Timeout.n [as _onTimeout] (/Applications/PureDesktopApp.app/Contents/Resources/app.asar/dist/main.js:1:67792)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

It looks like you need to have quite fast internet connection, enough to download the whole update in 45 sec. There are no issues on linux and windows as they support differential download which can be easily downloaded in 45 seconds even when having slow connection.

Hi, I just encountered the same error and I found what's causing this. I haven't proposed a fix yet, but take a look at my comments on this PR: #4649

To me it happens after around 30s (which is the timeout value set for aborting the request after receiving the close-event).

The same issue happens also on other platforms (at least on Windows, but I suspect it affects all platforms). Reverting electron-updater back to version 4.2.2 fixes the issue.

Thank you so much @pverscha. Shame there's no real solution for that, but this is a nice workaround.

Is 7b8fa16 related?

@kanasimi, it is related. That's the commit that reverts the changes that caused this issue in the first place

Hi, everybody

I have the same issue on linux.

    "electron": "8.2.0",
    "electron-builder": "22.5.1"
    "electron-updater": "4.3.0"
06:38:58.233 › Checking for update
06:39:01.549 › Found version 0.1.3-226 (url: App.AppImage)
06:39:01.553 › Downloading update from App.AppImage
06:39:01.622 › No cached update info available
06:39:01.881 › File has 2674 changed blocks
06:39:01.990 › Full: 74,723.03 KB, To download: 54,840.58 KB (73%)
06:39:02.001 › Differential download: https://***/app/App.AppImage
06:39:32.038 › Cannot download differentially, fallback to full download: Error: Request timed out
    at Timeout.r [as _onTimeout] (/tmp/.mount_appmjpgzX/resources/app.asar/build/main.bundle.js:1:211914)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
06:40:02.166 › Error: Error: Request timed out
    at Timeout.r [as _onTimeout] (/tmp/.mount_appmjpgzX/resources/app.asar/build/main.bundle.js:1:211914)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
(node:2778) UnhandledPromiseRejectionWarning: Error: Request timed out
    at Timeout.r [as _onTimeout] (/tmp/.mount_appmjpgzX/resources/app.asar/build/main.bundle.js:1:211914)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
(node:2778) UnhandledPromiseRejectionWarning: Error: Request timed out
    at Timeout.r [as _onTimeout] (/tmp/.mount_appmjpgzX/resources/app.asar/build/main.bundle.js:1:211914)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
stale commented

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

I faced the same error. Upgrading to electron-builder 22.9.1 solved the problem.