FirebaseUI-Android: Only Telenor network operator Number is getting error 39 on requesting otp

Welcome to FirebaseUI and thanks for submitting an issue!

Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.

If not, please feel free to fill in the following info so we can help faster!

Step 1: Are you in the right place?

  • For issues or feature requests related to the code in this repository file a GitHub issue.
  • For general technical questions, post a question on StackOverflow tagged appropriately.
  • For general Firebase discussion, use the firebase-talk google group
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel

Step 2: Describe your environment

Only Telenor network operator Number is giving error 39 in pakistan all other network are working fine and receving otp. IMG-20231006-WA0037

  • Android device: Emulator and Physical
  • Android OS version: 5.0 and above
  • Google Play Services version: 23.37.17
  • Firebase/Play Services SDK version: 20.4.0
  • FirebaseUI version: 21.1.0

Step 3: Describe the problem:

Steps to reproduce:

  1. Download this app https://play.google.com/store/apps/details?id=com.app.bikjaa
  2. In Welcom screen press button “login with phone”
  3. Enter any Telenor number staring from (034…) with selecting pakistan as country code +92
  4. [0340 7795694] [0343 7340100] [0347 1447099] [0342 4215519] with selecting pakistan as country code +92
  5. error code 39 come
  6. Run the app in both emulator or physical device

Observed Results:

  • What happened? This could be a description, logcat output, etc. In mobile error 39 comes

[SmsRetrieverHelper] SMS verification code request failed: unknown status code: 17499 Error code:39 AuthUI E A sign-in error occurred. com.google.firebase.FirebaseException: An internal error has occurred. [ Error code:39 ] at com.google.android.gms.internal.firebase-auth-api.zzxc.zza(com.google.firebase:firebase-auth@@21.1.0:6) at com.google.android.gms.internal.firebase-auth-api.zzxw.zza(com.google.firebase:firebase-auth@@21.1.0:1) at com.google.android.gms.internal.firebase-auth-api.zzxx.run(com.google.firebase:firebase-auth@@21.1.0:3) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:233) at android.os.Looper.loop(Looper.java:334) at android.app.ActivityThread.main(ActivityThread.java:8399) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)

Expected Results:

otp should be sent to user

Relevant Code:

// code here to reproduce the problem

/**
 * Funtions for login using Mobile OTP
 */
//
private fun verifyMobileNumber() {
    // Choose authentication providers
    val providers = mutableListOf(
            PhoneBuilder().setDefaultCountryIso("PK").build()
    )
    // Create and launch sign-in intent
    startActivityForResult(
            AuthUI.getInstance()
                    .createSignInIntentBuilder()
                    .setAvailableProviders(providers)
                    .setTosAndPrivacyPolicyUrls("https://bikjaa.pk/pages/terms-of-use",
                            "https://bikjaa.pk/pages/privacy-policy")
                    .setAlwaysShowSignInMethodScreen(true)
                    .setTheme(R.style.OTPTheme)
                    .build(),
            APP_REQUEST_CODE
    )
}

my build.gradle file is implementation ‘com.google.android.gms:play-services-location:17.0.0’ implementation ‘com.google.android.gms:play-services-maps:17.0.0’ implementation ‘com.google.android.gms:play-services-wallet:19.1.0’ implementation ‘com.google.android.libraries.places:places:3.0.0’ implementation ‘com.google.android.gms:play-services-auth:20.4.0’ implementation ‘com.google.firebase:firebase-messaging:23.1.1’ implementation ‘com.google.firebase:firebase-core:21.1.1’ implementation (‘com.google.firebase:firebase-auth:21.1.0’) { exclude module: “play-services-safetynet” } implementation ‘com.firebaseui:firebase-ui-auth:7.0.0’

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16 (2 by maintainers)

Most upvoted comments

"I have encountered this issue multiple times, and despite several attempts, it has not been resolved. Interestingly, the application functions properly when using a different network, such as Zong, but the problem persists when using the Telenor network

Is there a solution for this? Our application is stuck in production and there is no way for our users to login! Ive tried loging from different operators: OTP is not being received on: Ufone, Telenor. OTP is being received on: Jazz, Zong, Warid. as of 21st Feb 2024

Who should i contact to get this issue resolved ASAP?

I am facing the issue from last 6 months both Ufone and Telenor phone numbers.

@ba138 Please contact Firebase support they should be able to address the issue.

Hey @mohsiniqbalcui

Code 39 indicates that you have tried too many times, as explained here. Can you please wait a few minutes for it to cool down and try again?

If the problem persists or if you think this is only related to that network operator, please contact Firebase support, as that issue doesn’t seem to be related to FirebaseUI-Android directly. You can reference this github issue when you fill the support form to help them understand the problem.