-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SignInWithPhoneNumber fails on emulator due to missing browser dependency #2164
Comments
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 |
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
This is the stack trace:
And indeed the problem goes away by adding the dependency: |
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 😅 firebase/flutterfire#4249 (that PR is in progress) I'd be interested what |
Yes, I am using FlutterFire. I will attach my YAML file:
This is the output of
|
It appears that the dependency |
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...
|
Hi there!
Unfortunately this isn't specific enough for me to make any sort of recommendation, however if I just focus on
All I can vouch for is what I had working for my PR when I posted it firebase/flutterfire#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 |
@malcolmdeck this appears to be a current issue, we're still reproducing this with BoM 26.2.0, can you reopen? |
(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 🤣 |
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 |
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. |
The reCAPTCHA auth flow requires androidx.browser but it is not specified as a transitive dependency upstream, so it crashes. I attempted to use as wide a version range as I felt safe, and provided an override if you specify "androidxBrowserVersion" in your android/build.gradle ext config block Related #4744 Related firebase/firebase-android-sdk#2164 This may be removed when the upstream issue is closed.
The reCAPTCHA auth flow requires androidx.browser but it is not specified as a transitive dependency upstream, so it crashes. I attempted to use as wide a version range as I felt safe, and provided an override if you specify "androidxBrowserVersion" in your android/build.gradle ext config block Related #4744 Related firebase/firebase-android-sdk#2164 This may be removed when the upstream issue is closed.
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. firebase-android-sdk/firebase-inappmessaging-display/firebase-inappmessaging-display.gradle Line 81 in 88cda26
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 ! 🎆
|
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:
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
"@react-native-firebase/app": "^8.4.7",
"@react-native-firebase/auth": "^9.3.2",
[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 invertase/react-native-firebase#4490
The text was updated successfully, but these errors were encountered: