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
This happened to me, and had a totally different cause: I had Firebase functions that triggered when data is added to certain collections. The GUI tool gave me the unhelpful error the OP got. But running with the CLI, I got:
Error: HTTP Error: 400, This request would cause too many functions to be triggered.
So, the error ended up really saving my hide since running a function for each of the few hundred nodes I was importing would have been disastrous.
To solve the issue, I deployed my app code with the functions commented out and then was able to use the GUI to import my data. Once my data was in, I un-commented out the functions and deployed again.
I just found one more reason when Firebase throws this error:
This was the data firebase refused to upload:
{
"S. No.": 2,
"University Name": "Acharya Nagarjuna University, Guntur (Id: U-0003)",
"College Name": "Abhinav Institute of Management & Technology (Id: C-39450)",
"College Type": "Affiliated College",
"State Name": "Andhra Pradesh",
"District Name": "Prakasam"
}
I thought of changing the key name of "S. No." and it worked.
{
"S": 2,
"University Name": "Acharya Nagarjuna University, Guntur (Id: U-0003)",
"College Name": "Abhinav Institute of Management & Technology (Id: C-39450)",
"College Type": "Affiliated College",
"State Name": "Andhra Pradesh",
"District Name": "Prakasam"
}
The Firebase was accepting the later format (I believe the problem was with .(dot) followed by space.) I hope this helps!!!
I have a similar problem with JSON containing huge data. I solved this problem by using firebase import tool. It has options for imports to specific nodes etc.