403 error while trying to download update from S3.
See original GitHub issue- Version: 22.3.6
- Electron Version: 7.1.13
- Electron Type (current, beta, nightly):
- electron-updater: v4.2.0
- Target: dmg
My app is successfully detecting that there is an update available, but returns a 403 error
when it tries to fetch the mac.zip
file for download. The file exists in S3. Does the code need an Apple Developer signature before it can be downloaded or something?
Error:
error: Error in auto-updater. Error: Cannot download "https://bucket-name.s3.amazonaws.com/app-15.0.0-mac.zip", status 403: Forbidden
Code
const opts = {
service: 's3',
method: 'GET',
region: 'us-east-1',
host: 'bucket.s3.us-east-1.amazonaws.com',
path: process.platform === 'win32' ? '/latest.yml' : '/latest-mac.yml'
};
aws4.sign(opts, {
accessKeyId: process.env.UPDATER_AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.UPDATER_AWS_SECRET_ACCESS_KEY
});
autoUpdater.requestHeaders = opts.headers;
if (isDev) {
autoUpdater.updateConfigPath = path.join(
__dirname,
'../../dev-app-update.yml'
);
autoUpdater.checkForUpdates();
} else {
autoUpdater.checkForUpdatesAndNotify();
}
autoUpdater.on('checking-for-update', () => {
logger.info('Checking for update...');
});
autoUpdater.on('update-available', () => {
logger.info('Update available.');
});
autoUpdater.on('update-not-available', () => {
logger.info('Update not available.');
});
autoUpdater.on('error', err => {
logger.error(`Error in auto-updater. ${err}`);
});
autoUpdater.on('download-progress', progressObj => {
let logMessage = `Download speed: ${progressObj.bytesPerSecond}`;
logMessage = `${logMessage} - Downloaded ${progressObj.percent}%`;
logMessage = `${logMessage} (${progressObj.transferred}/${progressObj.total})`;
logger.info(logMessage);
});
autoUpdater.on('update-downloaded', () => {
logger.info('Update downloaded');
});
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Getting 403 forbidden from s3 when attempting to download a ...
The problem here stems from how you get the files into the bucket. Specifically the credentials you have and ...
Read more >Troubleshoot 403 Access Denied errors from Amazon S3
Use the AWS Systems Manager automation documents · Check bucket and object ownership · Check the bucket policy or IAM user policies ·...
Read more >Resolve Access Denied errors from a CloudFront distribution ...
I'm using an S3 website endpoint as the origin of my CloudFront distribution. Why am I getting 403 Access Denied errors?
Read more >How to Fix the Error HTTP 403: Access Denied from Amazon S3
If you are getting the 403 Forbidden error when connecting to Amazon S3 storage check if your access key ID has permission to...
Read more >How do I troubleshoot 403 Access Denied errors from Amazon ...
Skip directly to the demo: 0:31For more details see the Knowledge Center article with this video: ...
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
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.
@annd22 Great, really appreciate your help, I’ll try