firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.57k stars 3.94k forks source link

Google Signin Firebase: Google signin not working in release mode #12599

Closed ibragimazizli closed 4 months ago

ibragimazizli commented 4 months ago

Is there an existing issue for this?

Which plugins are affected?

Auth

Which platforms are affected?

Android

Description

Description

Hello everyone.

I added firebase phone auth in my app. but it's not sending sms codes to devices. ( real device) sometimes test numbers works fine. but after couple of hours it stop working.

I've added sha1 sha256 keys from google console and local keys and it still not working. I've done all the things internet says about it but it still not working:

Flutter doctor:


flutter doctor -v 
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale en-AZ)
    • Flutter version 3.19.5 on channel stable at /Users/ibrahimebdulezizli/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (7 days ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/ibrahimebdulezizli/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/ibrahimebdulezizli/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.87.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 14 (API 34) (emulator)
    • iPhone (mobile)             • 00008110-001C10A922D9401E • ios            • iOS 17.4.1 21E236
    • macOS (desktop)             • macos                     • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 123.0.6312.106
      local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

build.gradle:


dependencies {
    // Import the BoM for the Firebase platform
    implementation platform('com.google.firebase:firebase-bom:32.8.0')
    implementation 'com.android.billingclient:billing:6.2.0'
    // Add the dependencies for the App Check libraries
    implementation 'com.android.support:multidex:2.0.1'
    // When using the BoM, you don't specify versions in Firebase library dependencies
    implementation("com.google.firebase:firebase-appcheck-playintegrity")
    implementation("com.google.firebase:firebase-auth-ktx") -----> ( I've used auth and auth-ktx nothing changes)
    implementation("com.google.firebase:firebase-appcheck-debug:16.0.0-beta01")
    implementation ("com.google.android.play:integrity:1.3.0")
    implementation 'com.facebook.android:facebook-login:latest.release'
    implementation("com.google.firebase:firebase-analytics")
    implementation("com.google.firebase:firebase-crashlytics")
    implementation("com.google.firebase:firebase-perf")
    // local notification
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
    implementation 'androidx.browser:browser:1.3.0' 
    implementation 'com.google.android.gms:play-services-safetynet:18.0.1'
    implementation 'androidx.window:window:1.1.0-alpha04'
    implementation 'androidx.window:window-java:1.0.0'

}

Reproducing the issue

I've added all the sha keys from play store, debug and release keys. In ios google signin works ok but in android relase mode its not working. email choosing screens pops up and after choosing account nothing happens. in debug mode it works ok

Firebase Core version

2.28.0

Flutter Version

3.19.5

Relevant Log Output

No response

Flutter dependencies

Dart SDK 3.3.3 Flutter SDK 3.19.5 burda 1.0.1+7

dependencies:

dev dependencies:

dependency overrides:

transitive dependencies:

Additional context and comments

No response

russellwheatley commented 4 months ago

Hi @ibragimazizli - it appears you have a near identical issue already open here: https://github.com/firebase/flutterfire/issues/12594

closing out in favour of that issue.

ibragimazizli commented 4 months ago

Hi @ibragimazizli - it appears you have a near identical issue already open here: #12594

closing out in favour of that issue.

Thanks. But i'm still not able to authenticate users.is this because of my conf and code or package issue?