-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Could not add github status: 404 Not Found #93
Comments
Ah, that's a bug I'll take care of that! |
@siddharthkp Is this fixed? |
No 😢 Haven't been able to make time for this. Would you like to take a shot at it? |
@siddharthkp BTW I was getting the same error locally. 🤔 |
- Bundlesize was fun to use, but after updating to their latest I've been unable to make it work as normal because of: siddharthkp/bundlesize/issues/93 I could downgrade and wait for them to fix the bug, but I've decided to remove it from the project on the basis that we have no dependencies and it's extremely unlikely the bundle size will suddenly increase without anyone noticing.
@jbucaran I'm sorry you had to remove the integration because it was unusable. Line 22 in accf79c
It seems like a good idea to run in some kindda |
Hey @karanjthakkar. I actually removed bundlesize because it wasn't really so useful in that particular project, but I'd definitely use this or a similar tool on a project with a lot of dependencies or where the code changes a lot.
I used to have this in my pkgjson. "test": "bundlesize && npm run test" And bundlesize would exit with a non-zero error code preventing "npm run test" to execute. Last time I checked, "npm run test" wouldn't even run and I was getting an error resembling (unfortunately I can't remember exactly what): ERROR Could not add github status.
404: Not Found |
@jbucaran @karanjthakkar Ooh, a couple of interesting things here.
|
- Bundlesize was fun to use, but after updating to their latest I've been unable to make it work as normal because of: siddharthkp/bundlesize/issues/93 I could downgrade and wait for them to fix the bug, but I've decided to remove it from the project on the basis that we have no dependencies and it's extremely unlikely the bundle size will suddenly increase without anyone noticing.
For me this is an issue because I have a Is it important that bundlesize looks for the |
@Raigen, as far as I remember, you can run it on local without giving a token and it should work. (correct me if this isn't happening in your case) |
@siddharthkp I already use a token for some gist things, but bundlesize tries to use it and then fails the build because of a 404 from github because the token is meant for gist only. |
My view here is that it should just ignore tokens on non-ci env Can you open a different issue for this? |
I opened a PR that will fix the issue on running bundlesize on NON CI environments #291 |
I'm facing the same error. Using the $ GITHUB_REPOSITORY="alloc/wana" GITHUB_SHA="master" BUNDLESIZE_GITHUB_TOKEN="[redacted]" ./node_modules/.bin/bundlesize -f "dist/index.js" --debug
WARN cli config: [
{
"path": "dist/index.js",
"compression": "gzip"
}
]
WARN file config: undefined
WARN selected config: [
{
"path": "dist/index.js",
"compression": "gzip"
}
]
WARN files: [
{
"maxSize": null,
"path": "dist/index.js",
"size": 4877,
"compression": "gzip"
}
]
WARN token exists: true
WARN repo: undefined
WARN sha: undefined
WARN api enabled: false
PASS dist/index.js: 4.76KB (gzip)
WARN message: "dist/index.js: 4.76KB (gzip)"
WARN url before shortening: "https://bundlesize-store.now.sh/build?info=%7B%22files%22%3A%5B%7B%22maxSize%22%3Anull%2C%22path%22%3A%22dist%2Findex.js%22%2C%22size%22%3A4877%2C%22compression%22%3A%22gzip%22%7D%5D%7D"
WARN err while shortening: {
"message": "Request failed with status code 403",
"name": "Error",
"stack": "Error: Request failed with status code 403\n at createError (/dev/wana/node_modules/.registry.npmjs.org/axios/0.19.0/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/dev/wana/node_modules/.registry.npmjs.org/axios/0.19.0/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/dev/wana/node_modules/.registry.npmjs.org/axios/0.19.0/node_modules/axios/lib/adapters/http.js:237:11)\n at IncomingMessage.emit (events.js:202:15)\n at endReadableNT (_stream_readable.js:1129:12)\n at processTicksAndRejections (internal/process/next_tick.js:76:17)",
"config": {
"url": "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyACIqikanS3eoHsy14JYyFAHU1aU5w1YoA",
"method": "post",
"data": "{\"longUrl\":\"https://bundlesize-store.now.sh/build?info=%7B%22files%22%3A%5B%7B%22maxSize%22%3Anull%2C%22path%22%3A%22dist%2Findex.js%22%2C%22size%22%3A4877%2C%22compression%22%3A%22gzip%22%7D%5D%7D\"}",
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=utf-8",
"User-Agent": "axios/0.19.0",
"Content-Length": 199
},
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1
}
}
WARN global message: "dist/index.js: 4.76KB (gzip)"
ERROR Could not add github status.
404: Not Found |
Temp. fix is to clear the env var before running your build e.g.: |
This was causing an error with generic CI tokens, this should only use a project specific token, closes siddharthkp#93
- Bundlesize was fun to use, but after updating to their latest I've been unable to make it work as normal because of: siddharthkp/bundlesize/issues/93 I could downgrade and wait for them to fix the bug, but I've decided to remove it from the project on the basis that we have no dependencies and it's extremely unlikely the bundle size will suddenly increase without anyone noticing.
I'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:Here is an example of a failure: https://travis-ci.org/mozilla/addons-frontend/builds/262798345?utm_source=github_status&utm_medium=notification
The text was updated successfully, but these errors were encountered: