-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[🐛] iOS Bug auth/network-request-failed when user has stable wifi #4934
Comments
I'm 99% sure this is going to be in firebase-ios-sdk - strongly recommend getting a reproduction together at that level based on their quickstart https://github.com/firebase/quickstart-ios/tree/master/authentication and/or searching their issues list |
@mikehardy What does the Error:
NetInfo:
Also the fact that the error occurred and sentry received the error immediately after with a few seconds of latency: You guys have this error in this codebase but I'm not sure what it signifies:
The ios sdk has this: But this error happens to users with a good Wifi connection so I'm stumped as to why they are getting this error. I'll post in that repo but want to get your input :) |
Glad you grep'ed through the codebase(s), that was actually my next thought. The error message descriptions themselves are "as expected" I'd say but that's not really much help. It would definitely help to see when that constant from FIRAuthInternalError.h is used to see what possible scenarios could generate it As a thought exercise, I wonder if there is some confusion on when things are attempted, vs when they return, vs when they are reported. By which I mean, perhaps the wall clock way things are happening is more like:
I have no actual evidence to base that scenario / hypothesis on but if you are able to reproduce this (maybe you have some friendly beta tester that gets it all the time?) you could put a bunch more logging / instrumentation in at each step - taking care to log time the event happened vs time it was received on server) and perhaps learn something Other than that hand-wavy thought I do not have any direct experience or other ideas on this one at the moment, sorry |
Hello 👋, to help manage issues we automatically close stale issues.
|
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information. |
I am having the same issue on iOS and I am not using a VPN. @watadarkstar Have you found any solution? |
I wanted to share my specific scenario. I am getting this error, but only when attempting to use the Firebase Authentication Emulator. In production, I am not experiencing any issues like this. Hopefully this might provide a little insight into what might be the root cause. I'm experiencing this issue both with and without a VPN running. This bug is unfortunate, because it also means the functions emulator is completely useless to me, since my functions also depend on authentication. |
@traviswimer that is still unexpected, we are certainly using the auth emulator in our e2e test harness - #4552 - and have been for nearly a year 🤔 react-native-firebase/tests/app.js Line 51 in aabb075
|
@mikehardy Thanks for pointing me in the direction of the e2e tests. This helped me eventually figure out the solution to my problem. In my last comment, I forgot to clarify that I am experience this while using Anyway, I figured out that this error only occurs when I am using a real iOS device, and it seems to work fine on the iPhone simulator. The problem is that passing a I'm not entirely certain why, but I also needed to update
So, I don't think this issue is really a bug, but it's also not ideal/intuitive. I think the reason I was so confused by this error is that all my other network requests were working fine and were using I guess I assumed that react-native was doing some kind of magic to automatically make Also, I am using react-native-debugger to view network requests, and the requests to the Auth emulator were not showing up. This led to my false assumption that the error was occurring prior to even making any actual network request. So, without having much knowledge of the inner-workings of
Do you think it would be worthwhile for me to open feature requests for these ideas? |
We already do re-mapping for DX improvement on the android side: react-native-firebase/packages/auth/lib/index.js Lines 362 to 377 in aabb075
Seems like for the iOS side this could be considered a natural extension - as long as it was boldly logged (to avoid the confusion, I can't think of a better way?) something like this could go through, sure |
@traviswimer I'm currently experiencing the same issue - unable to use the emulator on a real iOS device, but can access it fine with iOS simulator. I'm using Constantly getting this error with a real device:
I've updated firebase.json config to add the host to auth:
And these addresses run the emulator fine in iOS simulator:
I updated the IP to my hostname but that still results in the same network error.
Any ideas what I may be missing? Thanks |
Have submitted a separate issue for this #8060 |
Issue
We have a ton of sentry logs indicating that
getIdToken
is failing withauth/network-request-failed
:But you can see in the provided screenshot that the user clearly has a stable wifi connection:
Project Files
Javascript
Click To Expand
package.json
:iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android (Not a bug on Android)
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:e.g. 5.4.3
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y/N
&VERSION
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: