blockmap Forbidden - autoUpdater - private S3 bucket
See original GitHub issue- Version: 20.44.4
- Target: Windows
I am getting this error after removing public access from my S3 bucket through the AWS console. It also happens when I grant full public access to the bucket and use ‘acl’: ‘private’ in my publish config.
cannot download differentially, fallback to full download:
Error: Cannot download "https://mybucket.s3.amazonaws.com/releases/electron/win/MyApp%20Setup%200.0.6.exe.blockmap", status 403: Forbidden
The actual Setup file seems to download fine.
It is a private repository but I have given my AWS user FullS3Access and it still doesn’t work.
Is this the problem?: It can see that the aws region is missing from my autoUpdater blockmap requests:
Download block maps (old: "https://mybucket.s3.amazonaws.com/releases/electron/win/MyApp%20Setup%200.0.6.exe.blockmap", new: https://mybucket.s3.amazonaws.com/releases/electron/win/MyApp%20Setup%200.0.7.exe.blockmap)
The files are actually located at:
https://mybucket.s3-eu-west-1.amazonaws.com/releases/electron/win/MyApp+Setup+0.0.6.exe.blockmap
So the region is being added correctly to my autoUpdater.requestHeaders but I have no control over the blockmap request urls.
I am using aws4 to sign my request headers.
Issue Analytics
- State:
- Created 4 years ago
- Comments:28 (2 by maintainers)
Top GitHub Comments
I also had this issue during developing. It’s not a solution but I end up using aws-sdk to download my file if electron-updater found any updated version in my private S3. Note: This will not utilize the blockmap to download the updated app, so it might take a few more seconds to download your app. You will also need to run the installer manually to trigger that update, I did it with child_process.spawn.
First, disable autoDownload:
and the download looks something like this:
Were you able to find out how to achieve it for a private s3 bucket? It’s still not working for me. @stuartcusackie @develar @mayankvadia @justinwaite ?