When I try to load really big json files (~19MB) via the file URL I only get an empty page and the console shows: TypeError: headers is null for this line https://dxr.mozilla.org/mozilla-central/source/devtools/client/jsonview/json-viewer.js#31 Not sure if this is related to bug 1224071 or not.
I've the same issue with a json file (~60MB). It works well with chrome. I can provide the json if needed.
Does your JSON have a NUL (U+0000) character? See bug 1364953.
:Oriol, no it hasn't.
I think the problem was: - require.js was included in the <head> and loaded synchronously - The data-main entry point is viewer-config.js, loaded asynchronously - That loads json-viewer.js, not sure if synchronously or asynchronously Probably, most times json-viewer.js ended up running after the JSON contents and the headers had been appended to the document, but this was not the case for these huge files. In bug 1367894 I inserted require.js after loading the page, so the problem should be fixed now. Can somebody confirm?
I tried ~84MB json file and it works for me. http://janodvarko.cz/temp/jsonviewer/bigdata.json The JSON Viewer takes some time to appear, but works. Honza
I tried again with mine: https://people-mozilla.org/~cdenizet/callgraph.json And finally firefox crashed: https://crash-stats.mozilla.com/report/index/c5beca70-cb0c-447a-958b-0f9f40170531. Maybe it's because the "json" is just one big array of numbers.
(In reply to Calixte Denizet (:calixte) from comment #6) > I tried again with mine: https://people-mozilla.org/~cdenizet/callgraph.json > And finally firefox crashed: > https://crash-stats.mozilla.com/report/index/c5beca70-cb0c-447a-958b- > 0f9f40170531. > Maybe it's because the "json" is just one big array of numbers. I can confirm. This example crashes the content process. Honza
Before the crash (bug 1369041) I can see that the JSON Viewer has loaded (after waiting a lot and using like 8GB of RAM). So this seems fixed by bug 1367894. And just in case in bug 1368899 I defined headers at the very beginning and deferred the script.