firebase / firebase/firebase-tools
Emulator on real iOS device: An internal error has occurred
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** 10.1.5
**Platform:** MacOS Monterey 12.1 M1, iPhone 8 iOS 15.1
### [REQUIRED] Test case
See below
### [REQUIRED] Steps to reproduce
1. Run the emulators
2. Add your local computer's IP as host (also tried `0.0.0.0`)
3. For example
```json
"emulators": {
"auth": {
"port": 9099,
"host": "192.168.20.90"
},
"functions": {
"port": 5001,
"host": "192.168.20.90"
},
"firestore": {
"port": 8080,
"host": "192.168.20.90"
},
"hosting": {
"port": 5000,
"host": "192.168.20.90"
},
"ui": {
"enabled": true,
"port": 4000,
"host": "192.168.20.90"
},
"pubsub": {
"port": "8085",
"host": "192.168.20.90"
}
}
```
4. Run the emulators
5. Open a Flutter app
6. Connect to the emulators, e.g.
```dart
String host = '192.168.20.90';
FirebaseFirestore.instance.useFirestoreEmulator(host, 8080);
FirebaseStorage.instance.useStorageEmulator(host, 9199);
FirebaseAuth.instance.useAuthEmulator(host, 9099);
```
7. Observe that no data is returned and the connection fails
8. If you disallow local network connection on your iPhone, the error changes to "you seem to be offline"
9. I can browse to the emulator UI on my real device, so the IP is definitely correct
### [REQUIRED] Expected behavior
My real iOS device to find my local emulator on my laptop
### [REQUIRED] Actual behavior
Flutter Firebase throwing errors
```
GTMSessionFetcher invoking fetch callbacks, data {length = 215, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 ... 205d0a20 207d0a7d }, error Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data={length = 215, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 ... 205d0a20 207d0a7d }, data_content_type=application/json; charset=utf-8}
8.10.0 - [Firebase/Firestore][I-FST000001] WatchStream (1037b0d68) Stream error: 'Unknown: An internal error has occurred, print and inspect the error details for more information.'
```
Contributor guide
Assessment
This issue has not been assessed yet.