Maliffic / firebase_ui

MIT License
45 stars 48 forks source link

flutter_firebase_ui: ^0.0.13 depends on old versions of google_sign_in flutter_facebook_login and firebase_auth #27

Open emailsubjekt opened 4 years ago

emailsubjekt commented 4 years ago

I have tried updating the pupspec but I got the warnings in the title, then I corrected the pubspec to look like this

cupertino_icons: ^0.1.3 flutter_twitter: ^1.1.3 firebase_auth: ^0.6.2+1 google_sign_in: ^3.2.1 flutter_facebook_login: ^1.1.1 flutter_firebase_ui: ^0.0.13

Then I'm getting

Invalid depfile: D:\FlutterDell\Test126-6-FirebaseAutomaticLogin\firebase_ui_master_boki_test\flutter_auth_ui_lib_test.dart_tool\flutter_build\d34750081c0bbc5a511b8361c5470387\kernel_snapshot.d Invalid depfile: D:\FlutterDell\Test126-6-FirebaseAutomaticLogin\firebase_ui_master_boki_test\flutter_auth_ui_lib_test.dart_tool\flutter_build\d34750081c0bbc5a511b8361c5470387\kernel_snapshot.d

Compiler message: Error: Could not resolve the package 'firebase_ui' in 'package:firebase_ui/flutter_firebase_ui.dart'. Error: Could not resolve the package 'firebase_ui' in 'package:firebase_ui/l10n/localization.dart'. Error: Could not resolve the package 'flutter_localizations' in 'package:flutter_localizations/flutter_localizations.dart'. lib/main.dart:5:8: Error: Not found: 'package:firebase_ui/flutter_firebase_ui.dart' import 'package:firebase_ui/flutter_firebase_ui.dart'; ^ lib/main.dart:6:8: Error: Not found: 'package:firebase_ui/l10n/localization.dart' import 'package:firebase_ui/l10n/localization.dart'; ^ lib/main.dart:7:8: Error: Not found: 'package:flutter_localizations/flutter_localizations.dart' import 'package:flutter_localizations/flutter_localizations.dart'; ^ lib/main.dart:21:9: Error: The getter 'GlobalMaterialLocalizations' isn't defined for the class 'MyApp'.

Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed.

FAILURE: Build failed with an exception.

BUILD FAILED in 16s Finished with error: Gradle task assembleDebug failed with exit code 1


Everything above is when I copied the project into a new project to have the latest changes in dart

I've actually successfully run your example directly, I just haven't yet connected it to firebase and tried out the google_services.json but I will do that next, otherwise it won't log in

emailsubjekt commented 4 years ago

Ok, I've connected it to Firebase, I've gotten the json file, registered everything like I always do, ran the project, tried to login, I get a popup window, click on my name and get this error

Restarted application in 1,762ms. E/flutter (12417): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) E/flutter (12417): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7) E/flutter (12417): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33) E/flutter (12417): E/flutter (12417): #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48) E/flutter (12417): #3 MethodChannelGoogleSignIn.signIn (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:45:10) E/flutter (12417): #4 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:227:42) E/flutter (12417): E/flutter (12417): #5 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:282:18) E/flutter (12417): #6 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:352:9) E/flutter (12417): #7 _LoginViewState._handleGoogleSignIn (package:firebase_ui/login_view.dart:47:57) E/flutter (12417): #8 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) E/flutter (12417): #9 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:789:36) E/flutter (12417): #10 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (12417): #11 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) E/flutter (12417): #12 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) E/flutter (12417): #13 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) E/flutter (12417): #14 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) E/flutter (12417): #15 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) E/flutter (12417): #16 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:117:9) E/flutter (12417): #17 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) E/flutter (12417): #18 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) E/flutter (12417): #19 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) E/flutter (12417): #20 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) E/flutter (12417): #21 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter (12417): #22 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter (12417): #23 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter (12417): #24 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter (12417): #25 _rootRunUnary (dart:async/zone.dart:1138:13) E/flutter (12417): #26 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (12417): #27 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) E/flutter (12417): #28 _invoke1 (dart:ui/hooks.dart:273:10) E/flutter (12417): #29 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5) E/flutter (12417):

emailsubjekt commented 4 years ago

I've traced it to API key, I've gone to cloud console, enable API to get auth, checked the keys, the json is for some reason using the browser key instead of the android key that's in the cloud, I have no idea what's going on, maybe you can help?

I get this error

Restarted application in 1,762ms. E/flutter (12417): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) E/flutter (12417): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7) E/flutter (12417): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33) E/flutter (12417): E/flutter (12417): #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48) E/flutter (12417): #3 MethodChannelGoogleSignIn.signIn (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:45:10) E/flutter (12417): #4 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:227:42) E/flutter (12417): E/flutter (12417): #5 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:282:18) E/flutter (12417): #6 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:352:9) E/flutter (12417): #7 _LoginViewState._handleGoogleSignIn (package:firebase_ui/login_view.dart:47:57) E/flutter (12417): #8 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) E/flutter (12417): #9 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:789:36) E/flutter (12417): #10 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (12417): #11 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) E/flutter (12417): #12 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) E/flutter (12417): #13 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) E/flutter (12417): #14 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) E/flutter (12417): #15 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) E/flutter (12417): #16 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:117:9) E/flutter (12417): #17 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) E/flutter (12417): #18 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) E/flutter (12417): #19 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) E/flutter (12417): #20 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) E/flutter (12417): #21 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter (12417): #22 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter (12417): #23 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter (12417): #24 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter (12417): #25 _rootRunUnary (dart:async/zone.dart:1138:13) E/flutter (12417): #26 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (12417): #27 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) E/flutter (12417): #28 _invoke1 (dart:ui/hooks.dart:273:10) E/flutter (12417): #29 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5) E/flutter (12417):

emailsubjekt commented 4 years ago

Now I even bought a google play account for 25 dollars so that I could integrate it with firebase in the settings (ger icon i nfirebse) integrations, google play, still getting this error

E/flutter (13027): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) E/flutter (13027): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7) E/flutter (13027): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33) E/flutter (13027): E/flutter (13027): #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48) E/flutter (13027): #3 MethodChannelGoogleSignIn.signIn (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:45:10) E/flutter (13027): #4 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:227:42) E/flutter (13027): E/flutter (13027): #5 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:282:18) E/flutter (13027): #6 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:352:9) E/flutter (13027): #7 _LoginViewState._handleGoogleSignIn (package:firebase_ui/login_view.dart:47:57) E/flutter (13027): #8 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) E/flutter (13027): #9 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:789:36) E/flutter (13027): #10 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (13027): #11 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) E/flutter (13027): #12 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) E/flutter (13027): #13 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) E/flutter (13027): #14 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) E/flutter (13027): #15 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) E/flutter (13027): #16 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:117:9) E/flutter (13027): #17 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) E/flutter (13027): #18 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) E/flutter (13027): #19 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) E/flutter (13027): #20 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) E/flutter (13027): #21 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter (13027): #22 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter (13027): #23 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter (13027): #24 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter (13027): #25 _rootRunUnary (dart:async/zone.dart:1138:13) E/flutter (13027): #26 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (13027): #27 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) E/flutter (13027): #28 _invoke1 (dart:ui/hooks.dart:273:10) E/flutter (13027): #29 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5) E/flutter (13027):

emailsubjekt commented 4 years ago

I've also done flutter clean in the terminal, copied the android key into google services and none of that worked either, still the same error, the error even comes up right after I click run in Android Studio, as well as when I try to login with google automatic signin, click on google sign in, my email comes up, click on it, get an error and on the screen of the phone nothing happens

emailsubjekt commented 4 years ago

Can I get some help here please

SoftWyer commented 4 years ago

Try this branch https://github.com/Maliffic/firebase_ui/issues/22#issuecomment-569746315

It has been updated with the latest dependencies and appears to work OK.

emailsubjekt commented 4 years ago

I applied firebase_ui: git: url: git://github.com/SoftWyer/firebase_ui

instead of flutter_firebase_ui: ^0.0.13, and with flutter_firebase_ui: ^0.0.13 However I got this error

C:\flutter\bin\flutter.bat --no-color packages get Running "flutter pub get" in flutter_auth_ui_lib_test...
Because every version of firebase_ui from git depends on google_sign_in ^4.1.1 and flutter_auth_ui_lib_test depends on google_sign_in ^3.2.1, firebase_ui from git is forbidden.

So, because flutter_auth_ui_lib_test depends on firebase_ui from git, version solving failed. pub get failed (1; So, because flutter_auth_ui_lib_test depends on firebase_ui from git, version solving failed.) Process finished with exit code 1