[google-appengine] deploy error - token exchange failed

2019-10-04 Thread Laurent Parodi
Hi all,

I discover app engine using the tutorials, starting with the "hello world" 
node one. All deployments fail with a cryptic token exchange error:

starting build "e47858c0-6cbc-4c73-bbbc-bf6b78cf4f8f"

FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): 
gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest 
gs://staging.lp-sandbox-254814.appspot.com/ae/5b39e792-2ec1-481e-86e3-ebd979ffb6e4/manifest.json.
Step #0 - "fetcher": Processing 6 files.
Step #0 - "fetcher": **
Step #0 - "fetcher": Status: SUCCESS
Step #0 - "fetcher": Started: 2019-10-04T12:25:48Z
Step #0 - "fetcher": Completed: 2019-10-04T12:25:52Z
Step #0 - "fetcher": Requested workers: 200
Step #0 - "fetcher": Actual workers: 6
Step #0 - "fetcher": Total files: 6
Step #0 - "fetcher": Total retries: 1
Step #0 - "fetcher": GCS timeouts: 1
Step #0 - "fetcher": MiB downloaded: 0.00 MiB
Step #0 - "fetcher": MiB/s throughput: 0.00 MiB/s
Step #0 - "fetcher": Time for manifest: 649.10 ms
Step #0 - "fetcher": Total time: 3.88 s
Step #0 - "fetcher": **
Finished Step #0 - "fetcher"
Starting Step #1 - "builder"
Step #1 - "builder": Pulling image: 
gcr.io/gae-runtimes/nodejs10_app_builder:nodejs10_20190827_10_16_2_RC00
Step #1 - "builder": nodejs10_20190827_10_16_2_RC00: Pulling from 
gae-runtimes/nodejs10_app_builder
Step #1 - "builder": Digest: 
sha256:c780ff233bda5bf40cb5c19ee8476b2965015f882c62d5cbd4bd3f28a30ec3eb
Step #1 - "builder": Status: Downloaded newer image for 
gcr.io/gae-runtimes/nodejs10_app_builder:nodejs10_20190827_10_16_2_RC00
Step #1 - "builder": 
gcr.io/gae-runtimes/nodejs10_app_builder:nodejs10_20190827_10_16_2_RC00
Step #1 - "builder": 2019/10/04 12:25:56 Starting commonbuild with args 
[commonbuild --runtime=nodejs10 --entrypoint= --src=/workspace 
--config-file=/.gaeconfig/app_start.json -- ftl.par 
--name=eu.gcr.io/lp-sandbox-254814/app-engine-tmp/app/ttl-2h:5b39e792-2ec1-481e-86e3-ebd979ffb6e4
 --directory=/workspace --destination=/srv 
--cache-repository=eu.gcr.io/lp-sandbox-254814/app-engine-tmp/build-cache/ttl-7d
 --cache --additional-directory=/.gaeconfig --builder-output-path="" 
--base=eu.gcr.io/gae-runtimes/nodejs10:nodejs10_20190827_10_16_2_RC00].
Step #1 - "builder": 2019/10/04 12:25:56 No start command generator found for 
nodejs10, using default app start command "serve".
Step #1 - "builder": 2019/10/04 12:25:56 Writing configuration file 
"/.gaeconfig/app_start.json".
Step #1 - "builder": 2019/10/04 12:25:56 Invoking build command "ftl.par 
--name=eu.gcr.io/lp-sandbox-254814/app-engine-tmp/app/ttl-2h:5b39e792-2ec1-481e-86e3-ebd979ffb6e4
 --directory=/workspace --destination=/srv 
--cache-repository=eu.gcr.io/lp-sandbox-254814/app-engine-tmp/build-cache/ttl-7d
 --cache --additional-directory=/.gaeconfig --builder-output-path=\"\" 
--base=eu.gcr.io/gae-runtimes/nodejs10:nodejs10_20190827_10_16_2_RC00".
Step #1 - "builder": INFO FTL version node-v0.17.0
Step #1 - "builder": INFO Beginning FTL build for node
Step #1 - "builder": INFO FTL arg passed: exposed_ports None
Step #1 - "builder": INFO FTL arg passed: cache_repository 
eu.gcr.io/lp-sandbox-254814/app-engine-tmp/build-cache/ttl-7d
Step #1 - "builder": INFO FTL arg passed: tar_base_image_path None
Step #1 - "builder": INFO FTL arg passed: export_cache_stats False
Step #1 - "builder": INFO FTL arg passed: builder_output_path ""
Step #1 - "builder": INFO FTL arg passed: name 
eu.gcr.io/lp-sandbox-254814/app-engine-tmp/app/ttl-2h:5b39e792-2ec1-481e-86e3-ebd979ffb6e4
Step #1 - "builder": INFO FTL arg passed: ttl 168
Step #1 - "builder": INFO FTL arg passed: global_cache False
Step #1 - "builder": INFO FTL arg passed: cache True
Step #1 - "builder": INFO FTL arg passed: upload True
Step #1 - "builder": INFO FTL arg passed: sh_c_prefix False
Step #1 - "builder": INFO FTL arg passed: fail_on_error True
Step #1 - "builder": INFO FTL arg passed: base 
eu.gcr.io/gae-runtimes/nodejs10:nodejs10_20190827_10_16_2_RC00
Step #1 - "builder": INFO FTL arg passed: output_path None
Step #1 - "builder": INFO FTL arg passed: cache_key_version v0.17.0
Step #1 - "builder": INFO FTL arg passed: cache_salt
Step #1 - "builder": INFO FTL arg passed: directory /workspace
Step #1 - "builder": INFO FTL arg passed: entrypoint None
Step #1 - "builder": INFO FTL arg passed: additional_directory /.gaeconfig
Step #1 - "builder": INFO FTL arg passed: destination_path /srv
Step #1 - "builder": INFO FTL arg passed: verbosity NOTSET
Step #1 - "builder": INFO starting: full build
Step #1 - "builder": INFO starting: builder initialization
Step #1 - "builder": INFO Loading Docker credentials for repository 
'eu.gcr.io/gae-runtimes/nodejs10:nodejs10_20190827_10_16_2_RC00'
Step #1 - "builder": INFO Loading Docker credentials for repository 
'eu.gcr.io/lp-sandbox-254814/app-engine-tmp/app/ttl-2h:5b39e792-2ec1-481e-86e3-ebd979ffb6e4'
Step 

[google-appengine] Re: deploy error - token exchange failed

2019-10-08 Thread Laurent Parodi
Hello,

Thanks for the reply, I'm really lost. 

Granted roles to my user account are:

App Engine Admin

Cloud Build Editor

Owner

Storage Admin


Then, I log on : 

@nuc:~/nodejs-docs-samples/appengine/hello-world/standard$ gcloud auth login

Go to the following link in your browser:



https://accounts.google.com/o/oauth2/auth?code_challenge=rg4Kgf6ucDNPqHSyi3QyicMNO623iRBt4v0wMAMaLM0&prompt=select_account&code_challenge_method=S256&access_type=offline&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth



Enter verification code: 
4/rwFIdCe_S7C63_y0P0tvGV8zK4zJRplLKFXhb0VX9XTVz24KqZsBADg

WARNING: `gcloud auth login` no longer writes application default 
credentials.

If you need to use ADC, see:

  gcloud auth application-default --help


You are now logged in as [xx....@zz.com].

Your current project is [lp-sandbox-254814].  You can change this setting 
by running:

  $ gcloud config set project PROJECT_ID


Then, I run the deploy:


l@nuc:~/nodejs-docs-samples/appengine/hello-world/standard$ gcloud app 
deploy

Services to deploy:


descriptor:  
[/home/l/nodejs-docs-samples/appengine/hello-world/standard/app.yaml]

source:  
[/home/l/nodejs-docs-samples/appengine/hello-world/standard]

target project:  [lp-sandbox-254814]

target service:  [default]

target version:  [20191007t222332]

target url:  [https://lp-sandbox-254814.appspot.com]



Do you want to continue (Y/n)?  y


Beginning deployment of service [default]...

╔╗

╠═ Uploading 0 files to Google Cloud Storage═╣

╚╝

File upload done.

Updating service [default]...failed.

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 
bc837367-c520-48f4-a734-a5e86f33aa30 status: FAILURE.

Build error details: 
{"error":{"errorType":"BuildError","canonicalCode":"INVALID_ARGUMENT","errorId":"A815B8B7","errorMessage":"INFO
 
FTL version node-v0.17.0\nINFO Beginning FTL build for node\nINFO   
  FTL arg passed: exposed_ports None\nINFO FTL arg passed: 
cache_repository 
eu.gcr.io/lp-sandbox-254814/app-engine-tmp/build-cache/ttl-7d\nINFO FTL 
arg passed: tar_base_image_path None\nINFO FTL arg passed: 
export_cache_stats False\nINFO FTL arg passed: builder_output_path 
\"\"\nINFO FTL arg passed: name 
eu.gcr.io/lp-sandbox-254814/app-engine-tmp/app/ttl-2h:77c7b674-1333-4cdc-9a6d-5631eca997be\nINFO
 
FTL arg passed: ttl 168\nINFO FTL arg passed: global_cache 
False\nINFO FTL arg passed: cache True\nINFO FTL arg passed: upload 
True\nINFO FTL arg passed: sh_c_prefix False\nINFO FTL arg passed: 
fail_on_error True\nINFO FTL arg passed: base 
eu.gcr.io/gae-runtimes/nodejs10:nodejs10_20190827_10_16_2_RC00\nINFO FTL 
arg passed: output_path None\nINFO FTL arg passed: cache_key_version 
v0.17.0\nINFO FTL arg passed: cache_salt \nINFO FTL arg passed: 
directory /workspace\nINFO FTL arg passed: entrypoint None\nINFO FTL 
arg passed: additional_directory /.gaeconfig\nINFO FTL arg passed: 
destination_path /srv\nINFO FTL arg passed: verbosity NOTSET\nINFO 
starting: 
full build\nINFO starting: builder initialization\nINFO Loading 
Docker credentials for repository 
'eu.gcr.io/gae-runtimes/nodejs10:nodejs10_20190827_10_16_2_RC00'\nINFO 
Loading 
Docker credentials for repository 
'eu.gcr.io/lp-sandbox-254814/app-engine-tmp/app/ttl-2h:77c7b674-1333-4cdc-9a6d-5631eca997be'\nINFO
 
builder initialization took 0 seconds\nINFO starting: build process 
for FTL image\nINFO starting: rm_node_modules\nINFO rm_node_modules 
rm -rf /workspace/node_modules\nINFO `rm_node_modules` stdout:\n\nINFO   
  rm_node_modules took 0 seconds\nINFO using 
descriptor:package-lock.json\nINFO using descriptor:package.json\nINFO   
  starting: checking_cached_packages_json_layer\nDEBUGChecking cache 
for cache_key 
3b92fb27b83299cc2b8917f2ca0220beaabd42233b14dd6f9083dce71babb387\nINFO No 
cached base image found for entry: 
eu.gcr.io/lp-sandbox-254814/app-engine-tmp/build-cache/ttl-7d/node-cache:3b92fb27b83299cc2b8917f2ca0220beaabd42233b14dd6f9083dce71babb387.\nINFO
 
Cache miss on local cache for 
eu.gcr.io/lp-sandbox-254814/app-engine-tmp/build-cache/ttl-7d/node-cache:3b92fb27b83299cc2b8917f2ca0220beaabd42233b14dd6f9083dce71babb387\nINFO
 
No cached dependency layer for 
3b92fb27b83299cc2b8917f2ca0220beaabd42233b14dd6f9083dce71babb387\nINFO 
[CACHE][MISS] 
v0.17.0:NODE-\u003e3b92fb27b83299cc2b8917f2ca0220beaabd42233b14dd6f9