laravel API and how can i send a token? [duplicate] - android

I've found the following error when running my android application in android studio. app couldn't get installed on my device because of this error. Didn't find the solution :(
please help
Auth: [GoogleAccountDataServiceImpl] getToken() failed.
Status BAD_AUTHENTICATION,
Account: ,
App:com.android.vending,
Service: androidmarket com.google.android.gms.auth.be.account.b.d: Long live credential not
available.

I had the same issue what helped me was that I had wrong credentials in my google-services.json file and after getting a new file my problem was fixed.
in the process of resolving this issue I also updated my google play services but I do not think this is necessary .

I got this error when tried to install app directly from Android Studio.
It was due to certificate mismatch, since I used release certificate for setting up the app in Play Console, while Android Studio signs the app with debug certificate by default.
Installing app via adb resolved the error.
https://developers.google.com/games/services/android/quickstart#step_4_test_your_game
Make sure to run an APK that you exported and signed with a
certificate that matches one of the certificates you used during the
application setup in Google Play Console.

I have the same problem some days ago. I just compile my whole code in a new project and Problem Solved!!.
Don't know what was the real problem. There is an issue filed here, with no solution.

There are several reasons you can get that message:
The account you are trying to log on with needs to be re-authenticated on the phone (try a different account)
The gms:play-services version is out of date (needs to be 15+ as of Jan 2021)
Your app fingerprint is not the right one. You need one for dev builds, different one for prod -- which is different based on how you sign (do you have the final publish key, or does Play store re-sign with the final publish key?)
Follow the Google tutorial and get their stand-alone project, it should take 20 min, and check your setup there. If you are running it with all the right accounts it should work. Then go back to your app.
https://developers.google.com/identity/sign-in/android/start

I updated Google Play Services on my phone and stopped receiving the same error. I am importing com.google.android.gms:play-services-cast:9.6.1 and analytics:9.6.1. Not sure if the version running on the device was too low but problem is now resolved but not sure how to prevent this error for users running older versions of Google Play Services.

Tested the other solutions but nothing worked. Rebooted the device and error was gone.

If you using firebase server, As per the firebase updation if you give phone number authentication put your country code before contact number it is mendetory.
example - +91 9999998888

This happened to me, auth errors in ADB, among them:
android Warn Auth [GoogleAuthUtil] GoogleAuthUtil
Because, like mentioned above, I had a debug build running on phone previously. So I fully uninstalled the app on my phone, and the next [Build and Run] ran successfully.

Please try the App with new google credentials or even try creating the whole peoject on console og google play services if you have used it .

In my case it was a dependency version problem. I had to update the auth dependency for firebase to the latest one:
implementation 'com.google.firebase:firebase-auth:17.0.0'

Here is my take towards this problem:
You may be using a single email to try and log in to google. It may be possible you might have changed the password of the particular email in the recent past. Make sure u remove your google-email from your phone/emulator. When u re-run your application, you will be asked to enter both email and password credentials.
Check if your credentials.json is still valid. Sometimes its possible that your client ID might be removed/corrupted if you have not used your android application for a long time. Make a new one and dont forget to copy-paste it in app folder of Android Project view.
PS: I am new to Android Studio and writing answers on stackoverflow in general. If you are reading this comment please let me know what improvements i can make while answering questions in the future.

I copied and ran the code in a different project that had priorly worked on simple DB operations of Firebase. Probably it already had the authentication files in place so launching the app was solved there

Mostly your token has gone bad. And needs a new one.
Go to project database > settings > General > download Json file and replace it with the one in the local project directory.

I fixed this problem with updating fingerprints (sha1 or sha256)

My problem was with Microsoft App Center.
We recently set our pipelines to send aab files to App Center, instead of apk files.
It seems that our bundle was resigned by App Center with some generated keystore. That's how App Center distributed apk files, even though our pipeline uploaded aab files.
In other words: even though our pipeline is using our own keystore to sign the aab bundle, in order to distribute through the App Center, after sending the aab to App Center, the App Center is creating universal apks with another generated keystore.
After rolling back our pipeline to send apk instead of aab, Google SignIn on our react-native app with firebase was working again.
"When you distribute Android Application Bundle (AAB), App Center generates a universal APK, signs it with a generated signing key, and distributes it to a device."
Source: https://learn.microsoft.com/en-us/appcenter/distribution/uploading

Related

Getting please set the query parameter changesNotSentForReview to true while releasing Android App from appcenter.ms

I am trying to build and distribute android app from appcenter.ms. Initially I got rejection after rolling out 3rd update and I tried to rebuild changes. But while distributing to store I got following issue.
Edit could not be committed due to an error. Changes cannot be sent
for review automatically. Please set the query parameter
changesNotSentForReview to true. Once committed, the changes in this
edit can be sent for review from the Google Play Console UI.
I don't want to make changes from Google Play Console UI and want to make changes from appcenter.ms only.
How to set that parameter in code.
Help will be really appreciable!
I had the same error with fastlane.
the problem was with an edit being reviewed that was not submitted.
In the play store dev console --> release overview --> change under review. there was an action to validate. it was the data security questionnaire.
once the form was submitted, I had no more problems with fastlane.
Had this same issue from AppCenter. There are some sites suggesting this is a setting in the API that is posting the app but AppCenter does not offer the setting.
The solution for me was to use 'Archive for Publishing' in Visual Studio for mac. If I then chose to 'sign and distribute' direct to Google play I would get the same issue as above.
By choosing 'Ad Hoc' distribution, then saving locally I would get a signed .aab file. This file can be manually uploaded to Google when editing a release.
I created a new track, manually uploaded, promoted it to testing then production without any issue.

Question on Firebase Authentication SHA1 for Android [duplicate]

My local android app is synced up in google firebase console with my SHA key configured in google.services.json. How do the developer on other end
can setup the project to use the same firebase console and json file.
We are trying phone based authentication. While setup at my end works is fine, but the developer on the other end is getting this error - This operation is not allowed. You must enable this service in the console.
Please help me with the correct way to do this.
Solution:
So for other developers, generate the SHA-1 Key as described in the picture
Go to Firebase Console:
Settings
Your Apps
Add Fingerprint and paste the SHA.
A solution for the comment:
So the answer is well written in the error. You can't have two projects of the same package name. Even if you delete it. It will take a least 4-5 days to get deleted fully from the developer's console.
So the only solution is to generate a new SHA-1 key by custom signing the app by generating a signed apk from the android studio. Or just create a new project with different package name both ways will work for now.
Hope this info helps. Do let me know if it changes anything for you.
Adding to Sharan's answer, that is the correct one, you can add those SHA1 keys in your Firebase console going to
Project configuration - ADD FINGERPRINT
Remember to select the correct project at the Android apps panel in order to add those keys

How multiple developers can work on the same android app connected to a single Firebase console?

My local android app is synced up in google firebase console with my SHA key configured in google.services.json. How do the developer on other end
can setup the project to use the same firebase console and json file.
We are trying phone based authentication. While setup at my end works is fine, but the developer on the other end is getting this error - This operation is not allowed. You must enable this service in the console.
Please help me with the correct way to do this.
Solution:
So for other developers, generate the SHA-1 Key as described in the picture
Go to Firebase Console:
Settings
Your Apps
Add Fingerprint and paste the SHA.
A solution for the comment:
So the answer is well written in the error. You can't have two projects of the same package name. Even if you delete it. It will take a least 4-5 days to get deleted fully from the developer's console.
So the only solution is to generate a new SHA-1 key by custom signing the app by generating a signed apk from the android studio. Or just create a new project with different package name both ways will work for now.
Hope this info helps. Do let me know if it changes anything for you.
Adding to Sharan's answer, that is the correct one, you can add those SHA1 keys in your Firebase console going to
Project configuration - ADD FINGERPRINT
Remember to select the correct project at the Android apps panel in order to add those keys

Ionic & Firebase Google Login with Googleplus plugin error: 10

So I'm trying to figure out the Google login system using Ionic, Googleplus plugin & Firebase. I set everything up according to the following tutorial:
https://github.com/EddyVerbruggen/cordova-plugin-googleplus
Then I ran the code on my phone as Ionic-run Android. When I do that I get an error 10. I looked it up and according to the following link:
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/243
It seems like it's an issue with the debug version and the key? In Firebase, I set up an Android project with the debug key but I didn't add the Google.services.json or add the code they told me to add in my build.gradle file because I get an error. I also activated the google sign in method. Then I copied the demo app index. I'm not sure If I missed a step or didn't set something up correctly.
In case it's helpful for anyone else, I spent a lot of time troubleshooting this issue on Android. You need to make sure that your client_id for a credential of type "Web application" is used even though the SHA1 certificate hash you generate is associated with an OAuth2 credential of type Android. I was using the Android client_id instead of the Web application one. More info here: https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/425
I fixed it by using a different project, not really sure what changed.

Google Play Services does not work after export

When I run my app in Eclipse, Google Play Services works normal. But when I export signed application package and install myapp.apk to my phone, app display error The app is incorectly configured....
This is probably because of a directory change, your phone can't find the proper files to launch the app anymore. Try to re-install the app, this will set the right paths and should solve your problems.
Try by updating your device's "Google Play Services". It may help you.
You may try checking copy to my project/workspace option when import google-pay-services-lib in eclipse.
Did you create an OAuth Client ID with the certificate fingerprint from the key that you use for signing the exported application?
Maybe you created one for the debug key (which is the key Eclipse uses when launching the app), but forgot to create and link another one for your release key.
You can find detailed information here: https://developers.google.com/games/services/console/enabling#step_3_generate_an_oauth_20_client_id
After you created the second client ID át the google api console, linking it to the game is not so trivial: you have to link the already linked app again, and you will see that this time it will show the second client ID.
Good luck.

Categories

Resources