Autoupdate using DigitalOcean returns 403 AccessDenied error. Request does not use environment variables.
See original GitHub issue- Version: 20.28.4
- Target: macOS
I am using DigitalOcean as my autoupdate provider. I can publish successfully to a private space using the DO_KEY_ID and the DO_SECRET_KEY environment variables.
However, when I check for updates I receive a 403 Forbidden error.
Package json:
...
"build": {
"publish": [
{
"provider": "spaces",
"channel": "latest",
"name": "abv2",
"region": "ams3",
"path": "latest",
"acl": "private"
}
]
},
...
dev-app-update.yml:
provider: "spaces"
channel: "latest"
name: "abv2"
region: "ams3"
path: "latest"
acl: "private"
I have followed the stack trace to check the request headers and I don’t see anything relating to digital ocean authorisation credentials. I don’t think the key and secret are being used in the request to the spaces bucket.
[10:37:43.123] [info] Checking for update
[10:37:43.520] [error] Error: HttpError: 403 Forbidden
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>AccessDenied</Code><BucketName>abv2</BucketName><RequestId>tx000000000000012b8fb86-005bb33c67-b0fade-ams3a</RequestId><HostId>b0fade-ams3a-ams3</HostId></Error>"
Headers: {
"accept-ranges": [
"bytes"
],
"content-length": [
"211"
],
"content-type": [
"application/xml"
],
"date": [
"Tue, 02 Oct 2018 09:37:43 GMT"
],
"strict-transport-security": [
"max-age=15552000; includeSubDomains; preload"
],
"x-amz-request-id": [
"tx000000000000012b8fb86-005bb33c67-b0fade-ams3a"
]
}
at createHttpError (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:32:10)
at IncomingMessage.stream.on (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:171:18)
at emitNone (events.js:106:13)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
From previous event:
at CancellationToken.createPromise (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/CancellationToken.ts:51:12)
at ElectronHttpExecutor.doApiRequest (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:84:30)
at ElectronHttpExecutor.request (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:74:17)
at GenericProvider.httpRequest (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/providers/Provider.ts:29:26)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/providers/GenericProvider.ts:24:45
at Generator.next (<anonymous>)
From previous event:
at GenericProvider.getLatestVersion (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/providers/GenericProvider.ts:18:25)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:345:25
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at MacUpdater.getUpdateInfo (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:335:32)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:349:35
at Generator.next (<anonymous>)
From previous event:
at MacUpdater.doCheckForUpdates (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:348:34)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:287:25
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at MacUpdater._checkForUpdates (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:282:33)
at MacUpdater.checkForUpdates (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:221:35)
at EventEmitter.<anonymous> (/Users/paul/Spikes/electron-updating/main.js:66:15)
at emitOne (events.js:116:13)
at EventEmitter.emit (events.js:211:7)
at WebContents.<anonymous> (/Users/paul/Spikes/electron-updating/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:286:13)
at emitTwo (events.js:126:13)
at WebContents.emit (events.js:214:7)
{ HttpError: 403 Forbidden
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>AccessDenied</Code><BucketName>abv2</BucketName><RequestId>tx000000000000012b8fb86-005bb33c67-b0fade-ams3a</RequestId><HostId>b0fade-ams3a-ams3</HostId></Error>"
Headers: {
"accept-ranges": [
"bytes"
],
"content-length": [
"211"
],
"content-type": [
"application/xml"
],
"date": [
"Tue, 02 Oct 2018 09:37:43 GMT"
],
"strict-transport-security": [
"max-age=15552000; includeSubDomains; preload"
],
"x-amz-request-id": [
"tx000000000000012b8fb86-005bb33c67-b0fade-ams3a"
]
}
at createHttpError (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:32:10)
at IncomingMessage.stream.on (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:171:18)
at emitNone (events.js:106:13)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
From previous event:
at CancellationToken.createPromise (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/CancellationToken.ts:51:12)
at ElectronHttpExecutor.doApiRequest (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:84:30)
at ElectronHttpExecutor.request (/Users/paul/Spikes/electron-updating/node_modules/builder-util-runtime/src/httpExecutor.ts:74:17)
at GenericProvider.httpRequest (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/providers/Provider.ts:29:26)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/providers/GenericProvider.ts:24:45
at Generator.next (<anonymous>)
From previous event:
at GenericProvider.getLatestVersion (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/providers/GenericProvider.ts:18:25)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:345:25
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at MacUpdater.getUpdateInfo (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:335:32)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:349:35
at Generator.next (<anonymous>)
From previous event:
at MacUpdater.doCheckForUpdates (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:348:34)
at /Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:287:25
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
at MacUpdater._checkForUpdates (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:282:33)
at MacUpdater.checkForUpdates (/Users/paul/Spikes/electron-updating/node_modules/electron-updater/src/AppUpdater.ts:221:35)
at EventEmitter.<anonymous> (/Users/paul/Spikes/electron-updating/main.js:66:15)
at emitOne (events.js:116:13)
at EventEmitter.emit (events.js:211:7)
at WebContents.<anonymous> (/Users/paul/Spikes/electron-updating/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:286:13)
at emitTwo (events.js:126:13)
at WebContents.emit (events.js:214:7)
statusCode: 403,
description: '<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><BucketName>abv2</BucketName><RequestId>tx000000000000012b8fb86-005bb33c67-b0fade-ams3a</RequestId><HostId>b0fade-ams3a-ams3</HostId></Error>',
name: 'HttpError' }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:14
Top Results From Across the Web
403 Forbidden error - DigitalOcean
A 403 error indicates that: the user made a valid request but the server is refusing to serve the request, due to a...
Read more >sitemap-questions-0.xml - Stack Overflow
https://stackoverflow.com/questions/9/how-do-i-calculate-someones-age- ... -a-way-to-change-the-environment-variables-of-another-process-in-unix 2022-12-24 ...
Read more >Change Log for Plesk Obsidian
Note: It is possible to install only those extensions that do not require ... This error code will be returned to a 3rd-party...
Read more >Frequently Asked Questions (FAQs) - Snap Creek Software
FAQ Contents. Management, Sales, licensing and plugin setup. Create Backup, Package creation in the WordPress admin. Install Backup, Install/Importing your ...
Read more >How to Set Up ModSecurity with Nginx on Debian/Ubuntu
This tutorial shows how to install and use ModSecurity with Nginx on ... your Nginx web server should return a 403 forbidden error...
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
Finally got DigitalOcean Spaces working with electron-updater. An example is here: https://github.com/natearmagost/electron-updater-digitalocean-example
It looks like
DO_KEY_ID
andDO_SECRET_KEY
are only used in the publishing process. Both"acl": "private"
and"acl": "public-read"
need the keys to publish.But auto-updating private files doesn’t work because the keys are never sent in the update process. You probably wouldn’t want the keys in the asar file anyway.
So its either set
"acl": "private"
, do a publish, login to DigitalOcean and set the files to Public when you are ready to release,or set
"acl": "public-read"
, do a publish, and the files are available to users right away.I never did get a local update working with
dev-app-update.yml
, which is why I went the route of creating the smallest possible project to test in the link above.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.