I am getting exception as below:
Well, I've used or say copied same code as this shown in google doc https://developers.google.com/google-apps/calendar/quickstart/android .And I know it is the same error which is already mentioned in troubleshooting part of this doc but as mentioned in its solution, I had checked my SHA1 fingerprint and also package name and all the stuffs but still getting same error. And also I tried to google and followed each and every link the google suggested but nothing works for me so my last option was STACKOVERFLOW and so I am here. Please help if any one can. Thanks in advance.
Also I forgot to mention, it says "Unregistered Android application" it means that the OAuth2 client ID I created is not found by the app but I don't know how can I make it find my OAuth2 client ID and solve my problem.
Please make sure that:-
You enabled calendar API in google console for that project you are using, as the link provide in your response.
Also match your package name in AndroidManifest is similar to the package you mentioned in google dev console with SHA.
Try to create an Oauth client id under corresponding project in google console. Follow the steps in this link.
To create an OAuth 2.0 client ID in the console:
Go to the Cloud Platform Console.
From the projects list, select a project or create a new one.
If the API Manager page isn't already open, open the console menu and select API Manager.
On the left, click Credentials.
Click New Credentials, then select OAuth client ID.
Note: If you're unsure whether OAuth 2.0 is appropriate for your project, select Help me choose and follow the instructions to pick
the right credentials.
Select the appropriate application type for your project and enter any additional information required. Application types are described
in more detail in the following sections.
If this is your first time creating a client ID, you can also configure your consent screen by clicking Consent Screen. (The
following
procedure
explains how to set up the Consent screen.) You won't be prompted to
configure the consent screen after you do it the first time.
Click Create client ID.
Based also from this related post, you have to give permission from your calendar configuration (Calendar configuration -> Share this calendar) to the email account specified into Google Api Console (email adress).
Hope this helps!
Related
I'm trying to use the Google Fit API in my application, after the user is prompted to choose a Google account the OAuth consent screen should be displayed, however I only get a blank popup with a indefinite loading indicator, this popup will stay like that unless I cancel it.
Image of the popup
No error messages are displayed, only if I cancel the sign-in flow I would get an error that I cancelled it.
I have tried on a personal proyect as well as with Google's sample proyect, where other users are also experiencing the same issue.
As I describe on that issue, I have tested both apps on an emulator, a Huawei Pro 20 Lite, and on another device, with four different accounts, but get the same result.
Also have the correct configuration in the Google Cloud Console, using the proper applicationId and SHA1 signing key, I've tried on two different cloud projects, one of them brand new.
The function that launches the sign-in flow is this one, the full code from the sample app can be found here
GoogleSignIn.requestPermissions(
this,
requestCode.ordinal,
getGoogleAccount(), fitnessOptions)
Thanks for any help.
I found a solution, it strange but anyway it works for me:
Delete your Cloud project
Instead of the following instructions from http://developers.google.com/fit/android/get-started create a new project with firebase.
Add an android app in firebase project settings
Add both the SHA1 and SHA256 to it.
Download google-services.json to android/app in your project folder.
Make sure to have my "support email" set on general Project settings.
If this not help, please also check Flutter and google_sign_in plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
Guys have a similar problem with GoogleSignIn
Follow the instructions at http://developers.google.com/fit/android/get-started for registering an Android client.
Ensure that the Fit API is enabled for your Cloud project.
Check your credentials for your Cloud project:
Ensure that your package name for your credentials matches the sample.
Ensure the package name matches the applicationId in the app/build.gradle file.
Ensure the Signing-certificate fingerprint is entered correctly.
Additionally from OAuthConsentScreen add test users and set User Type to external
I am new in using google map, I have tried for a day. but when I try to create google map API key for my android project through web site https://cloud.google.com/maps-platform/?apis=maps
then I always failed to create API key like the image below:
am I do something wrong or it is just temporary problem from google ? or is there any alternative to crate API Key for Android Google Map ?
this error only appear on my specific google account, when switch to other gmail, this error never appear
Did you try these steps?
Login to Google with the sys admin email address of the 'G Suite'
account
Go here https://console.cloud.google.com/iam-admin/iam/organization
click on the identity tab on the left menu. (it created an identity)
click on the 'IAM' option on the left menu
Add billing account roles to the sys admin email by clicking on the
pencil icon to the right of that user name. (I assume you could
probably add another user here from the organisation and assign the
billing roles to them instead)
Go to the Gsuite admin: https://admin.google.com/ and click on 'Apps'
Then click on 'Additional Google services' and enable 'Google
developers console'
Then go to https://console.cloud.google.com/billing select your
organization from the 'Select an organization:' dropdown box
click on the 'add billing account' button in the middle of the screen
from
Enable Google Maps Platform error
This issue has been recognized in Google Maps Issue tracker and has been addressed. If you are still having issues with this concern, kindly star the issue and add a comment of the issue that you are experiencing with replication step as well.
It could have been something temporary. Do you get the same error now, when trying to follow the Get Started URL? https://cloud.google.com/maps-platform/?apis=maps
If so, a couple things to check:
Are you really logged in with a valid Google account when accessing this page? (since you mention a "specific google account", I assume this is not your issue here)
Are you maybe using a G Suite domain account, on which Google Developers Console access has been disabled?
1) If you are not logged in with a valid Google account, you will get this error. You can create a new non-gmail.com Google account on the following page:
https://accounts.google.com/signup/v2/webcreateaccount?hl=en-GB&flowName=GlifWebSignIn&flowEntry=SignUp&nogm=true
2) If you are logged in with a valid Google account, is that a G Suite account? If so, maybe the error happens because your domain admin disabled Google Developers Console access on your account. If so, here is how an admin can re-enable this service: https://stackoverflow.com/a/45621397/11316072.
Note: when the Get Started button doesn't work, you can go to the Google Developers Console directly to create a new project (https://console.cloud.google.com/project), create an API key ((https://console.cloud.google.com/apis/credentials?project=), enable the APIs you need (https://console.cloud.google.com/apis/library?project=), and enable billing on your project (https://console.cloud.google.com/billing/linkedaccount?project=).
From my Google Play console I linked a project. Then I created a service account. Still, when refreshing the console, it still says "There are no service accounts associated with your project."
Waited over 24 hours already. The purpose of all that is receipts validation.
Picture 1: a linked project:
Picture 2: service-account created:
I had the same problem, I fixed it this way:
When you create a service account in step 2, you need to select a role to grant this service account some permissions, although it shows the step is optional, but for some cases, it's not. If you skip this step, the newly created service account will not show up at the Google Play Console API access page, and you will get this error message, The current user has insufficient permissions to perform the requested operation when you run your code.
You much enable "Google Play Android Developer API" (one of Google Api & services) for your application via a credential!
Google supplies many API for developers can call them from their app. A credential same as a permit (3 types of credentials : API key (such as youtube), OAuth, Service Account)
If you never enable one API, it never shown on API Access page!
In my case:
Even if you have created a service account,
When you have already deleted the service account with the same name,
It appears to have been deleted from the IAM tab of Google Cloud Platform.
So it is assumed that it is not visible in the play console.
TODO:
Create a service account with a different name (I gave the owner permission in step2 when creating, Like Q Locker's answer.).
After creation, it was immediately exposed in the play console.
I faced the same issue because I selected a wrong project instead of the project for which the service account to be created. Please double check the project name in the drop-down at top of the page (after going to the link of Google Cloud Platform). By default the right project to be selected automatically. But if no project is selected beforehand and you are asked to select a project, then select the right project carefully. Otherwise the service account won't show up after completing the whole process.
Another thing to mention, although the project is supposed to be selected automatically, initially it didn't happen and I was given the available projects to select from. The project may appear in the recent projects, otherwise click the SELECT PROJECT link and find yourself.
Moreover when I additionally logged out and removed all the other Google accounts from the browser except the account which is used in Google Play Console. That time I was redirected to service account creation page with the correct project selected beforehand.
Make sure the project name on screen 1 and screen 2 are the same. In my case project name were different.
Screen 1: Main API Access page on Google Console
Screen 2: Google Cloud Platform page
This might be a stupid question but I am facing an issue when trying to generate my google-services.json file for my app. I am following this guide from the google developers team to setup my project for analytics but when I click on the get configuration file button nothing happens, I just get a loading spinner that never ends.
I tried on different browsers, it's still the same. I checked the chrome console and got :
Refused to display 'https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…3Dtrue%26cntlbl%3DContinue%2BAdding%2BAnalytics%26cntapi%3Danalytics&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').
Any suggestion?
You are trying this link while configuration https://developers.google.com/analytics/devguides/collection/android/v4/start
So please do the following steps
Click on the GET A CONFIGURATION FILE
Now Choose your App Name.
Click Configuration Services
After that the 3rd Window will be open
Now Choose your Analytics account of your Apps.
Hurry you have done.
Please use all the process and done as it is you can do it.
Let me know if still you have any problem.
Well well, got a workaround. You console log helped: I clicked on the URL in the log ("https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…3Dtrue%26cntlbl%3DContinue%2BAdding%2BAnalytics%26cntapi%3Danalytics&hl=en") and it led me to the right page and I have been able to generate a google-services.json for my app.
A guy from Google analytics team suggests the solution here.
Try going through this website to get your configuration file - its the one for Cloud Messaging but it has a button that says "GET CONFIGURATION FILE":
https://developers.google.com/cloud-messaging/android/client
Also I did experience the same problem last week sometime when configurating cloud messaging myself but it seemed to have resolved itself in the afternoon so it could just be a one day error thing.
Steps for getting configuration if your first time login to google developer account.
open google developer console.
login to developer console.
create project with valid name.
then goto the API section & enable GCM API.
Then get the configuration file.
My apologies for asking this question on Stackoverflow, but Google says that this is my only choice. I have a support package from Google in theory, but all attempts to get a PIN yield "Invalid Operation" (a different problem).
I am just trying to use the Google web page instructions to create an Android client Id for secure access to AppEngine Endpoints.
In the following Google instructions, steps 6 and 7 point me to non-existent user choices on the Google Cloud console.
Straight from the web page:
[https://developers.google.com/appengine/docs/java/endpoints/auth#Java_Creating_OAuth_20_client_IDs]
...
Creating an Android client ID
...
Open the Google Cloud Console. [https://cloud.google.com/console]
When your project appears in the projects pulldown menu, select it to make it the active project. [Selected the project from the table of projects]
Click APIs and Auth and select Registered Apps [No such selections exist; tried all links - nothing even close to on topic.]
If your app is not yet registered, select the Register App button. [No such link exists.]
…
I hope Google is listening and can help. My apologies to everyone else. I have no other way to contact Google.
I don't understand what's the issue, as the instruction provided is correct and that's how we generated the client ID for our projects: