-
Notifications
You must be signed in to change notification settings - Fork 117
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
Consistent HTTP 422 errors when publishing assets to GitHub release #102
Comments
Can you run semantic-release with the |
🎉 This issue has been resolved in version 5.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
THANKS for this fix! Sorry I missed your ask for |
I also have this issue (semantic-release: > github-release upload -u live-html-editor -r TextWrap -t v1.0.0 -l "3. Suitable for ..." -f dist/main.umd.js -s 8bf...771 -n main.umd.js
error: could not upload, status code (422 Unprocessable Entity), msg: Validation Failed, errors: [field: name, code: already_exists] Similar to the error that I recived on the CI, previously:
npx: installed 851 in 19.691s
[6:55:03 PM] [semantic-release] › ℹ Running semantic-release version 15.13.12
...
[6:55:14 PM] [semantic-release] › ℹ Start step "publish" of plugin "@semantic-release/github"
[6:55:15 PM] [semantic-release] [@semantic-release/github] › ℹ Published GitHub release: https://github.com/live-html-editor/TextWrap/releases/tag/v1.0.0
[6:55:21 PM] [semantic-release] [@semantic-release/github] › ℹ Published file https://github.com/live-html-editor/TextWrap/releases/download/v1.0.0/main.umd.js.map
[6:55:24 PM] [semantic-release] [@semantic-release/github] › ℹ Published file https://github.com/live-html-editor/TextWrap/releases/download/v1.0.0/bundle.umd.js
[6:55:27 PM] [semantic-release] [@semantic-release/github] › ℹ Published file https://github.com/live-html-editor/TextWrap/releases/download/v1.0.0/bundle.esm.js
[6:55:30 PM] [semantic-release] [@semantic-release/github] › ℹ Published file https://github.com/live-html-editor/TextWrap/releases/download/v1.0.0/bundle.esm.js.map
[6:55:33 PM] [semantic-release] [@semantic-release/github] › ℹ Published file https://github.com/live-html-editor/TextWrap/releases/download/v1.0.0/bundle.umd.js.map
[6:55:43 PM] [semantic-release] › ✖ Failed step "publish" of plugin "@semantic-release/github"
[6:55:43 PM] [semantic-release] › ✖ An error occurred while running semantic-release: { HttpError: Validation Failed
at response.text.then.message (/home/travis/.npm/_npx/6593/lib/node_modules/semantic-release/node_modules/@octokit/request/dist-node/index.js:85:23)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HttpError',
status: 422,
headers:
{ 'cache-control': 'no-cache',
connection: 'close',
'content-length': '211',
'content-security-policy': 'default-src \'none\'',
'content-type': 'application/json; charset=utf-8',
date: 'Fri, 24 May 2019 18:55:43 GMT',
'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': '9F8E:4CA7:1F037B:23CE1B:5CE83E2F',
'x-oauth-scopes':
'repo, read:org, user:email, repo_deployment, repo:status, write:repo_hook, write:packages, read:packages',
'x-xss-protection': '1; mode=block' },
request:
{ method: 'POST',
url:
'https://uploads.github.com/repos/live-html-editor/TextWrap/releases/17578568/assets?name=main.umd.js&label=3.%20Suitable%20for%20Node.js%20projects%20%28and%20any%20other%20UMD-compatible%20environment%20that%20can%20resolve%20dependencies%29.%20This%20is%20the%20one%20has%20been%20published%20on%20npm.js%20%28https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40live-html-editor%2Ftext-wrap%29%20and%20you%20can%20install%20it%20with%20%5Bnpm%20install%20...%5D.',
headers:
{ accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit.js/16.27.0 Node.js/10.15.3 (Linux 4.15; x64)',
'content-type': 'application/javascript',
'content-length': 1632,
authorization: 'token [REDACTED]' },
body:
<Buffer 21 66 75 6e 63 74 69 6f 6e 28 65 2c 74 29 7b 22 6f 62 6a 65 63 74 22 3d 3d 74 79 70 65 6f 66 20 65 78 70 6f 72 74 73 26 26 22 75 6e 64 65 66 69 6e 65 ... >,
request:
{ agent: undefined,
hook: [Function: bound bound register],
validate: [Object] } },
request_id: '9F8E:4CA7:1F037B:23CE1B:5CE83E2F',
documentation_url: 'https://developer.github.com/v3',
errors:
[ { resource: 'ReleaseAsset',
code: 'already_exists',
field: 'name' } ],
attemptNumber: 4,
retriesLeft: 0,
pluginName: '@semantic-release/github' } |
My experience: In the above case, the issue was from the |
If that’s the case, maybe try setup a minimal test repository to reproduce it and let https://github.com/support know? They’ll appreciate it. They sure could improve the error message |
@mirismaili did you workaround this ? |
👋
We're using
semantic-release/github
plugin to publish assets to each release we make withsemantic-release
.The release configuration is as follows:
The assets are being published as expected, however the plugin fails over a 422 response from GH:
More details at https://travis-ci.org/snyk/snyk/jobs/419030290
I appreciate the fact this may be on GH side, opened a support ticket with them, will update here once I hear back.
Wanted to document the issue here, maybe there's more context?
The text was updated successfully, but these errors were encountered: