Open marcusx2 opened 1 year ago
Thanks for reporting this issue. I am unable to reproduce this error while trying to update user through the demo app. Can you please do the same and let me know if it still persists? Would recommend modifying the code in https://github.com/firebase/firebase-js-sdk/blob/eff95304d4881a65a6fc0015663d7873507f299a/packages/auth/demo/src/index.js#L1048, to pass null, instead of reading the value from "#display-name" text box to check.
Maybe the error only happens with the emulator then.
Transferring to emulator repo.
Hey @marcusx2, thanks for reporting this. I was able to replicate the issue when using the Firebase Auth emulator. When calling the updateProfile()
and passing a null
value for displayName
and/or photoURL
, an error is raised.
I’ll mark this issue as reproducible and inform our engineering team about the issue.
Operating System
macOS
Browser Version
Safari 16.5.2
Firebase SDK Version
10.3.0
Firebase SDK Product:
Auth
Describe your project's tooling
index.html with source tag.
Describe the problem
updateProfile's signature indicates that
displayName
andphotoURL
both can acceptnull
, but they can't, because if you passnull
to either of them you getFirebaseError: Firebase: Error (auth/invalid-json-payload-received.-/displayname-must-be-string).
orFirebaseError: Firebase: Error (auth/invalid-json-payload-received.-/photourl-must-be-string).
respectively.Steps and code to reproduce issue
Assuming you already have a
user1@test.com
with123456
password