Auto updater with s3 provider on a private bucket fails on electron 7.1.1.
See original GitHub issue- Version: 21.2.0
- electron: 7.1.1
- electron-updater: 4.2.0
- Target: macOS 10.15
Autoupdate with s3 fails.
autoUpdater.on("checking-for-update", () => {
log.info(updateLog, "Checking for update...");
let opts = {
service: 's3',
region: 'us-west-1',
host: 'abc.s3-us-west-1.amazonaws.com',
path: process.platform === 'win32' ? '/latest.yml' : '/latest-mac.yml'
}
aws4.sign(opts, {
accessKeyId: ACCESSKEY,
secretAccessKey: SECRETKEY,
})
autoUpdater.requestHeaders = opts.headers
});
autoUpdater.on("error", (ev, err) => {
log.error(updateLog, "Error in auto-updater: ", err);
});
package.json
"build": {
"publish": {
"provider": "s3",
"region": "us-west-1",
"bucket": "abc",
"acl": "private",
"channel": "latest",
"encryption": "AES256",
"publishAutoUpdate": "true"
},
},
This prints:
[info] [AUTOUPDATE] Checking for update...
[error] [AUTOUPDATE] Error in auto-updater: Cannot check for updates: Error: net::ERR_INVALID_ARGUMENT
[info] Handle rejected promise (Error: net::ERR_INVALID_ARGUMENT) here.
Works fine with:
- Version: 21.2.0
- electron: 6.0.4
- electron-updater: 4.2.0
Happy to contribute if you can point me in the right direction. Thanks
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Auto updater with s3 provider on a private bucket fails on ...
Auto updater with s3 provider on a private bucket fails on electron 7.1.1. · Version: 21.2.0 · electron: 6.0.4 · electron-updater: 4.2.0.
Read more >Auto Updater does not work for Amazon S3 private Bucket
My solution: I set the FeedUrl for autoUpdater autoUpdater.setFeedURL('https://[BUCKET].s3.[REGION].amazonaws.com');.
Read more >Auto Updater Does Not Work For Amazon S3 ... - ADocLib
It works with the electron-builder package and uses Amazon S3 as an auto update server. if you are developing a private application and...
Read more >Automatic updates in Electron using Amazon S3 - Brainio Blog
It works with the electron-builder package and uses Amazon S3 as an auto update server. The post also shows how to code sign...
Read more >electron auto update s3的推薦與評價, 網紅們這樣 ... - 最新趨勢觀測站
electron auto update s3 在Auto updater with s3 provider on a private bucket fails on ... 的相關結果. Version: 21.2.0; electron: 7.1.1; electron-updater: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is still broken on electron 8. Is there no way to use s3 with acl:private with updater? Thanks
I am using S3 with acl: private electron: 8.1 electron-updater: 4.2.4 target: nsis (windows 10)
I am setting the headers with aws4 signing and aws-sdk:
{Host: s3.region.amazonaws.com, 'X-Amx-Content-Sha256': XXXXXXXX, 'X-Amx-Date': 'YYYYMMDDTHHddmmZ', Authorization: 'AWS4-HMAC-SHA256 Credential=XXX, SignedHeareds=XXXX, Signature=XXXX'}
I have been doing some reading and everything points to changes introduced in how Electron implements net from version 7.
electron-updater using electron’s net: https://github.com/electron-userland/electron-builder/blob/c01b7c0b55d3466b826ea9cc9a11ad34118801c1/packages/electron-updater/src/electronHttpExecutor.ts#L54
I guess some agument passed in “options” is not valid, and we get the error in auto-updater: ERR_INVALID_ARGUMENT