Error deploying GAE Flex with gcloud app deploy - google-app-engine

All of a sudden having issues with deploying to GCP using gcloud app deploy.
Created a brand new project and tried to upload a sample hello-world app from GCP, but still get the following error:
ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/gcp-test-8710371/appengine/default.20181106t173450:latest was either not found, or is not in Docker V2 format. Please visit https://cloud.google.com/container-registry/docs/ui
app.yaml:
runtime: nodejs
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
SDK: Google Cloud SDK 224.0.0
I've checked the container registry, and nothing is created there.
Also, tried enabling/disabling APIs like in this post, but with no result.
An example Python app uploads fine with no problems.

Appears it was an issue on GCP's side. The error is no longer occuring, so I assume it was resolved.

There was an issue affecting the Flex deployments. The issue was fixed on 07/11 at aproximately 00:40 UTC. As #isharko pointed out, Flex deployments should be working normally now.
There's also a public issue on GCP's issue tracker about this. If new relevant information surfaces, it'll likely be posted there.

Related

App Engine Service Deployment Stopped Working on Known Good Version

We have a service hosted in gcloud that is not actively developed and we have not deployed for a few weeks.
On deployment we now get the error ERROR: gcloud crashed (TypeError): unorderable types: NoneType() > int() and the deployment fails.
We get the exact same results even if we run the last deployed version through CI.
This is my app.yaml
runtime: aspnetcore
env: flex
threadsafe: true
service: myapp
manual_scaling:
instances: 1
env_variables:
service_name: myapp
AWS_ACCESS_KEY_ID: {{AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: {{AWS_SECRET_ACCESS_KEY}}
AWS_REGION: eu-west-1
This is very unclear to me as it's not obvious what the deployment would need ordering. Is there something I am missing in interperating this error message?
Check if you have Python 3.5 installed on the same build agent. The gcloud SDK has a dependency of Python 2.7, also advisable to set the CLOUDSDK_PYTHON environment variable to the path of your Python 2.7 installation location.
A workaround that worked for me:
Instead of gcloud app deploy ... try gcloud beta app deploy ...
You may be prompted to install the beta components (allow this)
If adding 'beta' results in a successful deployment, try again without it.
It seems like something was corrupt and using the 'beta' deployment command un-corrupted things. Your mileage may vary.

gcloud app deploy failed: Docker image not found or not in V2 format [duplicate]

All of a sudden having issues with deploying to GCP using gcloud app deploy.
Created a brand new project and tried to upload a sample hello-world app from GCP, but still get the following error:
ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/gcp-test-8710371/appengine/default.20181106t173450:latest was either not found, or is not in Docker V2 format. Please visit https://cloud.google.com/container-registry/docs/ui
app.yaml:
runtime: nodejs
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
SDK: Google Cloud SDK 224.0.0
I've checked the container registry, and nothing is created there.
Also, tried enabling/disabling APIs like in this post, but with no result.
An example Python app uploads fine with no problems.
Appears it was an issue on GCP's side. The error is no longer occuring, so I assume it was resolved.
There was an issue affecting the Flex deployments. The issue was fixed on 07/11 at aproximately 00:40 UTC. As #isharko pointed out, Flex deployments should be working normally now.
There's also a public issue on GCP's issue tracker about this. If new relevant information surfaces, it'll likely be posted there.

Deploy ASP.NET Core 2.1 app to Google Cloud App Engine error: bad character range

When I try to publish an ASP.NET Core 2.1 Web Application to Google Cloud Platform App Engine I get the error gcloud crashed (error): bad character range.
I publish with the GCP Visual Studio 2017 extension and I get the above error.
I publish from the cmd with an app.yaml in my project and I get the above error.
In order to deploy the ASP.NET Core 2.1 web application to Google Cloud App Engine I added an app.yaml file with the following contents:
runtime: aspnetcore
env: flex
I did the following:
Added app.yaml with
runtime: aspnetcore
env: flex
Added it to csproj
<ItemGroup>
<None Include="app.yaml" CopyToOutputDirectory="Always" />
</ItemGroup>
And executed the command
gcloud beta app deploy ./bin/release/netcoreapp2.1/publish/app.yaml
However I got the error: gcloud crashed (error): bad character range
Anyone know what I am doing wrong?
I follow the following guide and still get the same error when I try method 1, 2 and 3: https://cloudplatform.googleblog.com/2017/10/4-ways-you-can-deploy-an-ASP.NET-Core-app-to-GCP.html
This issue is being investigated at the moment and a fix should be released soon. As a workaround, please downgrade your Cloud SDK version to 212.0.0 by running the following command:
gcloud components update --version 212.0.0
Downgrading the version of your Cloud SDK to 212.0.0 or lower works because it seems in version 213.0.0 some changes were implemented that caused an issue with the yaml parser used by gcloud.
In addition, please follow this Issue Tracker thread to get updates regarding the status of this issue.
You should navigate to the publish directory first and deploy from there. Make sure the app.yaml file is present in the publish directory.
dotnet publish -c Release
cd ./bin/Release/netcoreapp2.1/publish
gcloud app deploy

Why is appengine serving an old version of my nodejs express app on https but the latest one properly on http appspot?

I have run gcloud app deploy many times over the past 12 hours. When I run gcloud app browse my browser opens up https://mysite.appspot.com with some old version of my app from hours ago. I Can't even tell which at this point. However, if I visit http://mysite.appspot.com (wihout TLS) I get my new, expected version.
I've restarted the versions with the GCP console but have had no success in seeing my latest version at https://mysite.appspot.com. The console even says that the proper version is serving with 100% allocation, and indeed it is, over at http but not at https.
my app.yaml has only these 2 lines per the documentation
env: flex
runtime: nodejs
What am I doing wrong?

GAE "min_pending_latency" error in app.yaml

I just completed a gcloud components update on my local machine and got several new errors when deploying my application. I was able to fix most of these new errors with a few minutes of troubleshooting (I understand that the gcloud preview app command is still 'preview', so I expect some changes here.)
I am now getting an error (bug?) that I can't seem to fix.
ERROR: (gcloud.preview.app.deploy) Error Response: [400]
version.automatic_scaling.min_pending_latency (nanos: 300000000),
must be in the range [0.010000s,15.000000s].
So, correct me if I'm wrong, but I'm pretty sure 300000000 nanos falls in the acceptable range as defined in the error.
These are the relevant sections of my app.yaml
module: api
runtime: php55
api_version: 1
threadsafe: true
instance_class: F2
automatic_scaling:
min_idle_instances: automatic
max_idle_instances: automatic
min_pending_latency: 300ms
max_pending_latency: 1s
I just tried the 300ms config on my app, but updating using the GAE SDK's appcfg.py - no issue, which supports your suspicion of a bug in the gcloud preview CLI. You might want to file an issue with the Google Cloud SDK Issue Tracker.
As a workaround you could either:
check this #klenwell's answer to this Q&A for the new location of
appcfg.py in the Google Cloud SDK:
With Google App Engine, why do I now get "command not found" when running the appcfg.py command on my local machine?
use the GAE SDK's appcfg.py to update your app.

Resources