I\'m trying to import my JSON file into my Firebase but it keeps giving me this error. I don\'t know why this JSON file isn\'t allowed to be imported into since JSONLint say
if you created triggered function a lot of. You have to remove triggered functions. Next try again. That way works for me.
I just spent some time on this and found the issue for me (and likely for many others) when getting this error message. It looks like firebase can only import files with UTF-8 encoding (no BOM)
I found it strange, as I couldn't re-import the content I had just exported.
I tried all UTF versions 8, 16 with LE and BE with and without BOM, only UTF-8
works
I wish firebase did not have this utterly misleading error message
This was happening for me as well, as a web developer, I looked into the Developers Console and the actual error was because of authentication that Firebase's console was not able to authenticate while validating the JSON files.
So I did a "refresh" of the web page and it worked.
My filename was "something-somethingelse", ie it had a '-' character in the filename. Changing it to 'something.json' solved the problem
So, don't have any special characters in your filenames.
Two things that might help someone else save a couple of hours of head scratching:
1) Empty strings are valid JSON keys, they're NOT valid Firebase keys.
2) While the web tool error message is horrible, the command-line tool actually provides useful information like, say, a line number (nice when you have a 300K+ line file)
E.g.
firebase --project database:set / import.json
to overwrite everything from the root
The JSON you posted is valid for Firebase, so the issue is not with this JSON. It must be somewhere else in your application.