-
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
[🐛] Cannot use auth emulator on real iOS device - only on iOS simulator #8060
Comments
Hmmm
How exactly was this build made? Note this interesting case: #8049 (comment) |
This was also built using EAS. It's a development build (I'm not using Expo go). So it appears to be EAS related? |
Yeah, I'm not entirely sure why the EAS build fails vs a local prebuild. Could you try using the prebuild? It's a bit more of a pain to get those builds on device, you'd have to create the IPA/APK yourself and use Expo Orbit / XCode / Android Studio to sign it on device. I haven't tried the emulator on a real device, only sims at the point. Such a strange behaviour! |
🤔 doesn't this seem like it's an Expo error? Like, this should not be happening, and there should be an issue in an Expo issue tracker, and they should fix this? |
@KieranTH I've just done a development build using Did you get it working this way? I have never done a local build, have always used EAS. I've just tested an Android development build built on EAS and am experiencing the same issue. |
Yeah, doing a local build solved it for me! (I didn't use EAS at all, just ran the local build on a sim) That being said, I need to do some extra testing to make sure it's EAS and that EAS isn't a byproduct of another problem. @mikehardy is right though, this doesn't feel like an issue for this project. I'll get time this weekend to do more robust testing and I'll make an issue on Expo if it persists |
@KieranTH I did a local build for Android and got this running but still cannot sign in on device whilst using the auth emulator. I used my IP from https://whatismyipaddress.com/ with the port 9099 - just double checking am I right in using this IP?
|
Have you made sure that your firebase.json has the host set as "0.0.0.0"? Besides that I can't think of any other bits - That being said I don't test on a real device, only on sims, so i can't offer much help sadly! |
@SKempin That is most likely an "externally visible on the internet after your machine has gone through a NAT device" IP address, it is most likely not the IP address of your actual laptop on the internal network it shares with the iOS device On a mac to get your actual IP address on your local network (not what it looks like to external servers on the public internet...) you want to click top right on menu bar on the control center icon then option-click on the wifi thing and you get an augmented wifi dropdown that has your IP address. On windows machines I think you want system preferences -> get into wifi somehow then probably advanced settings? I forget I just do it by muddling through but a search will turn it up for sure Setting the listen IP to 0.0.0.0 for the emulators in firebase.json is also key - great point @KieranTH It is also possible that your local router does not allow connections between devices even on the same network. I personally despite networks set up this way, but it is a configuration option in lots of routers and some routers have it enabled - specifically those that are in for example cafes or hotels where for security reasons I must admit it makes sense to disallow local devices from seeing each other |
@mikehardy @KieranTH Thanks, have tried with the IP as per the Mac WIFI settings, and with the host as This is on an Android device that has been built locally with My router is Google Nest WiFi and I'm able to connect to devices remotely through this. The app is loading but logs the below error when I try to use For the time being I think I will need to create a "staging environment" in the Firebase console and develop any features that require a physical device using that.
|
That slash looks really suspicious 🤔 If I were troubleshooting this I would: 1- make sure I can actually run a simple local connection manually to that IP:port combo, using curl or whatever react-native-firebase/packages/auth/lib/index.js Lines 432 to 468 in 9c94085
3- maybe use Maybe none of it works, I dunno, but those are things I'd try |
Thanks will try the above. |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
Issue
When attempting to run the auth emulator I cannot sign in on a real iOS device. Using iOS simulator works fine. I am using
signInWithEmailAndPassword
.When running my Expo dev build on device and attempting to sign in I am continually met with the following:
ERROR Error: [auth/network-request-failed] A network error has occurred, please try again.
I have tried setting the host address in firebase.json and using my host device IP as discussed but this still results in the same behaviour.
#4934 (comment)
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android (Not able to be tested 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:21
Firebase
module(s) you're using that has the issue:Auth
TypeScript
?Yes 5.3.3
The text was updated successfully, but these errors were encountered: