Open emailsubjekt opened 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):
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):
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):
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
Can I get some help here please
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.
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
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'.
0 StandardFileSystem.entityForUri
(package:front_end/src/api_prototype/standard_file_system.dart:33:7)
1 asFileUri (package:vm/kernel_front_end.dart:604:37)
2 w
riteDepfile (package:vm/kernel_front_end.dart:799:21)
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed.
FAILURE: Build failed with an exception.
Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
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