FirebaseUI Android: Error fetching providers for email (Backend Error) - android

We use Firebase and FirebaseUI-Auth with email accounts in one of our Android apps.
When we try to log in using FirebaseUI-Auth with a specific email account, the progress dialog (progress_dialog_checking_accounts) hides without showing an error and what we see in logcat is the following:
W/CheckEmailFragment: Error fetching providers for email
com.google.firebase.c: An internal error has occurred. [ Backend Error ]
at com.google.android.gms.c.eg.a(Unknown Source)
at com.google.android.gms.c.ed$f.a(Unknown Source)
at com.google.android.gms.c.eo.a(Unknown Source)
at com.google.android.gms.c.eo$a.a(Unknown Source)
at com.google.android.gms.c.ej$a.onTransact(Unknown Source)
at android.os.Binder.execTransact(Binder.java:453)
The results of the following curl request are not very informative either:
curl 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/createAuthUri?key=${MyFirebaseAPIKey}' -H 'Content-Type: application/json' --data-binary '{"identifier": "${ProblematicEmailAddress}","continueUri":"http://localhost"}'
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
I get a good response with another email address (also a registered account):
{
"kind": "identitytoolkit#CreateAuthUriResponse",
"allProviders": [
"password"
],
"registered": true,
"sessionId": "${replaced}"
}
Does anyone know what is happening and how we can solve this error? We are concerned, that this might occur for other email accounts as well, thus preventing users from signing in.

Related

Flutter Firebase AppCheck failure

E/flutter (28083): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [firebase_storage/unauthenticated] User is unauthenticated. Authenticate and try again.
E/flutter (28083): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [firebase_storage/unauthenticated] User is unauthenticated. Authenticate and try again.
E/StorageException(28083): { "error": { "code": 401, "message": "Firebase App Check token is invalid." }}
E/StorageException(28083): java.io.IOException: { "error": { "code": 401, "message": "Firebase App Check token is invalid." }}
I get this errors when i try to get images from Firebase Storage.

Service not registered: com.microsoft.identity.common.internal.ui.browser.CustomTabsManager$1#4af7a6e

I am using msal library in an android app and this crash is occurring on many devices
My user agent cannot be WEBVIEW
Fatal Exception: java.lang.IllegalArgumentException: Service not registered: com.microsoft.identity.common.internal.ui.browser.CustomTabsManager$1#4af7a6e
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1160)
at android.app.ContextImpl.unbindService(ContextImpl.java:1475)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:644)
at com.microsoft.identity.common.internal.ui.browser.CustomTabsManager.unbind(CustomTabsManager.java:164)
at com.microsoft.identity.common.internal.ui.browser.BrowserAuthorizationStrategy.dispose(BrowserAuthorizationStrategy.java:182)
at com.microsoft.identity.common.internal.ui.browser.BrowserAuthorizationStrategy.completeAuthorization(BrowserAuthorizationStrategy.java:157)
at com.microsoft.identity.common.internal.controllers.LocalMSALController.completeAcquireToken(LocalMSALController.java:258)
at com.microsoft.identity.common.internal.commands.InteractiveTokenCommand.notify(InteractiveTokenCommand.java:77)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher.completeInteractive(CommandDispatcher.java:608)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher.access$1100(CommandDispatcher.java:83)
at com.microsoft.identity.common.internal.controllers.CommandDispatcher$4$1.onReceive(CommandDispatcher.java:565)
at androidx.localbroadcastmanager.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:313)
at androidx.localbroadcastmanager.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:121)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
here's my json config file.
"client_id": "client_id",
"authorization_user_agent": "BROWSER",
"account_mode": "MULTIPLE",
"redirect_uri": "redirect_uri",
"authorities": [
{
"type": "B2C",
"authority_url": "authority_url",
"default": true
},
{
"type": "B2C",
"authority_url": "authority_url"
}
],
"browser_safelist": [
{
"browser_package_name": "com.mi.globalbrowser",
"browser_signature_hashes": [
"g7zGEnZipieE6ZyBA4Bz00kxU8h0F9QTwPLL-dnRVwngI0FJWJiD3rCEJsIQ_VK064SNdxzqggnnnAqT8LI89A=="
]
}
]
}
And here's a list of some devices where the crash occurs
moto g(6) play
moto z3 play
Moto G(4) Plus
LG K40S
LG Q60
ZenFone Max Shot (ZB634KL)
and many other not listed here, including xiaomi, samsgung and onePlus
I updated MSAL to version 2.2.1 and now it is working fine.
This is the known bug in the microsoft-authentication-library-for-android.
You can authenticate by edit the auth_config.json file in the Raw folder and change the user agent to this authorized_user_agent : WEBVIEW.
You can authenticate the user using the Webview instead of the browser and from this way your app will not be crashed.
Look into this pull-request.

FirebaseException: An internal error has occurred. [ Bad Request ]

Calling
final AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
results in
com.google.firebase.FirebaseException: An internal error has occurred. [ Bad Request ]
at com.google.android.gms.internal.zzeaw.zzaw(Unknown Source)
at com.google.android.gms.internal.zzdzu.zza(Unknown Source)
at com.google.android.gms.internal.zzebh.zzax(Unknown Source)
at com.google.android.gms.internal.zzebk.onFailure(Unknown Source)
at com.google.android.gms.internal.zzeay.onTransact(Unknown Source)
at android.os.Binder.execTransact(Binder.java:453)
OAuth 2.0: I do have correct SHA-1 in Google developer console as well as Firebase console.
I do have an up-to-date google-services.json file included in project.

Youtube WatchMe android project Login issue

I created live streaming application using https://github.com/youtube/yt-watchme. And its installed on android phone.If I logged into this app.I's still shows the "Not Signed in" Message. After login its showing the following error in android studio console
09-16 16:48:01.970 25937-3107/com.google.android.apps.watchme E/WatchMe﹕ com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. The API (YouTube Data API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"reason": "accessNotConfigured",
"extendedHelp": "https://console.developers.google.com"
}
],
"message": "Access Not Configured. The API (YouTube Data API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
}
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at com.google.android.apps.watchme.util.YouTubeApi.getLiveEvents(YouTubeApi.java:155)
at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:312)
at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:295)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
How can i solve this issue please help.
This application is connecting to YouTube Watch Me project.Is it possible to connect my project using client Id and client secret(How can i configure my client id to this app?)?
Please suggest

403 Forbidden Error when doing Android Google Calendar Quickstart

I'm trying to add Google Calendar integration with my app. I followed the Android quickstart guide here https://developers.google.com/google-apps/calendar/quickstart/android
I was having problems integrating this into my existing project, so I tried making a fresh project and copy and pasting the code. However, I'm still getting this error:
403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. The API (Calendar API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"reason": "accessNotConfigured",
"extendedHelp": "https://console.developers.google.com"
}
],
"message": "Access Not Configured. The API (Calendar API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
}
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at com.gdosheriii.android.calendartest.ApiAsyncTask.getDataFromApi(ApiAsyncTask.java:72)
at com.gdosheriii.android.calendartest.ApiAsyncTask.doInBackground(ApiAsyncTask.java:39)
at com.gdosheriii.android.calendartest.ApiAsyncTask.doInBackground(ApiAsyncTask.java:19)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
What am I doing wrong? I've been googling for an answer for the past two hours, but nothing seems to fix it. Yes, I did create a client id inside the Google Developers Console. I copied and pasted the package (com.gdosheriii.android.calendartest) and the SHA1 key. I have the Calendar API enabled.
What is the correct way to do it?
Thanks for the help!
you need to change application name in code de google quistart, you can do that by following this next steps:
private class MakeRequestTask extends AsyncTask<Void, Void, List<String>> {
private com.google.api.services.calendar.Calendar mService = null;
private Exception mLastError = null;
public MakeRequestTask(GoogleAccountCredential credential) {
HttpTransport transport = AndroidHttp.newCompatibleTransport();
JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
mService = new com.google.api.services.calendar.Calendar.Builder(
transport, jsonFactory, credential)
.setApplicationName("YOUR APPLICATION NAME IN GOOGLE CONSOLE")
.build();
}

Categories

Resources