Open Bug 1252016 Opened 5 years ago Updated 2 years ago
Parsing error with big json files on Firefox
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36 Steps to reproduce: I created a light html web app which loads four times with XMLHttpRequest the same big json file (150Mo). The web app is hosted in apache. This big json file have valid structure. I use Firefox v44.0.2 for Windows. See https://jsfiddle.net/asicfr/bvmfv4ea/ for the web app and the following link for the big json file : https://drive.google.com/file/d/0B09g_WmDUmoFd0FYU05SQTFWQW8/view?usp=sharing Actual results: Part loadings end in success and the others in error : SyntaxError: JSON.parse: unterminated string at line 4233392 column 290 of the JSON data Expected results: The same big json file should be loaded with success four times.
I don't see this error in the web console, only syntax error: syntax error datas2.json:1:1 syntax error datas2.json:1:1 syntax error datas2.json:1:1 syntax error datas2.json:1:1
Have you downloaded the json file on local ? Do not use directly my link from Google drive.
Yes, I tested all locally, the .html testcase and the JSON file in a same folder.
Thx for your response. I use apache to serve the files and Firefox v44.0.2 for Windows. And you ?
I desactivate all plugin (firebug etc) but the problem is still there. The problem cannot be reproduce in a portable version of Firefox. Seriously, I do not understand what's going on ...
Did you enable JSON Viewer manually from about:config then in 44? I believe it's not yet enabled by default in release.
Another question is: where do you see the error appear? Not clear from the bug if we're actually talking about the new JSON Viewer feature.
It's not about the new JSON Viewer feature. I see the error in the console.
Okay. While this error itself may appear in the console, I think we'll have more success diagnosing this in a component that knows more about XHR, etc.
Component: Developer Tools: JSON Viewer → DOM
Product: Firefox → Core
Ok, i activated Json Viewer in about:config. Now what is the next step ? How can i use the Json Viewer ? Thx again
(In reply to asicfr from comment #10) > Ok, i activated Json Viewer in about:config. > Now what is the next step ? How can i use the Json Viewer ? > Thx again I just wanted to know if you were using the JSON Viewer at all, to know if it was a bug in that feature. Since you are using XHR, it sounds like the JSON Viewer does not apply to your problem. But anyway, to use it, you go to any URL that serves an application/json response. The viewer appears in the main content area, instead of a plain text view. See more at https://developer.mozilla.org/en-US/docs/Tools/JSON_viewer.
I reproduce the same pb in Firefox Developer Edition 46.0.a2
Does it work in other browsers?
Yes it works with Chrome for example.
I'm not getting the error when loading from a server, and I see the same as in comment 1 when loading locally, but the json file is actually loaded properly (so the "syntax error datas2.json:1:1" is bogus here.). Reporter, is it possible that you're running out of memory here?
syntax error datas2.json:1:1 is coming from Expat (xml parsing), so it is rather bogus here. http://mxr.mozilla.org/mozilla-central/source/dom/locales/en-US/chrome/layout/xmlparser.properties#7
(In reply to Olli Pettay [:smaug] from comment #15) > I'm not getting the error when loading from a server, and I see the same as > in comment 1 when loading locally, but the json file is actually loaded > properly (so the "syntax error datas2.json:1:1" is bogus here.). > > > Reporter, is it possible that you're running out of memory here? No, isn't a memory pb and i doesn't crash on line / column 1:1 but in line 4233392 column 290
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.