ERROR: gcloud crashed (UploadError): Error uploading files: HttpError - google-app-engine

I tried to deploy an App Engine app but failed due to this error:
ERROR: gcloud crashed (UploadError): Error uploading files: HttpError <redacted>
I already enabled:
App Engine Admin API
Google Cloud Storage
Google Cloud Storage JSON API
What did I missed?

Related

Appengine gcloud deploy using custom service account

I want to deploy an API to app engine But it ends up using the wrong service account.
I use these 3 cmd lines in gitlab:
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud config set account NameOfServiceAccount.com
- gcloud app deploy
What I get is
target service account: [App Engine default service account]
Do you want to continue (Y/n)?
Beginning deployment of service [lettering-back]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 2 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) PERMISSION_DENIED: You do not have permission to act as
To deploy new versions, a member must have the Service Account User
(roles/iam.serviceAccountUser) role on the App Engine default service
account, and the Cloud Build Editor (roles/cloudbuild.builds.editor)
and Cloud Storage Object Admin (roles/storage.objectAdmin) roles on
the project.
More specifically for your error message you gonna need roles/iam.serviceAccountUser on your service account whose key is the one you placed at /tmp/$CI_PIPELINE_ID.json
Reference : the first table row at https://cloud.google.com/appengine/docs/standard/python/roles#predefined_roles

(gcloud.app.deploy) HTTPError 403: <account> does not have storage.objects.get access to the Google Cloud Storage object

When I try to follow the example here: https://cloud.google.com/appengine/docs/flexible/python/quickstart,
gcloud app deploy
gives me the below error:
ERROR: (gcloud.app.deploy) HTTPError 403: *account1* does not have storage.objects.get access to the Google Cloud Storage object.
However, the account: account1 is the owner of the particular project. So why an ower does not have the storage.objects.get access here?
The problem is resolved by adding Storage Object Admin role to the account.
Try waiting a bit and re-run "gcloud app deploy". I had the same problem with a different example app. Build and deploy a C# .NET Core service I believe it's a timing issue during the build process.

GAE/Jenkins - cloudbuild service account doesn't have access to projectID

I am running Jenkins locally on Windows 10 and am having a tough time getting it to deploy to Google App Engine (Standard) with a service account. Here is what I've done so far:
Created a new service account called jenkins#PROJECT-ID.iam.gserviceaccount.com
Given that service account these permissions:
App Engine Deployer
App Engine Service Admin
Cloud Build Service Account
Cloud Build Service Agent (not sure if necessary)
Storage Admin
Downloaded the service account json key, placed it in my Documents folder
Then I used the following commands after my project builds using Node.js:
gcloud auth activate-service-account --key-file %USERPROFILE%\Documents\PROJECT\jenkins-local-sa.json
gcloud config set project PROJECT-ID
gcloud app deploy app.yaml
Then I'm hit with this error:
(gcloud.app.deploy) Error Response: [13] Failed to create cloud build: cloudbuild service account doesn't have access to projectID "PROJECT-ID".
I've seen plenty of other errors in my Google search but not this one specifically. Has anyone run across this error?
You need to enable service account user permission in cloud build settings !

Google AppEngine application 502 Server error

I created a sample Spring Boot Java application to deploy on Google App Engine flexible environment.
I used ./gradlew jettyrun to run locally and it works.
I was able to deploy to App Engine using ./gradlew appenginedeploy successfully
However, I get an HTTP 502 error when I try to test the REST call.

Google App Engine deploy error: Error scanning entry module-info.class

I'm developing an application and I would like to deploy in Google app engine.
I'm using Eclipse with google cloud plug in.
I'm using JDK 1.8.
When I deploy the application I receive this error:
java.lang.RuntimeException: Error scanning entry module-info.class
from jar
file:///var/lib/jetty/webapps/root/WEB-INF/lib/yasson-1.0.jar

Resources