Skip to content
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

Firefox addon signin failed due to JSON file size #3680

Closed
noorulhussain opened this issue Apr 19, 2021 · 9 comments
Closed

Firefox addon signin failed due to JSON file size #3680

noorulhussain opened this issue Apr 19, 2021 · 9 comments

Comments

@noorulhussain
Copy link

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
image

@eviljeff eviljeff transferred this issue from mozilla/addons-server Apr 19, 2021
@willdurand
Copy link
Member

@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

@wagnerand
Copy link
Member

I agree that the message is confusing. It should probably only be applied to files that contain code.

@willdurand
Copy link
Member

It should probably only be applied to files that contain code.

@wagnerand sorry, "it" being? The error?

@wagnerand
Copy link
Member

"It" meant to be the message, but more accurately it's the check that can lead to the message/error.

@diox
Copy link
Member

diox commented Sep 10, 2021

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 ?

@stale
Copy link

stale bot commented Apr 16, 2022

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.

@stale stale bot added the state:stale label Apr 16, 2022
@stale stale bot closed this as completed Jun 12, 2022
@arpitest
Copy link

i have the same issue. my extension has 2 big .json files included (word dictionaries), and it fails check when try to upload.

@OlegWock
Copy link

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();

@coppermight
Copy link

can this be done or something similar to split a js file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants