Could not add github status: 404 Not Found
See original GitHub issueI’m trying to use bundlesize
without github integration. Is that possible? In other words, I haven’t added a token but I thought I could still use the output to tell me if my bundle has reached the threshold or not.
I set up my TravisCI to run bundlesize
in my build step. This worked fine in a branch but when I merged it to master it failed every time like this:
$ bundlesize
ERROR Could not add github status.
404: Not Found
error Command failed with exit code 1.
Here is an example of a failure: https://travis-ci.org/mozilla/addons-frontend/builds/262798345?utm_source=github_status&utm_medium=notification
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Github Integration Failure code 404 - Microsoft Q&A
Go to the branch dropdown and select "main". This issue is occurring in many environments because GitHub has recently renamed its master branch...
Read more >Error 404 not found - What does it mean & how to fix it! - IONOS
Reload the page : It might be that the error 404 has appeared for the simple reason that the page did not load...
Read more >How to fix HTTP 404 on Github Pages? - Stack Overflow
It may also be a problem with Github itself. This page tells you the status of Github. I had the same problem, and...
Read more >Failed to create webhook on repository 404 Not Found
Problem. After a GitHub VCS integration has been configured, a workspace can then be assigned to a repository within the GitHub VCS. ·...
Read more >How to fix the 404 error in Github - YouTube
Hi there, this is a short video on how to fix the 404 error, and if you have still a question or still...
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
@jbucaran I’m sorry you had to remove the integration because it was unusable. https://github.com/siddharthkp/bundlesize/blob/accf79cf8db19e40b34c8a0f263626e7ef2b1fc6/src/build.js#L22 is where the error is thrown and https://github.com/siddharthkp/github-build/blob/bdc53116ccf94cf6d2294fe1607aadca6bfdc26e/index.js#L9 is where it actually comes from.
It seems like a good idea to run in some kindda
CI_ONLY
mode ifGITHUB_TOKEN
isn’t available. Just to understand a bit more exactly what you need, are you saying you would like to manually check the CI logs to tell you that the bundlesizes have crossed the limit? Or would you want bundlesize to exit with a non-zero error code to signify that the build broke?@jbucaran @karanjthakkar Ooh, a couple of interesting things here.
If you want your tests to continue running, you can make that
bundlesize || npm run test
, but then bundlesize would not be able to fail your builds!Alternatively, you can split them into different commands and let your CI configuration decide whether it wants to fail early or run all the tests (I know travis CI supports this, don’t know about the rest, sorry!)
Could not add github status
can happen in a few cases:a) This is an enterprise repo (bundlesize doesn’t support enterprise yet, open issue here: https://github.com/siddharthkp/github-build/issues/3)
b) You have given a wrong github token and setting the status failed. Github API returns a 404 in such cases (bundlesize should handle this better)
c) You are not giving a github token, but bundlesize didn’t know that and tried to set values for master anyways and failed. Potential bug on this line: reporter.js#L80, can be fixed by adding
if (api.enabled)