Android OAuth consent screen stuck in white loading screen - android

I have been trying to solve this for many days now, to no avail. I want to use the google-fit APIs, and it seems that I am getting stuck in an infinite loading screen during the OAuth Consent flow.
For the consent screen I have:
Gone to the google cloud console
I have enabled Google Fit
Setup the OAuth consent screen with a logo, company name, etc
Added scope that I need
Added me as a test user
I also created the credentials:
I got the SHA-1 of my debug Keystore, which is used to sign the test version of the application
I created a new Android credential, giving the SHA-1 and the package name from the AndroidManifest.xml file.
The code I use is just the android sample for Google Fit here here: https://github.com/android/fit-samples/tree/main/BasicHistoryApiKotlin
Everything works fine when the OAuth consent screen is in test mode.
However, when I put the Oauth Consent screen in Production mode, it stops working.
I get stuck in this screen, which appears immediately after selecting the user account.
By taking a look at the logs, I see this error:
2021-10-22 17:44:53.737 2571-3763/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> NEED_REMOTE_CONSENT. App: com.google.android.gms.fit.samples.basichistoryapi, Service: oauth2:https://www.googleapis.com/auth/fitness.activity.write
NOTE: This happens only when submitting the OAuth screen for production. In test, it works correctly. Normally I should be able to see this screen https://support.google.com/cloud/answer/7454865?hl=en (since I am not verified) and be able to proceed after clicking a button. But this does not happen.
NOTE 2: I know this has appeared multiple times in stack overflow, but my case has to do with my consent screen in production mode (which should still work according to Google with a warning), even if Google hasn't approved it.
I would appreciate any help the community could give me. Has anyone encountered issues like this when going into production?

Related

Google OAuth stuck on loading screen in production

Using OAuth sign in for an app and it's getting stuck during the loading screen as seen below. The status has been changed to 'in production' as you can see, and no verification is needed according to google. It does say however my app has not been reviewed, does my app need to be put on the play store having been reviewed for this to work? Currently it's only on internal testing track and yet to be published. Any help on this is much appreciated.
Just to note this works fine when app is in testing status.

Google OAuth sign-in stuck loading consent screen

My app uses the Google Drive API to back up user files. I wanted to test my app sign-in from scratch so I manually revoked the app from my Google account settings but when I go to sign in again, I'm stuck loading the consent screen (see below) after choosing my Google account.
This is what I have...
Publishing status is "Testing", user type is "External", and I've added/using the right test users
Registered both my debug and production keys under OAuth 2.0 Client IDs
Scopes are only "./auth/drive.appdata" and "./auth/drive.file"
Domain is verified, provided organization website, support email, privacy policy link, and custom app icon
This is what I've tried...
Reinstalling the app and clearing data
Waiting about 24 hours
Removing the Google account from the device and signing in again
Deleting and reuploading my debug SHA-1 key
Disabling and reenabling the entire Google Drive API
Using a different Google account that has never been used with my app before (makes me think it's something on Google's end)
Using different test devices (emulator + physical devices)
Checking out old code branch from known-good time (in other words, sign-in code is the same)
I emphasize again that this sign-in and OAuth flow was working before (albeit showing the consent screen for "unverified" apps since it's still under development). I have not changed any scopes nor reconfigured the OAuth consent screen.
Does anyone have advice on other things to try here? Given that this was working before, I'm not sure what else I can change from my Google APIs dashboard.
I understand that my question is very similar to one asked before, however in that case apparently using a different account ended up working – that is not the case for me.
Mine was the same case. It used to work fine, but then after some months Google sign in Screen asked verification, and then after some days this loading stuck issue appeared.
But the issue was of Goole Drive Scopes if you don't want to go for verification and your use case is simple then use recommended scopes as mentioned here https://developers.google.com/drive/api/v2/about-auth
I just wanted listing, getting and creating of files, the below scopes did the work for me
GoogleSignin.configure({
scopes: [
'https://www.googleapis.com/auth/drive.appdata',
'https://www.googleapis.com/auth/drive.file',
],
...
...
});
taken the create file scope from here https://developers.google.com/drive/api/v3/reference/files/create
I had the opposite problem of most of you: my consent screen worked fine in testing mode but got the infinite loading bar in production. It turned out I was using the wrong Google Photos scope in my app code. I was only requesting https://www.googleapis.com/auth/photoslibrary.readonly in Google Cloud Console, but in my app I was using https://www.googleapis.com/auth/photoslibrary. I'm still not sure why I was allowed to use a broader scope in testing but not in production.
Had a similar situation when my app was rejected for using 'YouTube' in the description after being on the Play Store for 4 years...[but anyway]
After dinking with it for a long time and creating new credentials all kinds of stuff
I went to:
google account
revoked access for the app in question
in the dev console: move the app back to testing [make sure you have testing users on your list]
uninstall the App
install the app
after I picked the account, I got the same blank consent screen with a twirling progress dialog, but I also got an email; once I confirmed it was me through the email the progress bar went away and I got the oauth dialog as expected, when I clicked allow, everything worked. Back when I originally built the App before it was rejected, I don't remember the email confirmation being required, but I could be wrong. I swear I had tried this a dozen times. I wonder if Google does something on its end...
I eventually got it working after I changed my consent screen to production mode instead of testing. The issue on Google's end (see comments) seems to have been closed with "Won't fix (inactionable)".
Update: There appears to be different causes for being stuck at the OAuth screen. In my particular case, it turned out to be a Google-side issue that I believe they later may have fixed. Other answers here may be equally helpful but I've accepted my own answer because that was specifically the conclusion to my own problem.

Suddently The error "user is not allowed to see this application per the developer set configuration"

From one day to another, all our users are getting this error when trying to login into facebook from our iOS and Android app made with Unity3D.
However, test users and users under role section can login. We have not updated the build and we do not remember to have changed anything on the facebook app. The application is live and public for everyone and the green checkmark is filled.
I want to know if there is any way to get a deeper debug to understand where this problem occurs?
If you're using the Simulator reset all content and settings. Previous users may still be logged in. Worked for me.

Google Play Services Android won't sign in Adobe Air

Recently I've been trying to get my Adobe Air AS3 Android game to work with Google Play Game Services.
I'm using the Milkman Native Extension and Flashdevelop.
I made my own sign in button, and when I press it the standard "Sign in with your account" window with all my accounts appears. The first time I sign in with an account it even gives me the standard options to share my game status to my Google+ circles. Then, when I do try to log in, the service shows the standard spinning progress wheel, then disappears, the "Signed in as PLAYER" box doesn't show up, and I'm not logged in. The ANE tells me that it's an unknown_error_code.
Things I've noticed:
It doesn't let me see a list of achievements or leaderboards either.
After the first time I log in it just tries
to log me in again indefinitely.
The "Apps using google+ data" shows it as a "3rd party app" and not the actual title of the app. EDIT: It now displays it as the correct app for some reason. Still doesn't sign me in though...
I'm pretty sure this isn't a coding problem.
Things I've tried:
Matching the SHA1 key with the SHA1 key from my p12 key.
Logging into different accounts.
Making my accounts tester accounts.
Using non tester accounts.
Making new Game Service pages
Making new application pages
Changing my app I.D. (com.blank.mygame)
Clearing the "Apps using google+ data"
Making the Version Number of the game higher than the most recent test account
Making new Google+ accounts
Syncing my app to the services page.
Desyncing my app from the services page.
Making new OAuth 2.0 client I.D.s.
Publishing the game services.
Any suggestions?
Now I can answer my question officially:
I fixed it.
Apparently if you go to the API console and change the Oauth from there the game services doesn't detect it. I originally put in the wrong SHA1 and fixed it through the API and not the google services developer console.
http://www.youtube.com/watch?v=nkJS_W-VC9I (it's problem #6 which is really n)
I was having the same problem, and I solved it by changing the App/Package ID at the Google Developer Console from:
com.developer.appname
to:
air.com.developer.appname
I had simliar issue - the app was asking for permition, but it triggered onSignInFailed event.
Tried several things, the problem was with runtime enviroment - everything works correctly when I include it to application. (I was using separate AIR runtime enviroment to decrease the time of publishing the app)

Google Play Game Services sign in button spits "Unknown error"

I'm trying to use Google Play Game Services in my practice Android app.
I got the sign in buttons UI as explained in the developer guide. When I hit the sign in for the first time, it guides me through sign in process. Right after it's about to finish the process, it gives me a dialog with "Unknown error". After the first time, it always gives me this dialog after displaying the loading animation for a bit.
I imported BaseGameUtils and google-play-services_lib. I attached reference from BaseGameUtils to the google-play-services_lib. Then attached reference of these 2 to my game project.
I exported the project to get the SHA1 to put in the developer console. Then I have my 12 digit app id to place on the values/ids.xml (got the meta tag under application).
Tried cleaning the project, redoing the SHA1/keystore process and no luck. My email is under the testing access.
I read and tried the solutions provided on this question, but it was not my case.
Google Play Game Services - unable to sign in
Anybody experiencing the same or does anyone have a solution I should try?
Try going to your Google+ settings on your device and purging the access that you had granted the app. Afterwards, MANUALLY set up Google+ for your test account, either through a PC/Mac web browser or through your device, then try re-linking the app. This worked for me.
Exact steps for Samsung Galaxy S3:
Settings -> Google -> Google+ -> Apps with Google+ Sign-In -> tap the app and at the bottom, tap Disconnect App.
For what it’s worth, I also tapped the option to “Delete all activity for this app” as well when I deleted it.
Your ids.xml has to look like:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_id">XXXXXXXXX</string>
</resources>
And, in your manifest, you have to add:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
Good luck!
I recommend utilising the debug log trace in the GameHelper class to get a clearer picture of the error. You can simply make a call in your onCreate to do this...
enableDebugLog(true, "fred"); where "fred" is the tag you want to show on logcat
It is most likely that you will then see an error like "OnConnection Failed result 4... SIGN IN REQUIRED. If you then search SO for that message you should be able to make some progress.
Another possibility:
I managed to get my own leaderboard into production last night. The error you are describing is one that I (and judging by other comments that I have seen in error reports on SO ) and other people have also encountered. I found that I was unable to use the google account that I user in the developer console to sign on, even though it is explicitly listed as a testing account for the game. I tried shutting down the emulator, deleting and redefining the game in the developer console etc. but I have never been able to get it to work.
I used a different account and I was able to sign on. I do not know what the problem is with my developer console account - I also use it in Google Plus without problems. Incidentally, I am still unable to use my developer account on the production app with a real device.
My advice is to use a separate account for testing. Good luck !
If you are using your production keystore to get the fingerprint, you need to export and use a release build. Otherwise, use the debug keystore to get the fingerprint.
According to https://developers.google.com/games/services/console/enabling#b_create_a_client_id - if using eclipse, the debug keystore is located at
~/.android/debug.keystore
One more thing, for me, I couldn't sign in using my publisher account but one of my other accounts worked ok. Maybe worth a try.
One additional thing that can be tried is to send (as attachment) the exported and signed yourapp.apk to the tester's account's email, and then install the app through email (by clicking on the attachment), and not through the usb.
It seems to me the problem here is not with play services, but with google+, as it sometimes takes several days for the changes (such as deleting some info) to take effect. If nothing works, create a new gmail account, and try again (that's what "worked" for me eventually :)).
Edit: old accounts that didn't work initially started working after 4 - 5 days. Maybe it just takes Google some time to synchronize everything.

Categories

Resources