semantic-release: Not Found Error in GitHub publish step

Current behavior

[Semantic release]: Wrote version 1.5.0 to package.json
[Semantic release]: Publishing version 1.5.0 to npm registry
+ chromeless@1.5.0[Semantic release]: An error occurred while running semantic-release: { [Error: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/git/refs/#create-a-reference"}]
  message: '{"message":"Not Found","documentation_url":"https://developer.github.com/v3/git/refs/#create-a-reference"}',
  code: 404,
  status: 'Not Found',
  headers: 
   { server: 'GitHub.com',
     date: 'Thu, 18 Jan 2018 04:52:17 GMT',
     'content-type': 'application/json; charset=utf-8',
     'content-length': '106',
     connection: 'close',
     status: '404 Not Found',
     'x-ratelimit-limit': '5000',
     'x-ratelimit-remaining': '4763',
     'x-ratelimit-reset': '1516253265',
     'x-oauth-scopes': 'read:org, repo:status, repo_deployment, user:email, write:repo_hook',
     'x-accepted-oauth-scopes': '',
     'x-github-media-type': 'github.v3; format=json',
     'access-control-expose-headers': 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval',
     'access-control-allow-origin': '*',
     'content-security-policy': 'default-src \'none\'',
     'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
     'x-content-type-options': 'nosniff',
     'x-frame-options': 'deny',
     'x-xss-protection': '1; mode=block',
     'x-runtime-rack': '0.021744',
     'x-github-request-id': 'AC00:7532:CE39AE:188EE14:5A602801' } }

Expected behavior

No error, publish release on GitHub.

Environment

Could this have to do with the changes on gitHead resolution? Since the npm publish was successful the next build passes now because it doesn’t publish the GitHub release.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

GitHub API returning returning random errors and requiring 1sec delay sounds awfully similar to the problems Greenkeeper runs into.

Referencing the solutions for the very same problems:

retry: https://github.com/greenkeeperio/greenkeeper/blob/e3b2ec236139c0202df840f33187d75deca9222e/lib/github.js#L6-L27

1sec delay: https://github.com/greenkeeperio/greenkeeper/blob/e3b2ec236139c0202df840f33187d75deca9222e/lib/github-queue.js

tl;dr require('promise-retry') / require('promise-queue')