Is there another place to get a google-services.json? - android

I tried clicking the GET A CONFIGURATION FILE link from the docs, but the resulting page just loads and loads. This happens in Firefox and Chrome and on my phone. Is there some other way to get a config file?
EDIT: I am getting these errors in Chrome Dev Console:
Refused to display 'https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…ed%253Dtrue%26cntlbl%3DContinue%2BAdding%2BSign-In%26cntapi%3Dsignin&hl=en' in a frame because it set 'X-Frame-Options' to 'DENY'.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://console.developers.google.com') does not match the recipient window's origin ('null').(anonymous function) # script_foot.js:348n.event.dispatch # jquery.min.js:3r.handle # jquery.min.js:3

This might be a temporary issue due to network connectivity or something like that.
One solution would be to try again at a later point in time. This might be happening because you're trying to download the google-services.json for the sample project (com.google.samples.quickstart.signin).
If you want result now, you could follow the steps to integrate the Google Sign In into your app.
Create a new empty android studio project/if you have an existing
project skip this step.
Use this link and follow the onscreen instructions to generate the google-services.json for your app.
The app name here refers to your project name in Google Developers
Console. If you've already setup your Google developers console
project for your android app, you can select that via the drop-down
menu. If you have not created one, just enter a name and that
project will be created for you in your developers console.
Select the google services you need for your project viz Google Sign
In, Google Cloud Messaging, AdMob etc. In our case, we just selected
Google Sign In.
You will be asked for SHA-1 hash. Follow these steps to get one.
Click on generate configuration files. Next screen you will be presented with an option to download google-services.json for your app. Download that and you're good to go.
Once you have the google-services.json, follow these steps to complete the Google Sign In.
References
Start Integrating Google Sign-In into Your Android App,
Integrating Google Sign-In into Your Android App.

You will get "google-services.json" as soon as you create a Firebase project.
But, in case you missed and forgot to download that, you can still get the JSON file from the existing project-
Just select the project from firebase console.
Head over to project settings
scroll down (Yeah!, there it is!)
Screenshot :

OK, I've found a workaround if anyone else is having this problem.
Based on the error message about being unable to display https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…ed%253Dtrue%26cntlbl%3DContinue%2BAdding%2BSign-In%26cntapi%3Dsignin&hl=en in a frame... I just followed that link directly.
EDIT: None of the other links were working for me. If you came searching for the console errors Refused to display..., this is the answer for you. This bug seems to have been fixed for the google-services.json, so if you're just looking for the link, the highest-rated answer is the one you want.

Referring to this page:
The Firebase console will help you download the google-services.json. In addition, the Quickstart guides for most APIs have instructions for generating this file. Once you have downloaded the google-services.json file, copy it into the app/ folder of your Android Studio project, or into the app/src/{build_type} folder if you are using multiple build types.
So go to Firebase Console, press add new project and follow instructions

Related

Failed archiving Xamarin.Forms Android app, no keystone file

I am not really a mobile developer but this project was on the board and I was interested so I took it. I made several changes to this Xamarin.forms app and published the changes to the Apple App Store successfully but I am having an issue deploying to Google Play. I may very well not understand this process so bare with me.
I have access to a developer account, our store page, and an admin user account. On the apps console page on the production tab I am editing the current release. "Releases are signed by Google Play".
In Visual Studio for Mac 2022 v17.3 the project.mobile.droid package builds successfully every time with no errors (release is selected here). The android packaging format is set to tab, which is what I want. But when I try to archive for publishing I get the error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Error XA4310: `$(AndroidSigningKeyStore)` file `C:/Users/tortis1/AppData/Local/Xamarin/Mono for Android/Keystore/prodensity/prodensity.keystore` could not be found. (XA4310) (Density.Mobile.Droid)
First thing I notice is Users/tortis1/AppData. Maybe I'm unaware of something but there is no tortis1 in my Users folder so I have no idea how to track this down. I have looked for a keystore file in the project and I could find these in the Debug folder: android_debug_keystore.flag, android_debug_keystore.flag, and debug.keystore.
I have not set up any kind of singning rules or credentials in VS for Mac. Have I skipped some step or am I missing something? If you need any further information please let me know.
I have tried working through similar questions like this: How do I generate Google Play Console upload key using Xamarin Forms? , but I can't get it to archive at all.

google-services.json Google Cloud oauth login and Firebase dynamic link same project android

I have an Android project where I am using Google Cloud authentication service, where I downloaded the google-services.json file and everything is working.
Now that using Firebase's Dynamic Link service, where it asks to download another google-services.json file and put it in the same location.
I don't know how to proceed in this case, any tips?
If you are using the same project then feel free to use the last one google-services.json that it suggests downloading because it will already include your previous configuration.
You can easily check this if you compare the first and second one jsons.
Make sure that you only have this most recent downloaded config file in your app.
You can get the most recent config file for your Android app in Firebase Console at any moment.
Go to your Project settings in the Firebase console.
In the Your apps card, select the package name of the app for which you need a config file.
Click google-services.json.

App Link is not working for Android instant app

I have updated my current play store app with the Instant app appLink feature. But the link is still not working after waited for 4 days.
I have created link with below steps.
Tools -> App Links Assistants
Followed all the steps and Verify that link in android studio.
It verified successfully.
I have added a dependency in app-level Gradle: implementation "com.google.android.gms:play-services-instantapps:17.0.0"
To enable instant app right-click on app module -> Refactor -> Enable instant app support.
Increment a version code to 1 and uploaded a new build on the play store.
Could you guys please help me out to find out the missing element or a direction?
Have you followed the below developer guide for the app asset link?
https://developer.android.com/training/app-links/verify-site-associations
In that, they have mentioned the steps which have to address accordingly.
Also, you can confirm that the Digital Asset Links JSON file is properly hosted and defined using the below URL:
https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://domain.name:optional_port&relation=delegate_permission/common.handle_all_urls

How to obtain a google-services.json file for Android app from Google Cloud Platform?

I've been trying to get started on an Android app with Google Sign in as a principal feature, and one of the steps I've encountered in the process of getting the integration working is creating a google-services.json file in the ./app directory, which can apparently somehow be downloaded. Google's docs are wholly incomplete, especially for a newbie Android, so I've been learning from a tutorial I found from about a year ago.
I haven't figured out how to get a google-services.json file, especially because the prerequisite page that the above docs link refers to for downloading a google-services.json file instead helps me obtain a credentials.json file. Are these the same thing? Do they work the same way? Is credentials.json the new version of google-services.json? I'm very confused.
You need to link your app to Firebase Console. After linking you will get google-services.json file. You can easily download from the firebase console.
Visit https://console.firebase.google.com/
You can use credential.js instead of google-service.json file. Google signing will work fluently. And yeah you can say its upgraded version but if you want google-service.json file you must link your account with Firebase

getToken() failed. Status BAD_AUTHENTICATION error

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

Categories

Resources