0

i import a wrong file using the command: firebase auth: import FILE.csv which it generate in some out of format uid. I am trying to clean all logs using the firestore and python SDK but I am getting the following error:

ValueError" Invalid uid: \ "1003, sdfsdfsdfdf @ hotmail.com ,, $ 2y $ 13 $ LFNvaEjSHO33kpTwql2imudfgsdgsdgdfgdfg56J22.QacwwNiYS, 80fjzj456sdfgdfsgsdfgsdfgdsfg0ok8o8, asdasd". The uid must be a non-empty string with no more than 128 characters. "

uids are literally as the error output shows

This is my code:

for user in auth.list_users().iterate_all():
    user_id = user.uid
    print('User: ', user_id)
    auth.delete_user(user_id)

deleting the entire project is not a solution for me

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

1 Answers1

0

I was able to reproduce your issue, this issue is occurring because the length of UID is greater than 128 characters. As per the document, the UID must always be less than 128 characters.

One way of deleting the user is through firebase UI itself, you will find 3 dots and if you hover on the user that you want to delete, you will find “delete account”, and you can just delete it from there. And if you have other users with valid UID then you can execute your code, which works fine.

enter image description here

Zeenath S N
  • 1,100
  • 2
  • 8