W/BiChannelGoogleApi(11149): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.fireb

1,566 views
Skip to first unread message

Gaurav Pant

unread,
Feb 21, 2019, 7:18:18 PM2/21/19
to Flutter Dev
When I am trying to phone authntication I am getting below error.

    W/BiChannelGoogleApi(12340): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@489

I have checked the same error in Stackverflow and other places but not getting proper solution anywhere.

**chnages in pubspec.yml**

    dependencies:
      flutter:
        sdk: flutter
    
      # The following adds the Cupertino Icons font to your application.
      # Use with the CupertinoIcons class for iOS style icons.
      cupertino_icons: ^0.1.2
      firebase_core: ^0.3.0+2  //new
      firebase_auth: ^0.8.1+1  //new

Note -- added //New to highlite the lines which i have added in above file.


Added below line at the end of **app/build.gradle**

    apply plugin: 'com.google.gms.google-services'

android/build.gradle

    buildscript {
        ext.kotlin_version = '1.2.71'
        repositories {
            google()
            jcenter()
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
            classpath 'com.google.gms:google-services:4.2.0'
        }
    }
    
    allprojects {
        repositories {
            google()
            jcenter()
        }
    }
    
    rootProject.buildDir = '../build'
    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    subprojects {
        project.evaluationDependsOn(':app')
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }


android/app/build.gradle

    .....
    android {
        compileSdkVersion 28
        .....
        defaultConfig {
            ....
            minSdkVersion 21
            targetSdkVersion 27
            ......
        }
        .....
        dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
        implementation 'com.google.firebase:firebase-auth:16.1.0'
    //    implementation 'androidx.core:core-ktx:1.0.0'
    }
    
    apply plugin: 'com.google.gms.google-services'

android/app/gradle.properties

    org.gradle.jvmargs=-Xmx1536M
    android.useAndroidX=true
    android.enableJetifier=true

I am using AndroidX and using stable version of Flutter. Can someone help me out here?

Kyle Bedell

unread,
Jul 15, 2019, 3:48:42 AM7/15/19
to Flutter Development (flutter-dev)
Did you figure this out? I just hit this roadblock too.

Gedeon Muissa

unread,
May 6, 2020, 12:25:36 PM5/6/20
to Flutter Development (flutter-dev)
This won't happen if you use a test number. It might be a problem with security. you probably signed up with the same number several time
Reply all
Reply to author
Forward
0 new messages