Closed spacekestrel closed 3 years ago
Hi @spacekestrel
Could you please provide your flutter doctor -v
and flutter pub deps -- --style=compact
?
I just tested this with firebase_auth: ^1.0.3
and both the officially recommended JS import version 7.20.0
and the one you used but didn't see any issues using the official example.
Are you using auth emulator? Could you try the official example as well?
FYI firebase_auth_web
is a transitive dependency for firebase_auth
so you don't need to do anything with it directly.
Thank you
flutter doctor -v :
[β] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19042.685], locale ru-RU)
β’ Flutter version 2.0.3 at C:\Work\SDK\flutter
β’ Framework revision 4d7946a68d (4 weeks ago), 2021-03-18 17:24:33 -0700
β’ Engine revision 3459eb2436
β’ Dart version 2.12.2
[β] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
β’ Android SDK at C:\Users\kestrel\AppData\Local\Android\sdk
β’ Platform android-30, build-tools 30.0.3
β’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
β’ All Android licenses accepted.
[β] Chrome - develop for the web
β’ Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[β] Android Studio (version 4.1.0)
β’ Android Studio at C:\Program Files\Android\Android Studio
β’ Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[β] VS Code, 64-bit edition (version 1.55.0)
β’ VS Code at C:\Program Files\Microsoft VS Code
β’ Flutter extension version 3.21.0
[β] Connected device (3 available)
β’ Windows (desktop) β’ windows β’ windows-x64 β’ Microsoft Windows [Version 10.0.19042.685]
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 89.0.4389.114
β’ Edge (web) β’ edge β’ web-javascript β’ Microsoft Edge 89.0.774.57
flutter pub deps -- --style=compact :
Dart SDK 2.12.2
Flutter SDK 2.0.3
quicklyby_web 1.0.0+1
dependencies:
- address_search_field 3.1.0-nullsafety.0 [flutter flutter_web_plugins http google_maps_flutter]
- awesome_card 1.1.0 [flutter]
- cloud_firestore 1.0.4 [cloud_firestore_platform_interface cloud_firestore_web firebase_core firebase_core_platform_interface flutter meta]
- collapsible_sidebar 1.0.7+2 [flutter]
- condition 0.0.8 [flutter]
- cupertino_icons 1.0.2
- file_picker 3.0.0 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface]
- firebase_auth 1.0.3 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.0.3 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_storage 8.0.3 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_sequence_animation 3.0.1 [flutter meta]
- flutter_spinkit 4.1.2+1 [flutter]
- flutter_switch 0.3.0 [flutter]
- get 3.26.0 [flutter]
- google_maps_flutter 2.0.1 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface]
- google_maps_flutter_web 0.2.1 [flutter flutter_web_plugins meta google_maps_flutter_platform_interface google_maps stream_transform sanitize_html]
- google_nav_bar 5.0.3 [flutter]
- hexcolor 2.0.3 [flutter flutter_web_plugins]
- http 0.13.1 [http_parser meta path pedantic]
- image_picker_web_redux 2.0.0 [flutter flutter_web_plugins]
- intl_phone_field 1.4.4 [flutter]
- line_icons 2.0.1 [flutter]
- multi_image_picker 4.8.00 [flutter meta]
- rflutter_alert 2.0.2 [flutter]
dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
transitive dependencies:
- async 2.5.0 [collection]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.1.0
- charcode 1.2.0
- clock 1.1.0
- cloud_firestore_platform_interface 4.0.1 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 1.0.4 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- collection 1.15.0
- csslib 0.17.0 [source_span]
- fake_async 1.2.0 [clock collection]
- firebase_auth_platform_interface 4.0.2 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 1.0.5 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
- firebase_core_web 1.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_storage_platform_interface 2.0.1 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 1.0.3 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta]
- flutter_plugin_android_lifecycle 2.0.0 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- google_maps 3.4.5 [js_wrapping meta]
- google_maps_flutter_platform_interface 2.0.4 [flutter meta plugin_platform_interface stream_transform collection]
- html 0.15.0 [csslib source_span]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- intl 0.17.0 [clock path]
- js 0.6.3
- js_wrapping 0.5.0
- matcher 0.12.10 [stack_trace]
- meta 1.3.0
- path 1.8.0
- pedantic 1.11.0
- plugin_platform_interface 2.0.0 [meta]
- sanitize_html 2.0.0 [html meta]
- sky_engine 0.0.99
- source_span 1.8.0 [charcode collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- 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]
- typed_data 1.3.0 [collection]
- vector_math 2.1.0
Auth emulator? And what's the official example specifically?
Oh, and when i tried to implement it as in basic example such as:
try {
UserCredential userCredential =
await FirebaseAuth.instance
.createUserWithEmailAndPassword(
email:
"barry.allen@example.com",
password:
"SuperSecretPassword!");
} on FirebaseAuthException catch (e) {
if (e.code == 'weak-password') {
print(
'The password provided is too weak.');
} else if (e.code ==
'email-already-in-use') {
print(
'The account already exists for that email.');
}
} catch (e) {
print(e);
}
Chrome console gave me :
xhrio.js:630 POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key={//here is my key, obviously now for show} net::ERR_CONNECTION_REFUSED
The official example is at https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example/lib
Since I can't reproduce this it could have something to do with the config in index.html
. You should double-check to make sure the values are correct https://firebase.flutter.dev/docs/installation/web#initializing-firebase
The official example is at https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example/lib
Since I can't reproduce this it could have something to do with the config in
index.html
. You should double-check to make sure the values are correct https://firebase.flutter.dev/docs/installation/web#initializing-firebase
WOW. What a help in two days. Thanks for nothing, Speedy Gonzales.
Insults aren't going to get you anywhere here.
If the project credentials are correct you can try opening up the web build in a different browser or disabling your extensions to isolate the issue. Just the ERR_CONNECTION_REFUSED
message isn't all that specific. What is the CORS issue you got on Firefox?
Insults aren't going to get you anywhere here.
If the project credentials are correct you can try opening up the web build in a different browser or disabling your extensions to isolate the issue. Just the
ERR_CONNECTION_REFUSED
message isn't all that specific. What is the CORS issue you got on Firefox?
I guess that a lot of people depending on firebase, including flutterfire. And believe it or not - my job too. Being able to ask for flutter doctor and proceed with a bunch of watery words in two days - is a shitty support to say the least. I don't know if you get payed for this or you are a volunteer - you should stop doing this, because clearly - you are not very good at it.
In any case, i solve this issue. It was because i was using my mobile phone as a wifi hotspot, and since my mobile operator is greedy he want me to pay for creating hotspot. For purpose of avoiding it - i had to modify windows hosts file to add a lot of adresses(provided by my local community) , so my operator doesn't block internet. And when i delete those adresses - everything worked. So, yea. Please leave this job for someone, ho can actually do this.
createUserWithEmailAndPassword() method on Flutter web does not work. Oh, and other package - flutter_auth_web does not work either. Trying to create new user with simple
gives
Litterally everything is enabled. on index.html:
(yes, script file with firebase config is there also, i just didn't put it)
main.dart
And obviosly project is enabled in firebase itself and flutter doctor show all green(duuh).
Firefox says that it's CORS issue, btw, but i suspect version incompatibility also.