Closed kincjf closed 6 years ago
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.
Can you provide a minimal, complete and reproducible test case please? Your code is partial but does a lot of things. It's not clear where the problem is occurring.
return Promise.each(objectToArray(initData.user), (item, index, length) => {
item.value.password = "11112222";
return admin.auth().createUser(item.value); <= This is the section where the actual error occurs when debugging
});
When I check the internal library of firebase-admin through debug, I seem to output the above error because the firebase-admin library try to JSON.parse with undefined in process.env.FIREBASE_CONFIG Using the firebase-admin library works fine, but I did not know why that part was error
I solved the problem! There was a variable "item.value.createdAt" An error occurred when I entered the value of utc string for that variable. So once I removed createdAt, it was fixed
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
We are unit testing firebase auth, database, cloudfunction using mocha framework
I tried to create test.database.makeDataSnapshot, but it was not created due to a firebase core error (JSON.parse - unable to parse "u" ...).
So I updated the whole npm package today and I get the above of error
It is the code that was originally passed, but the error occurred because the update package was done, and the related issue/docs is not retrieved.
How can I solve this?
Relevant Code: