firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

development_mode_mismatch when we try to patch whitelisted phone number

Open realpratiknikam opened this issue 8 years ago • 16 comments

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

realpratiknikam avatar Nov 30 '18 15:11 realpratiknikam

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.

bojeil-google avatar Nov 30 '18 18:11 bojeil-google

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.

realpratiknikam avatar Nov 30 '18 21:11 realpratiknikam

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.

bojeil-google avatar Nov 30 '18 21:11 bojeil-google

That's correct.

realpratiknikam avatar Dec 01 '18 03:12 realpratiknikam

any news?

long1eu avatar Dec 20 '18 15:12 long1eu

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?

hiranya911 avatar Dec 21 '18 18:12 hiranya911

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.

realpratiknikam avatar Dec 24 '18 04:12 realpratiknikam

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

realpratiknikam avatar Jan 01 '19 15:01 realpratiknikam

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 avatar Jan 10 '19 14:01 paveli

@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.

realpratiknikam avatar Jan 12 '19 22:01 realpratiknikam

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 :) ?

jrnk avatar Jan 21 '19 15:01 jrnk

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

bojeil-google avatar Feb 23 '19 04:02 bojeil-google

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

hiranya911 avatar Feb 25 '19 19:02 hiranya911

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

pedrorau avatar Jan 21 '20 21:01 pedrorau

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.

shivam0x avatar May 05 '20 19:05 shivam0x

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.

peppix2010 avatar May 24 '20 22:05 peppix2010