Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing app on appveyor fails ungracefully when asset has already been published #2337

Closed
imolorhe opened this issue Nov 26, 2017 · 2 comments
Labels

Comments

@imolorhe
Copy link

imolorhe commented Nov 26, 2017

electron-builder: v19.46.4

  • Target: windows

Error:

Downloading winCodeSign-1.9.0, please wait
Building nsis installer (x64)
Downloading nsis-3.0.1.13, please wait
Downloading nsis-resources-3.3.0, please wait
Publishing to Github (owner: imolorhe, project: altair, version: 1.5.3)
Uploading altair-setup-1.5.3.exe to GitHub
HttpError: 422 Unprocessable Entity
{
  "message": "Validation Failed",
  "request_id": "04F8:51E5:9A558A:A5FEBF:5A1A0706",
  "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-github-request-id": "04F8:51E5:9A558A:A5FEBF:5A1A0706",
  "x-oauth-scopes": "repo",
  "x-xss-protection": "1; mode=block",
  "date": "Sun, 26 Nov 2017 00:12:54 GMT",
  "connection": "close"
}
    at HttpError (C:\projects\altair\node_modules\builder-util\node_modules\builder-util-runtime\src\httpExecutor.ts:50:5)
    at createHttpError (C:\projects\altair\node_modules\builder-util\node_modules\builder-util-runtime\src\httpExecutor.ts:29:10)
    at IncomingMessage.response.on.e (C:\projects\altair\node_modules\builder-util\node_modules\builder-util-runtime\src\httpExecutor.ts:146:18)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
    at CancellationToken.createPromise (C:\projects\altair\node_modules\electron-builder\node_modules\builder-util-runtime\src\CancellationToken.ts:51:5)
    at NodeHttpExecutor.doApiRequest (C:\projects\altair\node_modules\builder-util\node_modules\builder-util-runtime\src\httpExecutor.ts:79:30)
    at C:\projects\altair\node_modules\electron-publish\src\gitHubPublisher.ts:144:35
    at next (native)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at GitHubPublisher.doUpload (C:\projects\altair\node_modules\electron-publish\out\gitHubPublisher.js:188:11)
    at C:\projects\altair\node_modules\electron-publish\src\publisher.ts:87:16
    at next (native)
    at C:\projects\altair\node_modules\graceful-fs\polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)
From previous event:
    at GitHubPublisher.upload (C:\projects\altair\node_modules\electron-publish\out\publisher.js:111:11)
    at PublishManager.scheduleUpload (C:\projects\altair\node_modules\electron-builder-lib\src\publish\PublishManager.ts:117:40)
    at C:\projects\altair\node_modules\electron-builder-lib\src\publish\PublishManager.ts:144:14
    at next (native)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at PublishManager.artifactCreated (C:\projects\altair\node_modules\electron-builder-lib\out\publish\PublishManager.js:408:11)
    at EventEmitter.PublishManager.packager.artifactCreated.event (C:\projects\altair\node_modules\electron-builder-lib\src\publish\PublishManager.ts:95:39)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)
    at Packager.dispatchArtifactCreated (C:\projects\altair\node_modules\electron-builder-lib\src\packager.ts:195:23)
    at C:\projects\altair\node_modules\electron-builder-lib\src\targets\nsis\NsisTarget.ts:247:19
From previous event:
    at NsisTarget.buildInstaller (C:\projects\altair\node_modules\electron-builder-lib\out\targets\nsis\NsisTarget.js:337:11)
    at C:\projects\altair\node_modules\electron-builder-lib\src\targets\nsis\NsisTarget.ts:102:18
    at next (native)
From previous event:
    at NsisTarget.finishBuild (C:\projects\altair\node_modules\electron-builder-lib\out\targets\nsis\NsisTarget.js:205:11)
    at C:\projects\altair\node_modules\electron-builder-lib\src\packager.ts:334:36
From previous event:
    at Packager.doBuild (C:\projects\altair\node_modules\electron-builder-lib\out\packager.js:393:11)
    at C:\projects\altair\node_modules\electron-builder-lib\src\packager.ts:270:52
From previous event:
    at Packager._build (C:\projects\altair\node_modules\electron-builder-lib\out\packager.js:337:11)
    at C:\projects\altair\node_modules\electron-builder-lib\src\packager.ts:240:23
    at next (native)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at Packager.build (C:\projects\altair\node_modules\electron-builder-lib\out\packager.js:297:11)
    at C:\projects\altair\node_modules\electron-builder\src\builder.ts:287:40
    at next (native)
From previous event:
    at _build (C:\projects\altair\node_modules\electron-builder\out\builder.js:61:21)
    at build (C:\projects\altair\node_modules\electron-builder\src\builder.ts:257:10)
    at then (C:\projects\altair\node_modules\electron-builder\src\cli\cli.ts:49:4)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
    at Object.args [as handler] (C:\projects\altair\node_modules\electron-builder\src\cli\cli.ts:49:4)
    at Object.runCommand (C:\projects\altair\node_modules\electron-builder\node_modules\yargs\lib\command.js:228:22)
    at Object.parseArgs [as _parseArgs] (C:\projects\altair\node_modules\electron-builder\node_modules\yargs\yargs.js:1041:24)
    at Object.get [as argv] (C:\projects\altair\node_modules\electron-builder\node_modules\yargs\yargs.js:957:21)
    at Object.<anonymous> (C:\projects\altair\node_modules\electron-builder\src\cli\cli.ts:43:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:496:3
npm ERR! Windows_NT 6.3.9600
@develar develar added the bug label Dec 5, 2017
@develar
Copy link
Member

develar commented Dec 5, 2017

Should be fixed in the 19.47.1 +

@develar develar closed this as completed Dec 5, 2017
@ziedHamdi
Copy link

ziedHamdi commented Dec 21, 2017

I have the same issue on mac: this is my log:
electron-builder 19.49.0
No native production dependencies
⚠️ Packaging using asar archive is disabled — it is strongly not recommended.
Please enable asar and use asarUnpack to unpack files that must be externally available.
Packaging for darwin x64 using electron 1.7.9 to dist/mac
⚠️ App is not signed: cannot find valid "Mac Developer" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing

All identities:
0 identities found

Valid identities only
0 valid identities found
Building macOS zip
Building DMG
Publishing to Github (owner: marwenlandoulsi, project: share.place, version: 0.4.13)
Release with tag v0.4.13 doesn't exist, creating one
[ ] 0% 0.0s | Shareplace-0.4.13.dmg to GitHubError: Cannot cleanup:
[ ] 0% 0.0s | Shareplace-0.4.13-mac.zip to GitHub
Error #1 --------------------------------------------------------------------------------
HttpError: 422 Unprocessable Entity
{
"message": "Validation Failed",
"request_id": "DC83:89ED:5128F5:55F1F7:5A3BA049",
"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": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user",
"x-xss-protection": "1; mode=block",
"date": "Thu, 21 Dec 2017 11:51:37 GMT",
"connection": "close",
"x-github-request-id": "DC83:89ED:5128F5:55F1F7:5A3BA049"
}
at createHttpError (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:29:10)
at IncomingMessage.response.on (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:149:18)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059: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/zied/work/delivrable/node_modules/electron-builder/node_modules/builder-util-runtime/src/CancellationToken.ts:51:5)
at NodeHttpExecutor.doApiRequest (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:79:30)
at /Users/zied/work/delivrable/node_modules/electron-builder-lib/node_modules/electron-publish/src/gitHubPublisher.ts:144:35
at Generator.throw ()
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)

Error #2 --------------------------------------------------------------------------------
HttpError: 422 Unprocessable Entity
{
"message": "Validation Failed",
"request_id": "DC84:89EC:1C229B:1DE5D9:5A3BA049",
"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": "admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user",
"x-xss-protection": "1; mode=block",
"date": "Thu, 21 Dec 2017 11:51:37 GMT",
"connection": "close",
"x-github-request-id": "DC84:89EC:1C229B:1DE5D9:5A3BA049"
}
at createHttpError (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:29:10)
at IncomingMessage.response.on (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:149:18)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059: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/zied/work/delivrable/node_modules/electron-builder/node_modules/builder-util-runtime/src/CancellationToken.ts:51:5)
at NodeHttpExecutor.doApiRequest (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:79:30)
at /Users/zied/work/delivrable/node_modules/electron-builder-lib/node_modules/electron-publish/src/gitHubPublisher.ts:144:35
at Generator.throw ()
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
at createHttpError (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:29:10)
at IncomingMessage.response.on (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:149:18)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at CancellationToken.createPromise (/Users/zied/work/delivrable/node_modules/electron-builder/node_modules/builder-util-runtime/src/CancellationToken.ts:51:5)
at NodeHttpExecutor.doApiRequest (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:79:30)
at /Users/zied/work/delivrable/node_modules/electron-builder-lib/node_modules/electron-publish/src/gitHubPublisher.ts:144:35
at Generator.throw ()
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
at createHttpError (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:29:10)
at IncomingMessage.response.on (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:149:18)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at CancellationToken.createPromise (/Users/zied/work/delivrable/node_modules/electron-builder/node_modules/builder-util-runtime/src/CancellationToken.ts:51:5)
at NodeHttpExecutor.doApiRequest (/Users/zied/work/delivrable/node_modules/builder-util-runtime/src/httpExecutor.ts:79:30)
at /Users/zied/work/delivrable/node_modules/electron-builder-lib/node_modules/electron-publish/src/gitHubPublisher.ts:144:35
at Generator.throw ()
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
at throwError (/Users/zied/work/delivrable/node_modules/builder-util/src/asyncTaskManager.ts:91:11)
at checkErrors (/Users/zied/work/delivrable/node_modules/builder-util/src/asyncTaskManager.ts:54:9)
at /Users/zied/work/delivrable/node_modules/builder-util/src/asyncTaskManager.ts:68:7
From previous event:
at AsyncTaskManager.awaitTasks (/Users/zied/work/delivrable/node_modules/builder-util/out/asyncTaskManager.js:103:11)
at /Users/zied/work/delivrable/node_modules/electron-builder-lib/src/publish/PublishManager.ts:173:28
at Generator.next ()
at PublishManager.awaitTasks (/Users/zied/work/delivrable/node_modules/electron-builder-lib/out/publish/PublishManager.js:436:11)
at /Users/zied/work/delivrable/node_modules/electron-builder/src/builder.ts:294:32
at /Users/zied/work/delivrable/node_modules/builder-util/src/promise.ts:26:11
at Generator.next ()
From previous event:
at executeFinally (/Users/zied/work/delivrable/node_modules/builder-util/out/promise.js:37:21)
at /Users/zied/work/delivrable/node_modules/electron-builder/src/builder.ts:287:10
at Generator.next ()
at _build (/Users/zied/work/delivrable/node_modules/electron-builder/out/builder.js:61:21)
at build (/Users/zied/work/delivrable/node_modules/electron-builder/src/builder.ts:257:10)
at then (/Users/zied/work/delivrable/node_modules/electron-builder/src/cli/cli.ts:49:4)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:mac: electron-builder --mac --publish always
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:mac 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! /Users/zied/.npm/_logs/2017-12-21T11_51_38_100Z-debug.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants