electron-builder: Unable to publish assets to Github (ReleaseAsset asset_already_exists)
- Version: 20.38.4
- Target: mac/windows/linux
Since updating from 20.38.2 -> 20.38.4 electron-build has been unable to publish assets to a github release page. Downgrading to 20.38.2 resolves the issue.
It fails on publishing every asset from every os.
Here is an example: https://travis-ci.org/LN-Zap/zap-desktop/jobs/469993385#L2805
2018-12-19T13:21:03.988Z electron-builder Response: 422 Unprocessable Entity, request options: {
"hostname": "uploads.github.com",
"path": "/repos/LN-Zap/zap-desktop/releases/13734557/assets?name=ZapDesktop-linux-i386-v0.3.0-beta.deb",
"method": "POST",
"headers": {
"accept": "application/vnd.github.v3+json",
"Content-Type": "application/octet-stream",
"Content-Length": 52382742,
"authorization": "<stripped sensitive data>",
"User-Agent": "electron-builder",
"Cache-Control": "no-cache"
}
}
• async task error error=
422 Unprocessable Entity
{
"message": "Validation Failed",
"request_id": "E166:5EBB:2E3AE0:33E8F0:5C1A45BF",
"documentation_url": "https://developer.github.com/v3",
"errors": [
{
"resource": "ReleaseAsset",
"code": "already_exists",
"field": "name"
}
]
}
Headers: {
"cache-control": "no-cache",
"content-length": "211",
"content-security-policy": "default-src 'none'",
"content-type": "application/json; charset=utf-8",
"strict-transport-security": "max-age=31557600",
"x-accepted-oauth-scopes": "repo",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-media-type": "github.v3; format=json",
"x-oauth-scopes": "public_repo",
"x-xss-protection": "1; mode=block",
"date": "Wed, 19 Dec 2018 13:21:04 GMT",
"connection": "close",
"x-github-request-id": "E166:5EBB:2E3AE0:33E8F0:5C1A45BF"
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zap-desktop@0.3.0-beta package: `npm run build && npm run fetch-lnd && build "--publish" "onTagOrDraft" "--linux"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zap-desktop@0.3.0-beta package script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/travis/.npm/_logs/2018-12-19T13_21_04_026Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Script failed with status 1
failed to deploy
If I delete the existing assets from the draft github release and try again then it works, but only the first time. Every subsequent attempt fails with the same error ^.
Here are some other similar issues where this was reported in the past:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 26
Commits related to this issue
- Downgrade electron-builder to 20.38.2 See https://github.com/electron-userland/electron-builder/issues/3559 — committed to quadre-code/quadre by ficristo 5 years ago
- Downgrade electron-builder to 20.38.2 (#163) See https://github.com/electron-userland/electron-builder/issues/3559 — committed to quadre-code/quadre by ficristo 5 years ago
- downgrade electron-builder to 20.38.2 see electron-userland/electron-builder#3559 — committed to gongchat/gong by david-j-lee 5 years ago
- 🏗 Update electron-builder Reason: https://github.com/electron-userland/electron-builder/issues/3559 — committed to creativeschool/heptagon by deleted user 5 years ago
- Reverting builder due to regression https://github.com/electron-userland/electron-builder/issues/3559 — committed to jgraph/drawio-desktop by davidjgraph 3 years ago
- 👷 Reverting builder due to regression electron-userland/electron-builder#3559 — committed to xurei/hyperkeys by xurei 3 years ago
- revert to older version of electron-builder the latest versions won't replace an existing release file and fail with asset_already_exists https://github.com/electron-userland/electron-builder/issues/... — committed to molabsai/mo-desktop by holic 3 years ago
- Upgrade electron builder because of https://github.com/electron-userland/electron-builder/issues/3559 — committed to stereum-dev/ethereum-node by sapien99 2 years ago
- ADD: Validator password page (#307) * bump to 2.0.2 [skip ci] * bump to 2.0.2 [skip ci] * ADD:enter password to keyStore * bump to 2.0.3 [skip ci] * ADD: Validator key confirm password ... — committed to stereum-dev/ethereum-node by MaxTheGeeek 2 years ago
- ADD: new flags & animation (#327) * bump to 2.0.2 [skip ci] * Squashed commit of the following: commit 956cabd6922a6cc73d0988a4e3804a1eb3784357 Author: Michael Ferjancic <michael.ferjancic@gma... — committed to stereum-dev/ethereum-node by MaxTheGeeek 2 years ago
- Reverting builder due to regression https://github.com/electron-userland/electron-builder/issues/3559 — committed to Green-World115/Drawio-desktop by Green-World115 3 years ago
I’m having this exact issue in v23.3.3. (Replaced some sensitive data with ******)
@SupremeTechnopriest in my case, the release only existed as a draft release. In the past this has always worked and I thought this was the standard process.
Has this changed?
Same problem in v22.13.1 Last work version: 22.11.7
same issue came up upgrading from 22.11.7 to 22.13.1
I guess something did change because you can’t have the draft release created beforehand now. Electron builder creates it for you.
On Wed, Jan 30, 2019, 10:06 AM Henrique Dias <notifications@github.com wrote:
@mrfelton @TrevorSayre This isn’t a bug. The release you are trying to push already exists on github. You either have to bump your
package.jsonversion or delete the old release from github to overwrite the version.