(gcloud.app.deploy) Error Response: [13] Error processing user code.

661 views
Skip to first unread message

Thomas Jannaud

unread,
Aug 5, 2019, 4:22:37 PM8/5/19
to Google App Engine
Hi
I am migrating my google app engine python website to gcloud.
If it can help, I have migrated one small website (fully static) with success. Now I am migrating a website that uses datastore.

It works ok locally (including connecting to the datastore)
The build succeeds but I get an error when it comes to deployment

gcloud app deploy   --project myappid --trace-log --verbosity=debug gives:

...
Updating service [default]...failed.                                                                                                      
DEBUG: (gcloud.app.deploy) Error Response: [13] Error processing user code.
Traceback (most recent call last):
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 983, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 795, in Run
    resources = command_instance.Run(args)
  File "/usr/local/google-cloud-sdk/lib/surface/app/deploy.py", line 90, in Run
    parallel_build=False)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 641, in RunDeploy
    ignore_file=args.ignore_file)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 431, in Deploy
    extra_config_settings)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 207, in DeployService
    poller=done_poller)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 313, in WaitForOperation
    sleep_ms=retry_interval)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 264, in WaitFor
    sleep_ms, _StatusUpdate)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 326, in PollUntilDone
    sleep_ms=sleep_ms)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 229, in RetryOnResult
    if not should_retry(result, state):
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 320, in _IsNotDone
    return not poller.IsDone(operation)
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 182, in IsDone
    encoding.MessageToPyValue(operation.error)))
OperationError: Error Response: [13] Error processing user code.
ERROR: (gcloud.app.deploy) Error Response: [13] Error processing user code.

 Note: I can send you privately the app id/other info

requirements.txt file:
Flask==1.1.1
gunicorn==19.9.0
google-api-python-client==1.7.10
google-cloud-ndb==0.0.1
google-cloud-storage==1.17.0
jinja2==2.10.1
PyYAML==5.1.1
urlfetch==1.1.2
grpcio-gcp==0.2.2


app.yaml file:
runtime: python37
entrypoint: gunicorn -b :$PORT main:app

handlers:
- url: /static
  static_dir: static
- url: /robots.txt
  static_files: robots.txt
  upload: robots.txt
- url: .*
  script: auto


Any idea?
Note that I don't want to use flex (my website doesn't have many visits)
Thanks in advance for looking into this!

Nicolas (Google Cloud Platform Support)

unread,
Aug 5, 2019, 5:17:14 PM8/5/19
to Google App Engine

Hi Thomas,

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching App Engine. For technical implementation, such as migrating your website, you may be better served in dedicated forums such as Stack Overflow, where experienced programmers are within reach and ready to help.

Thomas Jannaud

unread,
Aug 7, 2019, 1:23:29 AM8/7/19
to Google App Engine
Sorry about that
For anyone reading this, I ended up creating an issue on Google's bug tracker. Unfortunately I gave the name of my project so it became "private" but the answer was that I deleted the service account for the app. The best way is to undo it
https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete
(find your 21 digits id in your activity log https://console.cloud.google.com/home/activity where you deleted the service account)
Reply all
Reply to author
Forward
0 new messages