Closed jeremycod closed 3 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Just saw this, thanks for logging it upstream @jeremycod - my best analysis from the linked issue is that this is just a missing dependency in the firebase-android-sdk auth package's gradle as noted here. Happy to adjust what @react-native-firebase/auth
does downstream if my diagnosis was incorrect
Yeah, there was a problem in the 20.0.0 release that required the addition of that dependency. I think I fixed it in 20.0.1 (which is BoM version 26.1.0), but please reopen this if it's still popping up for you after switch dep versions
Yep - looks like they fixed it, I noted that in the release notes too but forgot to bring that info back here :-)
This problem occurs in 26.1.0 too.
Hey @k-zen , thanks for the report. Can you please share the build.gradle of a minimal reproduction of the issue so I can try to make this happen on my end?
This is my app/build.gradle
file. The bug occurs in a Nokia 3.1 Plus running Android 10, plus the latest Flutter version.
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "..."
minSdkVersion 18
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:26.1.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth'
// implementation "androidx.browser:browser:1.2.0"
}
This is the stack trace:
E/AndroidRuntime( 8224): java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/browser/customtabs/CustomTabsIntent$Builder;
E/AndroidRuntime( 8224): at com.google.firebase.auth.internal.RecaptchaActivity.zza(com.google.firebase:firebase-auth@@20.0.1:13)
E/AndroidRuntime( 8224): at com.google.android.gms.internal.firebase-auth-api.zzth.zzb(com.google.firebase:firebase-auth@@20.0.1:7)
E/AndroidRuntime( 8224): at com.google.android.gms.internal.firebase-auth-api.zzth.onPostExecute(Unknown Source:2)
E/AndroidRuntime( 8224): at android.os.AsyncTask.finish(AsyncTask.java:755)
E/AndroidRuntime( 8224): at android.os.AsyncTask.access$900(AsyncTask.java:192)
E/AndroidRuntime( 8224): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
E/AndroidRuntime( 8224): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime( 8224): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime( 8224): at android.app.ActivityThread.main(ActivityThread.java:7386)
E/AndroidRuntime( 8224): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8224): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/AndroidRuntime( 8224): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
And indeed the problem goes away by adding the dependency: implementation "androidx.browser:browser:1.2.0"
Out of curiosity @k-zen - how are you getting the latest BoM 26.1.0 to work with Flutter? Are you using FlutterFire?
I ask because I wasn't aware v26 was possible for FlutterFire yet, and I'm the person working on it :sweat_smile: https://github.com/FirebaseExtended/flutterfire/pull/4249 (that PR is in progress)
I'd be interested what ./gradlew dependencies
(or maybe ./gradlew :app:dependencies
(sometimes the ':app:' is important) says with regard to what is actually being resolved for you as far as versions
Yes, I am using FlutterFire. I will attach my YAML file:
name: ...
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: any
rxdart: any
path_provider: any
image_picker: any
pedantic: any
http: any
json_annotation: any
build_runner: any
json_serializable: any
flutter_secure_storage: any
shared_preferences: any
google_fonts: any
firebase_core: any
firebase_auth: any
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
...
This is the output of ./gradlew :app:dependencies
for debugRuntimeClasspath
:
+--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e
| +--- androidx.lifecycle:lifecycle-common:2.2.0
| | \--- androidx.annotation:annotation:1.1.0
| +--- androidx.lifecycle:lifecycle-common-java8:2.2.0
| | +--- androidx.lifecycle:lifecycle-common:2.2.0 (*)
| | \--- androidx.annotation:annotation:1.1.0
| +--- androidx.lifecycle:lifecycle-runtime:2.2.0
| | +--- androidx.lifecycle:lifecycle-common:2.2.0 (*)
| | +--- androidx.arch.core:core-common:2.1.0
| | | \--- androidx.annotation:annotation:1.1.0
| | \--- androidx.annotation:annotation:1.1.0
| +--- androidx.fragment:fragment:1.1.0
| | +--- androidx.annotation:annotation:1.1.0
| | +--- androidx.core:core:1.1.0
| | | +--- androidx.annotation:annotation:1.1.0
| | | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.2.0 (*)
| | | +--- androidx.versionedparcelable:versionedparcelable:1.1.0
| | | | +--- androidx.annotation:annotation:1.1.0
| | | | \--- androidx.collection:collection:1.0.0 -> 1.1.0
| | | | \--- androidx.annotation:annotation:1.1.0
| | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | +--- androidx.collection:collection:1.1.0 (*)
| | +--- androidx.viewpager:viewpager:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | | \--- androidx.customview:customview:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | \--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | +--- androidx.loader:loader:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | +--- androidx.arch.core:core-runtime:2.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | | | \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
| | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | +--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.2.0 (*)
| | | | | +--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
| | | | | \--- androidx.arch.core:core-runtime:2.0.0 (*)
| | | | \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
| | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.1.0
| | | \--- androidx.annotation:annotation:1.1.0
| | +--- androidx.activity:activity:1.0.0
| | | +--- androidx.annotation:annotation:1.1.0
| | | +--- androidx.core:core:1.1.0 (*)
| | | +--- androidx.lifecycle:lifecycle-runtime:2.1.0 -> 2.2.0 (*)
| | | +--- androidx.lifecycle:lifecycle-viewmodel:2.1.0 (*)
| | | \--- androidx.savedstate:savedstate:1.0.0
| | | +--- androidx.annotation:annotation:1.1.0
| | | +--- androidx.arch.core:core-common:2.0.1 -> 2.1.0 (*)
| | | \--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.2.0 (*)
| | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.1.0 (*)
| \--- androidx.annotation:annotation:1.1.0
+--- io.flutter:armeabi_v7a_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e
+--- io.flutter:arm64_v8a_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e
+--- io.flutter:x86_64_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e
+--- io.flutter:x86_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50
| +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
| \--- org.jetbrains:annotations:13.0
+--- com.google.firebase:firebase-bom:26.1.0
| +--- com.google.firebase:firebase-analytics:18.0.0 (c)
| +--- com.google.firebase:firebase-auth:20.0.1 (c)
| +--- com.google.firebase:firebase-core:18.0.0 (c)
| +--- com.google.firebase:firebase-common:19.4.0 (c)
| \--- com.google.firebase:firebase-installations:16.3.4 (c)
+--- com.google.firebase:firebase-analytics -> 18.0.0
| +--- com.google.android.gms:play-services-measurement:18.0.0
| | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | +--- androidx.legacy:legacy-support-core-utils:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | | +--- androidx.documentfile:documentfile:1.0.0
| | | | \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | +--- androidx.loader:loader:1.0.0 (*)
| | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
| | | | \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | | \--- androidx.print:print:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| | +--- com.google.android.gms:play-services-ads-identifier:17.0.0
| | | \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0
| | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | | +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | | \--- androidx.fragment:fragment:1.0.0 -> 1.1.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | +--- com.google.android.gms:play-services-measurement-base:18.0.0
| | | \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | +--- com.google.android.gms:play-services-measurement-impl:18.0.0
| | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | | +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | | +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
| | | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | | +--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
| | | \--- com.google.android.gms:play-services-stats:17.0.0
| | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | \--- com.google.android.gms:play-services-stats:17.0.0 (*)
| +--- com.google.android.gms:play-services-measurement-api:18.0.0
| | +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | +--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
| | +--- com.google.android.gms:play-services-measurement-sdk-api:18.0.0
| | | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | | \--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
| | +--- com.google.android.gms:play-services-tasks:17.0.0
| | | \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | +--- com.google.firebase:firebase-common:19.3.0 -> 19.4.0
| | | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | | +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | | \--- com.google.firebase:firebase-components:16.0.1
| | | \--- androidx.annotation:annotation:1.1.0
| | +--- com.google.firebase:firebase-components:16.0.0 -> 16.0.1 (*)
| | +--- com.google.firebase:firebase-installations:16.3.2 -> 16.3.4
| | | +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | | +--- com.google.firebase:firebase-common:19.4.0 (*)
| | | +--- com.google.firebase:firebase-components:16.0.0 -> 16.0.1 (*)
| | | \--- com.google.firebase:firebase-installations-interop:16.0.0
| | | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | +--- com.google.firebase:firebase-installations-interop:16.0.0 (*)
| | \--- com.google.firebase:firebase-measurement-connector:18.0.0
| | \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| \--- com.google.android.gms:play-services-measurement-sdk:18.0.0
| +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| +--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
| \--- com.google.android.gms:play-services-measurement-impl:18.0.0 (*)
+--- com.google.firebase:firebase-auth -> 20.0.1
| +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| +--- androidx.fragment:fragment:1.0.0 -> 1.1.0 (*)
| +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 (*)
| +--- com.google.android.gms:play-services-auth-api-phone:17.4.0
| | +--- com.google.android.gms:play-services-base:17.1.0
| | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | | +--- androidx.core:core:1.0.0 -> 1.1.0 (*)
| | | +--- androidx.fragment:fragment:1.0.0 -> 1.1.0 (*)
| | | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.1.0 (*)
| | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| +--- com.google.android.gms:play-services-base:17.1.0 (*)
| +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| +--- com.google.android.gms:play-services-safetynet:17.0.0
| | +--- com.google.android.gms:play-services-base:17.0.0 -> 17.1.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| +--- com.google.firebase:firebase-auth-interop:19.0.0
| | +--- com.google.android.gms:play-services-base:17.0.0 -> 17.1.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.0 (*)
| | +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| | \--- com.google.firebase:firebase-common:19.0.0 -> 19.4.0 (*)
| +--- com.google.firebase:firebase-common:19.4.0 (*)
| \--- com.google.firebase:firebase-components:16.0.1 (*)
+--- androidx.browser:browser:1.2.0
| +--- androidx.core:core:1.1.0 (*)
| +--- androidx.annotation:annotation:1.1.0
| +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
| +--- androidx.collection:collection:1.1.0 (*)
| +--- androidx.concurrent:concurrent-futures:1.0.0
| | +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
| | \--- androidx.annotation:annotation:1.1.0
| \--- androidx.interpolator:interpolator:1.0.0
| \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
+--- project :firebase_auth
| +--- project :firebase_core
| | +--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
| | +--- com.google.firebase:firebase-bom:25.12.0 -> 26.1.0 (*)
| | +--- com.google.firebase:firebase-core -> 18.0.0
| | | \--- com.google.firebase:firebase-analytics:18.0.0 (*)
| | \--- androidx.annotation:annotation:1.1.0
| +--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
| +--- com.google.firebase:firebase-bom:25.12.0 -> 26.1.0 (*)
| +--- com.google.firebase:firebase-auth -> 20.0.1 (*)
| \--- androidx.annotation:annotation:1.1.0
+--- project :shared_preferences
| \--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
+--- project :flutter_secure_storage
| \--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
+--- project :image_picker
| +--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
| +--- androidx.core:core:1.0.2 -> 1.1.0 (*)
| +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
| +--- androidx.exifinterface:exifinterface:1.3.0
| | \--- androidx.annotation:annotation:1.1.0
| \--- project :flutter_plugin_android_lifecycle
| +--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
| \--- androidx.annotation:annotation:1.1.0
+--- project :flutter_plugin_android_lifecycle (*)
+--- project :path_provider
| +--- io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e (*)
| +--- androidx.annotation:annotation:1.1.0
| \--- com.google.guava:guava:28.1-android
| +--- com.google.guava:failureaccess:1.0.1
| +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
| +--- com.google.code.findbugs:jsr305:3.0.2
| +--- org.checkerframework:checker-compat-qual:2.5.5
| +--- com.google.errorprone:error_prone_annotations:2.3.2
| +--- com.google.j2objc:j2objc-annotations:1.3
| \--- org.codehaus.mojo:animal-sniffer-annotations:1.18
\--- project :firebase_core (*)
It appears that the dependency androidx.browser:browser:1.2.0
is in the runtime classpath, but unless I explicitly declare it in the app/build.gradle
file, the App crashes. Let me know if you need more info @mikehardy.
No, I think at this point it'll be in @malcolmdeck - I just saw mention of flutter and as I'm working on forward-porting to the BoM you referenced I was curious. That BoM will work for you as long as you don't try any of the ML packages or Remote Config I suppose on Android, and on iOS ML/RemoteConfig/Messaging will all likely break with firebase-ios-sdk v7+, so take care :-)
Hey @jeremycod. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@jeremycod if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
For future Googlers, need to ask... @mikehardy We are kinda in a mess right now with these dependencies. I'm using FlutterFire for Auth/Crashlytics/Analytics/Firestore How should my build.gradle files look like? What's the current optimum? I was also using 26.2.0 BoM because if I don't I can't get response from Analytics or Crashlytics. As soon as I added the bom, things started to work magically but other stuff started to break. Here are the build.gradle files I'm using. Analytics documentation is a mess, so I decided to improvise. Any suggestions? Thanks !
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
implementation platform('com.google.firebase:firebase-bom:26.2.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation "androidx.browser:browser:1.3.0"
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
}
Hi there!
other stuff started to break
Unfortunately this isn't specific enough for me to make any sort of recommendation, however if I just focus on
How should my build.gradle files look like? What's the current optimum?
All I can vouch for is what I had working for my PR when I posted it https://github.com/FirebaseExtended/flutterfire/pull/4249
The team there has been very focused on other efforts and the holidays happened so it hasn't merged yet and I've let it sit myself (for same reason: focused elsewhere + holidays) so it has been decaying via entropy for 26 days but it did work at last check.
If you are here just for the auth missing browser dependency I would not use my somewhat speculative PR to flutterfire, I would use their standard current stable release, and just add implementation "androidx.browser:browser:1.3.0"
. If other things aren't working, I would work on them with a bom 25.12.x - I believe that works with their current stable
@malcolmdeck this appears to be a current issue, we're still reproducing this with BoM 26.2.0, can you reopen?
https://github.com/invertase/react-native-firebase/issues/4744
(for reproduction purposes, you can always generate a complete ready to go reproduction with this https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh for react-native-firebase issues - as this is reproducible with react-native-firebase on BoM 26.2.0 - which you will get with that demo as it is what we are pinned to right now on our current stable version - the build.gradles from there should be representative and then you'd trigger it with a non-GMS device I suppose, like recent Huawei - let me know if you need any help, I maintain react-native-firebase and interact with firebase-ios-sdk and firebase-android-sdk repos daily)
Since there haven't been any recent updates here, I am going to close this issue.
@jeremycod if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
The google-oss-bot appears to be just a bit out of control 😅 @malcolmdeck
@malcolmdeck this should be open, it is an unresolved issue. Reports coming from flutter_fire now as well, now that they are using the firebase-android-sdk versions that are affected (i.e., current ones).
Since there haven't been any recent updates here, I am going to close this issue.
@jeremycod if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
@malcolmdeck I feel like I'm just being punked at this point :rofl:
I don't know why google-oss-bot is closing it again and again. This issue is even reproduceable in Unity3D with firebase_unity_sdk_7.0.2 for .NET 4. Stack trace is exactly the same and adding implementation 'androidx.browser:browser:1.3.0' fixed it. @malcolmdeck @mikehardy
Sorry, I think the bot works by examining labels and dates and I forgot to remove needs-info
. Anyways, I'm taking a look
implementation 'androidx.browser:browser:1.3.0
Fixed with me
Same issue on a real device refer https://stackoverflow.com/questions/65839861/app-crash-while-using-firebase-phone-auth-in-android/65840172#65840172
This will be an issue for any usage of the recaptcha flow until fixed. Emulator, real device, any usage.
The title of this issue should be updated then
I am also facing this otp login recaptcha issue as my flutter app closes and console shows lost connection.
This is still an issue with firebase-android-sdk BoM v26.7.0
I see that in-app-messaging-display has a dependency on browser already, so if you pull that module in things work but only by chance. auth needs the same dependency or all library consumers have to include workarounds.
I admit that at this point with multiple release cycles coming and going, and the dependency clearly being both necessary (it's a clear crash) and "okay to include" (it's already used in another module), I do not understand why it's not fixed? If the auth module were open source I'd make a PR but it is not, that I know of.
I was loathe to add a dependency that I couldn't understand the need for (given that I can write apps that only rely on Auth, don't include this dep, and don't crash), but you're right - it's causing problems, and adding this dep fixes it, so I have. It'll come out in the next release that Auth is a part of.
@malcolmdeck very happy to hear this! I think it's easy to understand though - auth uses reCAPTCHA on android in certain cases, and reCAPTCHA requires APIs provided by androidx.browser - q.e.d. auth is already factually dependent on androidx.browser and needs to express that in it's dependencies list
Confirmed closed with the latest release, thank you @malcolmdeck ! :fireworks:
./gradlew :app:dependencies
+--- project :react-native-firebase_auth
| +--- project :react-native-firebase_app (*)
| +--- com.facebook.react:react-native:+ -> 0.64.1 (*)
| +--- com.google.firebase:firebase-bom:28.0.1 (*)
| +--- com.google.firebase:firebase-auth -> 21.0.1
| | +--- androidx.browser:browser:1.0.0
Happy to have helped :)
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
I know this is not place to report react-native-firebase, but it seems that the problem is cause by the bug in firebase-android-sdk and could be easily fixed.
Steps to reproduce:
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
Relevant Code:
This code caused app to crash in Android emulator with the following exception:
It seems that auth in this case doesn't add browser which is used for reCAPTCH verification and thus it's causing crash on Android.
Adding
to app/build.gradle solved the issue.
Relevant discussion could be found here https://github.com/invertase/react-native-firebase/issues/4490