-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Needs AttentionThis issue needs maintainer attention.This issue needs maintainer attention.resolution: userThis was a user issue, e.g. invalid configuration or code.This was a user issue, e.g. invalid configuration or code.type: bugSomething isn't workingSomething isn't working
Description
Bug report
My phone cannot connect to the local firebase emulator. Error produced:
[cloud_firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
8.0.0 - [Firebase/Firestore][I-FST000001] WatchStream (2802ac918) Stream error: 'Unavailable: failed to connect to all addresses'
8.0.0 - [Firebase/Firestore][I-FST000001] Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: failed to connect to all addresses
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
8.0.0 - [Firebase/Firestore][I-FST000001] WatchStream (2802ac918) Stream error: 'Unavailable: failed to connect to all addresses'
and
NSLocalizedDescription=Could not connect to the server., NSErrorFailingURLStringKey=http://192.168.1.105:9099/www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=aasdasdasdasdasdasd, NSErrorFailingURLKey=http://192.168.1.105:9099/www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=aasdasdasdasdasdasd, _kCFStreamErrorDomainKey=1}
Steps to reproduce
In main() use
192.168.1.105 is my laptops ip on my LAN
I have only tried this on my iOS phone
WidgetsFlutterBinding.ensureInitialized();
///Initialise firebase
await Firebase.initializeApp();
// [Firestore | localhost:8080]
FirebaseFirestore.instance.settings = const Settings(
host: "192.168.1.105:8080",
sslEnabled: false,
persistenceEnabled: false,
);
// [Authentication | localhost:9099]
await FirebaseAuth.instance.useEmulator("http://192.168.1.105:9099");
FirebaseFunctions.instance.useFunctionsEmulator(
origin: "http://192.168.1.105:5001"
);
// [Storage | localhost:9199]
await FirebaseStorage.instance.useEmulator(
host: "192.168.1.105",
port: 9199,
);
Expected behavior
Connect to the firebase local emulator
Flutter doctor
Run flutter doctor
and paste the output below:
Click To Expand
[✓] Flutter (Channel stable, 2.0.6, on macOS 11.3.1 20E241 darwin-x64, locale
en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for
more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] Connected device (2 available)
! Doctor found issues in 1 category.
Flutter dependencies
Run flutter pub deps -- --style=compact
and paste the output below:
Click To Expand
- cloud_firestore_platform_interface 5.1.0 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.1.0 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- cloud_functions_platform_interface 5.0.5 [firebase_core flutter meta plugin_platform_interface]
- cloud_functions_web 4.0.7 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase 9.0.1 [http http_parser js]
- firebase_analytics_platform_interface 2.0.1 [flutter meta]
- firebase_analytics_web 0.3.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
- firebase_auth_platform_interface 4.2.3 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 1.1.3 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.0.1 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.1.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.0.4 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 3.0.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 2.0.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- firebase_remote_config_platform_interface 0.3.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_storage_platform_interface 2.1.0 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 1.1.0 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta]
- shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
- shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
- shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
- sky_engine 0.0.99
- source_span 1.8.0 [charcode collection path term_glyph]
- sprintf 6.0.0
- sqflite 2.0.0+3 [flutter sqflite_common path]
- sqflite_common 2.0.0+2 [synchronized path meta]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- synchronized 3.0.0
- term_glyph 1.2.0
- test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- tuple 1.0.3 [quiver]
- typed_data 1.3.0 [collection]
- unicode 0.2.4 [lists]
- url_launcher_linux 2.0.0 [flutter]
- url_launcher_macos 2.0.0 [flutter]
- url_launcher_platform_interface 2.0.3 [flutter plugin_platform_interface]
- url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins]
- url_launcher_windows 2.0.0 [flutter]
- uuid 3.0.4 [crypto]
- vector_math 2.1.0
- video_player_platform_interface 4.1.0 [flutter meta flutter_test]
- video_player_web 2.0.0 [flutter flutter_web_plugins meta video_player_platform_interface]
- win32 2.0.5 [ffi]
- wkt_parser 1.0.7
- xdg_directories 0.2.0 [meta path process]
- xml 5.1.1 [collection meta petitparser]
Metadata
Metadata
Assignees
Labels
Needs AttentionThis issue needs maintainer attention.This issue needs maintainer attention.resolution: userThis was a user issue, e.g. invalid configuration or code.This was a user issue, e.g. invalid configuration or code.type: bugSomething isn't workingSomething isn't working