Coder Social home page Coder Social logo

Comments (4)

vmingam avatar vmingam commented on July 17, 2024 3

Followed the steps above but i am getting this error when trying to submit my application: [!] Google Api Error: Invalid request - The caller does not have permission

@MarcosHenriqueLordelo,

I've just succeeded. Few more steps are missing, linked to "... (if it has permission) ..." mentioned in the steps detailed by @AlexanderCollins #132 (comment)

In the Google Play Console > Users & Permissions

  • Click on Invite new users
  • Add the email address of the new Service Account
  • Give to him the Admin permissions (Release permissions seem insufficient)

Hope this is helping you.

from fyi.

MarcosHenriqueLordelo avatar MarcosHenriqueLordelo commented on July 17, 2024 1

Followed the steps above but i am getting this error when trying to submit my application:
[!] Google Api Error: Invalid request - The caller does not have permission

from fyi.

AlexanderCollins avatar AlexanderCollins commented on July 17, 2024

At first glance it looks like the new process is to create a Google Cloud Platform project which you then link to the App in Google Play Console under the "App Integrity" menu item. Then to "Integrate the Integrity API" there is a button that leads to Google Plat Integrity API > Setup. There it reads:

Set up in Google Play Console (recommended)
By enabling Play Integrity API responses in the Google Play Console, you will gain access to additional configuration options, testing features, and API reporting. This option is only available to apps distributed on Google Play. Navigate to Release > App integrity. Under Play Integrity API select Link a Cloud project. Choose the Cloud project you want to link to your app and this will enable Play Integrity API responses. You can now integrate the Play Integrity API into your app.

Set up in Google Cloud Console
In your Google Cloud Console, create a new Cloud project or choose an existing Cloud project that you want to use with the Play Integrity API. Navigate to APIs and services. Select enable APIs and services. Search for Play Integrity API and then enable it. You can now integrate the Play Integrity API into your app.

Its a little strange that they have Setup in google play console (recommended) and then during the setup in GPC redirect back to the documentation that then requires you to setup in Google Cloud Console....

Anyway, continuing with Set up in Google Cloud Console: Navigate to the GCC project that you linked to your app and enable the Google Play Integrity API . Mine was already enabled so perhaps this step isn't required and is done by the linking. Make sure you have the correct GCP project selected in the project selection drop down at the top of the screen.

Once enabled you should be able to click Manage on the Google Play Integrity API Page (again make sure you have the right project selected if you have multiple GCP projects).

Screenshot 2023-10-08 at 2 47 31 pm

This will take you to the Google Play Integrity API Service Details page. You can click the button in the banner.

Screenshot 2023-10-08 at 2 47 46 pm

If you don't have the Create Credentials banner button you can either go to Credentials > + Create Credentials > Help me choose or follow this link to get there: https://console.cloud.google.com/apis/credentials/wizard.

This will take you through to the Credentials Wizard. Ultimately you need a Service Details account so you can make sure the Google Play Integrity API is Selected and select the Application data option. If you were to select the user data option you would be setting up OAuth credentials which isn't what we want.

If you don't have the Create Credentials banner button you can either go to Credentials > + Create Credentials > Help me choose or follow this link to get there: https://console.cloud.google.com/apis/credentials/wizard.

The wizard is a weird screen because you can select Done but it'll do nothing. You need to select Next which will then redirect you to create the service account.

Screenshot 2023-10-08 at 2 56 21 pm

Then you'll be on the create service account page which you can also just get to from here: https://console.cloud.google.com/iam-admin/serviceaccounts/create

Name your service account and then click Create and Continue.

Screenshot 2023-10-08 at 2 59 50 pm

At this point you need to Grant this service account access to project. I'm not sure what the granular permissions need to be. I advise against using broad administrative permissions just on the basis that I don't know what the security implications may be however for my purposes I selected the Owner role and then clicked Continue.

Then I clicked Done, ignoring the 3rd step.
Screenshot 2023-10-08 at 3 17 21 pm

You should be redirected to your new service account however if your not just head to Service Accounts or Credentials to find it.

Then once you are on your new service account's page click the Keys tab > Add Key dropdown > Create new key option.

Screenshot 2023-10-08 at 3 20 44 pm

A modal will appear Create private key for "". Select JSON and then Create.

Screenshot 2023-10-08 at 3 22 31 pm

The private key will automatically download and will be named "projectname-first12charactersofkeyname.json".

Also make sure you have Google Play Android Developer API enabled too. Your service account (if it has permission) will be able to use this api automatically.

Then all I did was specify the location of the service account JSON credential file when calling npx eas build -p android --auto-submit. I couldn't see any changes to my app.json or eas.json so I assume it's being stored against the project in expo (please correct me if I'm wrong).

This probably works for most deployments however since this is a new app I got the error message "You haven't submitted this app to Google Play Store yet. The first submission of the app needs to be performed manually.". If anyone has any input on how to round off this FYI it would be greatly appreciated.

This is my first time using google cloud to deploy on Android so please correct anything I've missed!

from fyi.

amandeepmittal avatar amandeepmittal commented on July 17, 2024

Thank you, everyone, for your input, and I apologize for both the inconvenience caused and not being able to get back to you during that time. Since this issue was opened, we've reviewed and updated the guide internally. For that reason, I'm going to close this issue but if you folks think it is needs an update or i missing something, let us know!

from fyi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.