Closed noorulhussain closed 2 years ago
@wagnerand the error message we show is indeed weird: we tell the developer to move data from JS to JSON when a JSON file is large. We should either fix the error message for JSON files or not check the file size of JSON files. WDYT? /cc @diox
I agree that the message is confusing. It should probably only be applied to files that contain code.
It should probably only be applied to files that contain code.
@wagnerand sorry, "it" being? The error?
"It" meant to be the message, but more accurately it's the check that can lead to the message/error.
We are parsing JSON files, so it makes sense to have a limit for them too, but it could probably be different, and much higher for them ?
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.
i have the same issue. my extension has 2 big .json files included (word dictionaries), and it fails check when try to upload.
For fellas who might came here from Google. Workaround for this is to use different file extension, e.g. .jsonx
works just fine. You still can load these files using fetch
and parse them as JSON:
const url = browser.runtime.getURL(`/filename.jsonx`);
const resp = await fetch(url);
const json = await resp.json();
can this be done or something similar to split a js file?
Describe the problem and steps to reproduce it:
Firefox addon signin got failed due to the following error. Error: This file is not binary and is too large to parse. Files larger than 4MB will not be parsed. Consider moving large lists of data out of JavaScript files and into JSON files, or splitting very large files into smaller ones.
What did you expect to happen?
The file size constaraint should not be applicable to JSON file.
Anything else we should know?
https://addons.mozilla.org/en-US/developers/upload/20353cf30bd0455eb449f243ee912c69