bundlesize
bundlesize copied to clipboard
Requests to bundlesize-store are failing
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Requests to https://bundlesize-store.now.sh/build?info=<info here>
get a connection closed error from the server
This happens for both new checks all old ones which used to work
If the current behavior is a bug, please provide the steps to reproduce.
Click the link to a bundlesize summary on a github CI check
What is the expected behavior?
It should show all files which were checked and the changes to their size
Hi!
It's back up now
Do you have the full url to test?
Hi @siddharthkp, thanks for the reply.
It doesn't seem to be an issue in all of our repos, just one of them. Here's an example URL:
https://bundlesize-store.now.sh/build?info=%7B%22files%22%3A%5B%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fbootstrap.js%22%2C%22size%22%3A1568%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1568%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fmain.js%22%2C%22size%22%3A21308%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A21308%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FBlog-index-js.js%22%2C%22size%22%3A3877%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A4578%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FBlog-pages-Category-index-js.js%22%2C%22size%22%3A4452%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A4452%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FBlog-pages-Home-index-js.js%22%2C%22size%22%3A4095%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A4096%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FBlog-pages-NotFound-index-js.js%22%2C%22size%22%3A1785%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1784%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FBlog-pages-Post-index-js.js%22%2C%22size%22%3A6450%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A6449%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FCustom-index-js.js%22%2C%22size%22%3A35321%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A35413%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FCustom-index-js~pages%2FIndividualPropertyPage-index-js.js%22%2C%22size%22%3A9673%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A9673%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FCustomerStories-index-js.js%22%2C%22size%22%3A3345%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A3344%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FCustomerStory-index-js.js%22%2C%22size%22%3A5269%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A5263%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FCustomerStory-slices-index-js.js%22%2C%22size%22%3A1115%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1115%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FGuide-containers-Contents-index-js.js%22%2C%22size%22%3A962%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A962%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FGuide-index-js.js%22%2C%22size%22%3A1462%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1462%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FIndividualMarketReport-index-js.js%22%2C%22size%22%3A15388%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A15387%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FIndividualPropertyPage-components-PhotoCarousel-index-js.js%22%2C%22size%22%3A6821%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A6821%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FIndividualPropertyPage-index-js.js%22%2C%22size%22%3A12723%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A12720%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FMarketReport-index-js.js%22%2C%22size%22%3A8771%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A8769%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FPressSingle-index-js.js%22%2C%22size%22%3A1264%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1264%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FPropertyEnquiry-index-js.js%22%2C%22size%22%3A7338%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A7336%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FResearch-index-js.js%22%2C%22size%22%3A1469%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1469%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FResearchStory-index-js.js%22%2C%22size%22%3A19442%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A19443%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fpages%2FSmokeTest-index-js.js%22%2C%22size%22%3A9022%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A9022%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fprismic-javascript.js%22%2C%22size%22%3A7276%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A7276%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2FsalesData.js%22%2C%22size%22%3A1571%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A1571%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~main.js%22%2C%22size%22%3A123957%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A123962%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FBlog-index-js~pages%2FBlog-pages-Category-index-js~pages%2FBlog-pages-Home-index-js~pages%2F~cc47fa8e.js%22%2C%22size%22%3A18742%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A18740%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FCustom-index-js.js%22%2C%22size%22%3A16061%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A16641%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FCustom-index-js~pages%2FGuide-containers-Contents-index-js~pages%2FGuide-index-js.js%22%2C%22size%22%3A7914%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A7913%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js.js%22%2C%22size%22%3A62987%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A62990%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~pages%2FIndividualPropertyPage-index-js.js%22%2C%22size%22%3A18754%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A18755%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~pages%2FMarketReport-index-js~pages%2FPropertyEnquiry-inde~3337dd00.js%22%2C%22size%22%3A56152%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A56152%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualPropertyPage-components-PhotoCarousel-index-js~pages%2FIndividualPropertyPage-~9865f963.js%22%2C%22size%22%3A21416%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A21414%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualPropertyPage-index-js.js%22%2C%22size%22%3A14002%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A14003%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FPropertyEnquiry-index-js.js%22%2C%22size%22%3A6883%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A6883%7D%2C%7B%22maxSize%22%3A153600%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FSmokeTest-index-js.js%22%2C%22size%22%3A3909%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A3911%7D%2C%7B%22maxSize%22%3A512000%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~react-map-gl.js%22%2C%22size%22%3A201068%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A201068%7D%2C%7B%22maxSize%22%3A512000%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~react-map-gl.js.br%22%2C%22size%22%3A132555%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A132586%7D%2C%7B%22maxSize%22%3A512000%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~react-map-gl.js.gz%22%2C%22size%22%3A160496%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A160735%7D%2C%7B%22maxSize%22%3A512000%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~react-map-gl.js.map%22%2C%22size%22%3A500542%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A500542%7D%2C%7B%22maxSize%22%3A512000%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~react-map-gl.js.map.br%22%2C%22size%22%3A332653%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A332653%7D%2C%7B%22maxSize%22%3A512000%2C%22path%22%3A%22.%2FbuildClient%2Fvendors~pages%2FIndividualMarketReport-index-js~react-map-gl.js.map.gz%22%2C%22size%22%3A399156%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A399156%7D%2C%7B%22maxSize%22%3A5120%2C%22path%22%3A%22.%2FbuildClient%2Fstatic.js%22%2C%22size%22%3A4992%2C%22compression%22%3A%22gzip%22%2C%22master%22%3A4861%7D%5D%2C%22repo%22%3A%22nested-tech%2Fnested-dot-com%22%2C%22branch%22%3A%22master%22%2C%22commit_message%22%3A%22%22%2C%22sha%22%3A%226f32b03e3c92a2a76b0244ac8dc5d785a6c16cfa%22%7D
I realise now that url is totally ridiculous and I probably should split things up a bit
The url isn't your fault. I should use a better way to send this information 😅
But, it's probably breaking because it's longer than a url is allowed to be 🤔
@siddharthkp this did work until recently - has anything changed on the server side which might be causing the issue? I don't think my browser is enforcing the limit.
Any thoughts on how else it would work? I guess you'd need somewhere else to store the JSON but that would probably cost money
has anything changed on the server side
nope. still works the same way
What happens sometimes is: When the query param becomes too long, it gets clipped at the end. This makes the object incomplete and the parsing fails 😢
I have a couple of ideas then:
-
JSON.stringify -> gzipping with zlib -> base64 encoding the data, but that doesn't really solve the problem is just hides it
-
Storing the JSON file as a CI artefact and having a link to that in the URL instead, but the logistics of doing this and being compatible with multiple CI providers could be quite large
but that doesn't really solve the problem is just hides it
It could definitely extend the size by a lot
- Storing the JSON file as a CI artefact and having a link to that in the URL instead, but the logistics of doing this and being compatible with multiple CI providers could be quite large
Yep, storing it in a cloud datastore would be easier.
Yeah you're right, I ran a quick test to see how much it would improve the URL I posted earlier:
Starting length: 8539
Compressed length: 1332
Here's the script I ran:
const zlib = require("zlib");
function compressJSON(uriEncodedJson) {
console.log("Starting length: ", uriEncodedJson.length);
const json = decodeURIComponent(uriEncodedJson);
zlib.deflate(json, (_, buffer) => {
console.log(
"Compressed length: ",
encodeURIComponent(buffer.toString("base64")).length
);
});
}
Do you think this is a reasonable approach? If so I may have time to have a go at the weekend
Looks okay to me 🤔
You might have to run some hoops to maintain backward compatibility though
I think we can probably use a new parameter and prioritise it over the old one, so old builds will still work
That works
Any updates on this issue? I'm also finding that the URL is too long and is being truncated, resulting in a broken link.
No updates yet. One of these days...
any updates on this issue? we are also experiencing the same issue of a broken link
Hey!
I'm working on a new version (1.0.0) of bundlesize that fixes most of these problems.
To not break any of the applications that use bundlesize with npx or with @latest
, I'm building in a separate repo + app (until it's ready)
If you'd like you can try it out: https://github.com/siddharthkp/bundlesize2
Migration path:
- Use the npm package
bundlesize2
instead ofbundlesize
- If you'd like status reported back to github, use the flag
--enable-github-checks
+ authorize bundlesize2 app. More in the docs - You can remove
BUNDLESIZE_GITHUB_TOKEN
from your CI now - If anything breaks, let me know :)
Note: This is only until the new version is ready and then it will be merged back in this project as a major release