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.

Auto-updater "Could not connect to the server" after downloading zip on macOS

See original GitHub issue
  • Electron-Builder Version: 23.0.0
  • Node Version: 16.13.2
  • Electron Version: 11.5.0
  • Electron Type (current, beta, nightly): current
  • Electron-Updater Version: 5.0.0
  • Target: mac arm64 + x64

electron-updater downloads the latest version and returns “Error: Could not connect to the server.” at the end of the download. The ZIP file is completely downloaded in cache folder, I can extract it and install it manually without any issue.

I tested it on Monterey 12.3 beta and Big Sur 11.6 and get the same problem on both versions (x64 version only).

Thanks for your help!

Updater logs:

04/03/2022, 11:30:49 - Checking for update
04/03/2022, 11:30:49 - Found version 0.9.82-prerelease (url: Danim Creator-0.9.82-prerelease-mac.zip, Danim Creator-0.9.82-prerelease.dmg)
04/03/2022, 11:30:51 - Downloading update from Danim Creator-0.9.82-prerelease-mac.zip, Danim Creator-0.9.82-prerelease.dmg
[ERROR] 04/03/2022, 11:30:51 - sysctl shell command to check for macOS Rosetta environment failed: Error: Command failed: sysctl sysctl.proc_translated
sysctl: unknown oid 'sysctl.proc_translated'

04/03/2022, 11:30:51 - Checked 'uname -a': arm64=false
04/03/2022, 11:30:51 - Cached update sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: 5gKaYa4hSxHMvHOTBF8Yp5M+K/DdQXRYpRp5CYBmM/z9LA5Bo2N/r3Qr+ge+K5nbiWq0BNdcPSDF7niPgU5f4w==, expected: QDwEAp2z57+/7pZhTjiHtbrMeIWkYLxQgCC2UapdJl/gEOoH6F9qmcw8g2mfy1xGbQLBIQrzKowNnK/+k9kQkQ==. Directory for cached update will be cleaned
04/03/2022, 11:30:59 - New version 0.9.82-prerelease has been downloaded to /Users/fadrien/Library/Application Support/Caches/danim-creator-updater/pending/Danim Creator-0.9.82-prerelease-mac.zip
04/03/2022, 11:30:59 - Proxy server for native Squirrel.Mac is closed (fileToProxy=https://s3-eu-west-3.amazonaws.com/com.danim.creator/build/yDyc9YNqe53kYuuaWp8ab5WmVcZWSbhw/Danim%20Creator-0.9.82-prerelease-mac.zip)
[ERROR] 04/03/2022, 11:30:59 - Could not connect to the server.: Error: Could not connect to the server.
[ERROR] 04/03/2022, 11:30:59 - Error: Error: Could not connect to the server.
[ERROR] 04/03/2022, 11:30:59 - Error: Error: Could not connect to the server.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

1reaction
suancommented, Sep 3, 2022

@mmaietta Thanks for the response. Indeed I am on the latest electron-updater 5.2.1. In my case I believe it’s something due to the upcoming MacOS 13 Ventura, as the exact same setup has no auto-update issues on MacOS Monterey and earlier.

I will create a new issue with my Electron versions, etc

1reaction
adriendurepairecommented, Mar 9, 2022

Could you please add additional logging to electron-updater and post back here? https://www.electron.build/auto-update#debugging

Here are more details with autoUpdater.logger.transports.file.level = 'debug':

[2022-03-09 12:46:37.437] [info]  Checking for update
[2022-03-09 12:46:37.735] [info]  Found version 0.9.82-prerelease (url: Danim Creator-0.9.82-prerelease-mac.zip, Danim Creator-0.9.82-prerelease.dmg)
[2022-03-09 12:46:39.501] [info]  Downloading update from Danim Creator-0.9.82-prerelease-mac.zip, Danim Creator-0.9.82-prerelease.dmg
[2022-03-09 12:46:39.502] [debug] Checking for macOS Rosetta environment
[2022-03-09 12:46:39.523] [warn]  sysctl shell command to check for macOS Rosetta environment failed: Error: Command failed: sysctl sysctl.proc_translated
sysctl: unknown oid 'sysctl.proc_translated'

[2022-03-09 12:46:39.523] [debug] Checking for arm64 in uname
[2022-03-09 12:46:39.544] [info]  Checked 'uname -a': arm64=false
[2022-03-09 12:46:39.546] [debug] updater cache dir: /Users/fadrien/Library/Application Support/Caches/danim-creator-updater
[2022-03-09 12:46:40.908] [info]  Update has already been downloaded to /Users/fadrien/Library/Application Support/Caches/danim-creator-updater/pending/Danim Creator-0.9.82-prerelease-mac.zip).
[2022-03-09 12:46:40.909] [debug] Creating proxy server for native Squirrel.Mac (fileToProxy=https://s3-eu-west-3.amazonaws.com/com.danim.creator/build/yDyc9YNqe53kYuuaWp8ab5WmVcZWSbhw/Danim%20Creator-0.9.82-prerelease-mac.zip)
[2022-03-09 12:46:40.910] [debug] Proxy server for native Squirrel.Mac is created (fileToProxy=https://s3-eu-west-3.amazonaws.com/com.danim.creator/build/yDyc9YNqe53kYuuaWp8ab5WmVcZWSbhw/Danim%20Creator-0.9.82-prerelease-mac.zip)
[2022-03-09 12:46:40.911] [debug] Proxy server for native Squirrel.Mac is starting to listen (fileToProxy=https://s3-eu-west-3.amazonaws.com/com.danim.creator/build/yDyc9YNqe53kYuuaWp8ab5WmVcZWSbhw/Danim%20Creator-0.9.82-prerelease-mac.zip)
[2022-03-09 12:46:40.918] [debug] Proxy server for native Squirrel.Mac is listening (address=http://127.0.0.1:54209, fileToProxy=https://s3-eu-west-3.amazonaws.com/com.danim.creator/build/yDyc9YNqe53kYuuaWp8ab5WmVcZWSbhw/Danim%20Creator-0.9.82-prerelease-mac.zip)
[2022-03-09 12:46:40.934] [info]  Proxy server for native Squirrel.Mac is closed (fileToProxy=https://s3-eu-west-3.amazonaws.com/com.danim.creator/build/yDyc9YNqe53kYuuaWp8ab5WmVcZWSbhw/Danim%20Creator-0.9.82-prerelease-mac.zip)
[2022-03-09 12:46:40.977] [warn]  Error: Could not connect to the server.
[2022-03-09 12:46:40.978] [error] Error: Error: Could not connect to the server.
[2022-03-09 12:46:40.981] [error] Error: Error: Could not connect to the server.
Read more comments on GitHub >

github_iconTop Results From Across the Web

AutoUpdater on Mac Not Connecting to Server
When I try and run it, on each update I am advised that the autoupdate cannot connect to the update server. Can anyone...
Read more >
Auto Update - electron-builder
Mac, otherwise latest-mac.yml cannot be created, which causes autoUpdater error. Default target for macOS is dmg + zip , so there is no...
Read more >
Auto-updates to Electron - Stack Overflow
I have a few questions: How do I debug the auto update feature? Do I setup a local connection and test through that...
Read more >
Automatic updates in Electron using Amazon S3 - Brainio Blog
Implementation of electron automatic updates functionality for macOS using Amazon S3 and electron-builder. How to code sign and notarize your app.
Read more >
electron-simple-updater - npm
It doesn't require a dedicated release server. ... Instead of built-in auto-updater, this method does not start downloading if autoDownload ...
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