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
Hi, I'm trying out the Firebase flow in a test app and I'm running into this error, calling "fetchSignInMethodsForEmail" when providing an email that hasn't registered with my app.
Expected behavior: fetchSignInMethodsForEmail should resolve to an empty array when the SDK method returns null.
Actual behavior: app crashes with "TypeError: Cannot read property 'enumerateObjectsUsingBlock' of null."
Hi, I'm trying out the Firebase flow in a test app and I'm running into this error, calling "fetchSignInMethodsForEmail" when providing an email that hasn't registered with my app.
Expected behavior: fetchSignInMethodsForEmail should resolve to an empty array when the SDK method returns null.
Actual behavior: app crashes with "TypeError: Cannot read property 'enumerateObjectsUsingBlock' of null."
Here's the method in question (line 911): https://github.com/NativeScript/firebase/blob/main/packages/firebase-auth/index.ios.ts#:~:text=fetchSignInMethodsForEmail
A quick check for truthiness or an explicit null check should be sufficient:
this.native.fetchSignInMethodsForEmailCompletion(email, (emails, error) => { if (error) { reject(FirebaseError.fromNative(error)); } else { const arr = []; if (emails) { emails.enumerateObjectsUsingBlock((email) => { arr.push(email); }); } resolve(arr); } });
The text was updated successfully, but these errors were encountered: