You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know the details of how Firebase logging works, but when I switched it to console.log for debugging purposes I then saw these errors:
[
{ index: 0, message: 'localId is missing' },
{ index: 1, message: 'localId is missing' },
{ index: 2, message: 'localId is missing' },
{ index: 3, message: 'localId is missing' },
{ index: 4, message: 'localId is missing' },
{ index: 5, message: 'localId is missing' },
{ index: 6, message: 'localId is missing' },
{ index: 7, message: 'localId is missing' },
. . .
Looking at my specific file localIdwas specified (I got it via the corresponding auth export command). Digging it appears that this section of code is the issue:
Specifically, it calls validateUserJson which returns an empty object if there are no validation errors. But this value is used as the user, so each "user" is just an empty object which get rejected by the API. By switching the code to push value instead of the user value: currentBatch.push(value), I was able to successfully import my auth users:
[REQUIRED] Environment info
firebase-tools: 10.1.4
Platform: macOS
[REQUIRED] Steps to reproduce
firebase auth:import users.json
[REQUIRED] Expected behavior
Successful import.
[REQUIRED] Actual behavior
Two issues. One is that no error details are actually displayed:
Digging into the code, it seems like this line isn't logging the error:
firebase-tools/src/accountImporter.js
Line 318 in 2559abb
I don't know the details of how Firebase logging works, but when I switched it to console.log for debugging purposes I then saw these errors:
Looking at my specific file
localId
was specified (I got it via the corresponding auth export command). Digging it appears that this section of code is the issue:firebase-tools/src/commands/auth-import.ts
Lines 111 to 117 in 2559abb
Specifically, it calls
validateUserJson
which returns an empty object if there are no validation errors. But this value is used as the user, so each "user" is just an empty object which get rejected by the API. By switching the code to pushvalue
instead of theuser
value:currentBatch.push(value)
, I was able to successfully import my auth users:cc @bkendall It seems possibly introduced by this change b705926
The text was updated successfully, but these errors were encountered: