Question

Service Account Credentials JSON - Credentials need attention


Badge +3
  • Active Member
  • 11 replies

I made and remade this service account credentials JSON multiple times and it still won’t work. I even created a new google cloud project and made a new service account there. Did the whole process outlined in the docs to create the service account with pub/sub admin etc and it fails to work. 

 

I keep getting an error that the “credentials need attention”. 

It doesn’t seem to have any problem accessing my subscription products in the google play console. 

However, in each product it also says beside “Store Status” - “Could not check” and “Connection issue - Make sure the service account credentials JSON is configured properly.”

 

Has anybody else had issue like this and managed to resolve them? 

 

Thanks, 

 

Jay


41 replies

 hello , i hope you are good , i have a problem when i use revenue in the text , i take error at flutter flow and grew image at the real device , i have follow all docs , can you help me ?

 

Badge

@MarcosC we have only one product, for this app in particular we do not intend to have any more. That is why I thought offering, entitles system, though a great one, would be an overhead for that app. 

Userlevel 3
Badge +6

@rumen-tonev-288ae5 what are you doing to load products?

My suggestion is to use offerings. Create an offering in the dashboard and call get offerings from the SDK (https://www.revenuecat.com/docs/displaying-products).

If you are building Android native, you can try our beta feature paywalls (https://www.revenuecat.com/docs/paywalls - you choose a template in our dashboard and with our SDK we render it using native components)

I think internal testing should be ok.

Badge

Hey @MarcosC , thank you very much for your guidance , I am almost done with the implemantion and testing. However, I am at a place I might use some advice to speed me up. So I get 200 OK from loading products call but the array is empty-I checked identifier it is good.So, the test account did not get an opt-in mail with url(as described in the docs that is the most possible reason- I am working on that). One thing started to bothering me-documentation is talking about Closed test track, however I am using Internal test track-would that be a problem as well, I mean should I switch to Closed( I do not intend yet to share app for testing, I just need the IAP flow working. Thanks in advance! 

Userlevel 3
Badge +6

no worries @rumen-tonev-288ae5 . Always happy to help. If you have any other question, feel free to reach out to me

Badge

Thank you very much and sorry for wasting your time! I should be more cautious when asking next time :) 

Userlevel 3
Badge +6

Unfortunately, that’s the flow from Google. You need to upload an APK. What you can do is build a hello world project with the bundle id that you want, build it and upload that APK. That will allow you to also then create subscriptions and everything.

Until you don’t have a valid app in Google play with a bundle ID, we cannot use the API for anything, and that’s the reason why you are seeing the credentials as “invalid”

Badge

Hey @MarcosC  thanks for reaching out so fast. It seems I misunderstood something from the process. In order to set package name in Google Play console I need to upload a bundle for internal testing-is that correct? is there any other way to set the package name(though I think not since it is comming from the build.grale file)?

Userlevel 3
Badge +6

Hey @rumen-tonev-288ae5, happy to help you,

If all checks are failing, then it’s either a configuration or permission issue, so can you check the following first:

Badge

Hey @MarcosC I saw your contribution to the community problems and I really appreciate it. So I have a problem with my Android setup as well, seems like the credentials are not working-all 3 of the checks are returning  Could not validate with ? (reason:unknown) and no reason is returned from google store. I looked at this thread, tried everything, my credentials are like 7 -8 days old. So, the only interesting thing I saw is that mentioned linking Google play app to the google cloud project. It seems it is moved to Google Integrity API, and the Google documentation explains that comunication with that API should come from the SDK provider. That all is kind of confusing- I choose RevenueCat exactly because your documentation, tutorials etc, is exceptional-I set iOS account and test payment for like 30-40 min just using your docs. Anyway, do you have any idea what is the Google Integrity API engaged for, the problem is that it seems the only way to make the connection between the Cloud and the play store?I actually made the connection but I stuck on the last step-Intergrate Integrity API, but it continue to redirect me to some documentation. Any advise would be appareciated. I am sorry if I sound strange but this is my first time in mobile development(I have been web dev for years)

Badge

Answering my own question, after about 36 hours, it resolved itself - I just had to wait :)

Badge

Hi MarcosC,  

I just went through setting up new project with RevenueCat.  I also see 

“Credentials Need Attention” - with the X near this text: `Permissions to call Subscriptions API`.  

But this others seem to have no problems.  

I created the project just a few minutes ago, and followed workaround to speed up the credentials.  

Is this a situation where I just need to wait 24-36 hours or do you think there is something wrong here?
 

 

Badge +3

Finally all are set on both devices
Thanks for your support through out configuring. 

Here is the broad level configuring overview might help other. 
Confuguring Service Account Credentials JSON
1.
Make sure you uploaded correct file, 1, 2 are enabled by default. if didn’t you have miss somthing (recheck configuration )

   1. Permissions to call inappproducts API
   2. Permissions to call monetization API
To enabled “Permissions to call subscriptions API” you must upload a build to closed testing after review by google option will be enabled 

2. Double check you emulator make sure you installed Play store.

Good Luck 

Thank you 



 

 

Userlevel 3
Badge +6

@ijaz-0ad9f8 one thing I was checking yesterday that I did not realize before, is on the SDK platform section (in the SDK manager), make sure that the image that you have installed, is the one with Google Play

 

Userlevel 3
Badge +6

@ijaz-0ad9f8 nice !

Ok, so now we need to fix the emulator :D. I think the problem with the emulator might be one of the following:

  • You don’t have google play services installed
  • You are not authenticated to google play​

Check to see if you can open google play on the emulator and login with your account. If you don’t find it, you probably don’t have it installed

Badge +3

Hi, @MarcosC  Thank you for your response. 
Now All are set , at least I get offering on Android, But there is still issue I’m occuring on simulator, “ The device or user is not allowed to make the purchase.”  May I know how I test on simulator  
Note: Offering are showing in real device. 

Userlevel 3
Badge +6

@ijaz-0ad9f8 Credentials are not used for fetching products by the mobile app, they are used by RC backend to validate purchases, so I don’t think issues are related

Things I would double check:

  • That you have products and offerings configured for the Google Play app
  • Do you have the app in closed testing?
  • Make sure the applicationId on the app matches the one in RevenueCat and in Google Play Console

Regards,

Marcos

Badge +3

 

@ijaz-0ad9f8

The UI is showing a question mark (not an error). Have you tried purchasing a product in sandbox? It’s highly likely that we don’t have enough data to validate that the keys can validate purchases. My suggestion is perform a purchase flow in sandbox and see if it works

Thanks foru response,
I’m not able to fetch products either, below the logs (ANDROID ), I’m getting ,

The configuration seems ok for me, I’m run out of ideas.
Thanks 
 

 

Userlevel 3
Badge +6

@ijaz-0ad9f8 

The UI is showing a question mark (not an error). Have you tried purchasing a product in sandbox? It’s highly likely that we don’t have enough data to validate that the keys can validate purchases. My suggestion is perform a purchase flow in sandbox and see if it works

Badge +3

Thanks for your response, 

Only one have failing “Could not validate subscription API Permissions”. 

 

Userlevel 3
Badge +6

Hi @ijaz-0ad9f8 

What do you see on RevenueCat UI? All three checks are failing? only one of them?

Badge +3

Hi, @MarcosC Hope. you’r doing well, I’ve been facing similar issue from last 3 days,   “Could not validate subscription API Persmission”, on Android , We’r need this urgently to start working, on IOS all is working as expected, 
What we can do ? you have any ideas , we should implement, 

Thanks 

Userlevel 3
Badge +6

For anybody that faces this issue in the future:

We met and after confirming that everything was correctly configured, we re-uploaded the credentials and things started working as expected

Badge +3

Ahh ok that all makes sense, thanks. 

Well after adding the google play package name only yesterday around 4pm (UTC+1), I suppose it could take another 16 hours to figure out if thats the issue.

Cheers, I’ll DM you now. 

Userlevel 3
Badge +6

Yes,

The way offerings work is:

We don’t use the service credentials in that part of the flow. The credentials will be used when you purchase a given product and we use them for other things (like the things you see in the dashboard).

At this point, the only thing I can think of is that it just takes time for credentials to propagate in google.

If you want, DM me here and we can jump on a zoom to review your configuration to see if we can find anything

Reply