Firebase-admin-node: development_mode_mismatch when we try to patch whitelisted phone number

Created on 30 Nov 2018  路  16Comments  路  Source: firebase/firebase-admin-node

Environment

  • Operating System version: Ubuntu 14
  • Firebase library: firebase-admin-node
  • Library version: 6.3.0
  • Firebase Product: auth

Problem

Steps to reproduce:

When we patch whitelisted phone number by passing same phone number as one of argument, it corrupts the auth record and doesn't allow us to login later. Is this intended behavior? We shouldn't be sending phoneNumber as one of argument to update call for whitelisted numbers? It works fine for regular numbers.

  1. Whitelist a phone number from phone auth provider.
  2. Login with whitelisted number and logout.
  3. Patch whitelisted number using updateUser method by passing same number as one of UpdateRequest property (phoneNumber).
  4. Try to sign in with whitelisted number again. Sign in fails with following error. DEVELOPMENT_MODE_MISMATCH.

image

auth

Most helpful comment

Facing the same issue:
com.google.firebase.FirebaseException: An internal error has occurred. [ DEVELOPMENT_MODE_MISMATCH:Non-development mode Verification Proof given in development mode request. ] while using test account. No problem while using real number.

All 16 comments

It seems like you already created a user with that phone number in step 2 (login with whitelisted number will create a user). Are you calling updateUser on a different user record with the same phone number? If so that should not work. 2 users can't have the same phone number.

I'm calling updateUser on same user record with same phoneNumber.

  • For regular phone number, this operation goes fine and sign in works perfectly.
  • For whitelisted phone number, this operation does goes fine but we can't sign in any longer and get error I posted above. (development_mode_mismatch)

So ideally if this operation isn't allowed then it shouldn't work for regular phone numbers too.

I see. So you are saying that updateUser works with the test phone number on same user but sign in will fail after that. Seems like a bug. I will notify the right channels about this.

That's correct.

any news?

We probably won't have an update for a few weeks (at least until holidays are over). @pratiknikam are you also encountering this issue? Any additional debug info you can add to the issue?

I was encountering issue until we found out what's causing it. So we put workaround in place. Steps to reproduce an issue are mentioned above.

Workaround is not to patch whitelisted phone with phoneNumber as one of argument.

I've got the same error while tried to sign in with previously created (from Admin SDK) user. After i've read here that "login with whitelisted number will create a user" I've deleted user and the sign in started to work (and the user was automatically added with first sign in).

@paveli If you patch that number by passing same number as one of argument (phoneNumber) then sign in will fail after that. That's what my issue is about.

We're experiencing the same problem, and it's blocking us to use a 'test account' tied to a test phonenumber. Now we need to sign in with regular phone numbers to tie them to a user, that surely can't be the way :) ?

The fix should be in prod at this point. You should not be getting the development_mode_mismatch error anymore.

Closing as per the last comment. Please report if the problem is observed again.

We're experiencing the same problem, so we cant use test account. We have to use real phone number to debug. Any news?

Facing the same issue:
com.google.firebase.FirebaseException: An internal error has occurred. [ DEVELOPMENT_MODE_MISMATCH:Non-development mode Verification Proof given in development mode request. ] while using test account. No problem while using real number.

Facing the same issue:
PlatformException (PlatformException(FirebaseException, An internal error has occurred. [ DEVELOPMENT_MODE_MISMATCH:Non-development mode Verification Proof given in development mode request.

Was this page helpful?
0 / 5 - 0 ratings