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

macOS Auto updater using old update #1200

Closed
Timer opened this issue Feb 2, 2017 · 3 comments · May be fixed by qcif/data-curator#563
Closed

macOS Auto updater using old update #1200

Timer opened this issue Feb 2, 2017 · 3 comments · May be fixed by qcif/data-curator#563

Comments

@Timer
Copy link

Timer commented Feb 2, 2017

See log for details, but the auto updater is installing a stale (old) update:

Version 1.0.15 downloads update 1.0.16 but then proceeds to use update 1.0.15 instead of 1.0.16. I've re-opened and re-ran 10x times -- doesn't seem to be a fluke.

Josephs-MacBook-Pro:/ joe$ ./Applications/app.app/Contents/MacOS/app
Wait for app ready
Checking for update
Found version 1.0.16 (url: https://s3.amazonaws.com/app/app-1.0.16-mac.zip)
Downloading update from https://s3.amazonaws.com/app/app-1.0.16-mac.zip
2017-02-02 02:17:34.230 app[85494:2941123] Download completed to: file:///Users/joe/Library/Caches/com.app.ShipIt/update.ZKND6Jl/app-1.0.15-mac.zip
New version 1.0.16 has been downloaded

Removing app-1.0.15-mac.zip from the S3 bucket results in the following error:

Josephs-MacBook-Pro:/ joe$ ./Applications/app.app/Contents/MacOS/app
Wait for app ready
Checking for update
Found version 1.0.16 (url: https://s3.amazonaws.com/app/app-1.0.16-mac.zip)
Downloading update from https://s3.amazonaws.com/app/app-1.0.16-mac.zip
{ Error: Update download failed. The server sent an invalid response. Try again later.
  preventDefault: [Function: preventDefault],
  sender: 
   AutoUpdater {
     _events: { error: [Function], 'update-downloaded': [Function] },
     _eventsCount: 2 } }
Error: Error: Update download failed. The server sent an invalid response. Try again later.

Is the mac-latest.json being cached somewhere and telling it to download app-1.0.15-mac.zip?


electron-updater 1.3.2
electron-builder 12.2.2
... just upgraded from 1.3.1 and 12.0.3

@develar
Copy link
Member

develar commented Feb 2, 2017

It seems that native Squirrel.Mac caches update json.

You can set autoUpdater.requestHeaders = {"Cache-Control": "no-cache"} as workaround.

@develar develar changed the title bug: Auto updater using old update macOS Auto updater using old update Feb 2, 2017
@develar develar closed this as completed in 4e63640 Feb 2, 2017
@develar
Copy link
Member

develar commented Feb 2, 2017

Published as 1.4.1

@Timer
Copy link
Author

Timer commented Feb 2, 2017

Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants