cannot run gcloud app deploy i get the following on terminal (gcloud.app.deploy) Error Response: [9] Cloud build 8c84eb5e-f6b7-4170-a87d-80754fecfbbe status: FAILURE removing /layers/google.go.gomod/gopath: unlinkat /layers/google.go.gomod/gopath/pkg/mod/gonum.org/v1/gonum@@ v0.9.3/internal/math32/signbit.go: permission denied Full build logs: https://console.cloud.google.com/cloud-build/builds;region=us-central1/8c84eb5e-f6b7-4170-a87d- 80754fecfbbe?project=552359020884

starting build "f0da5db4-4130-4784-9276-90236bc2e6c6"

FETCHSOURCE
BUILD
Starting Step #0 - "fetch"
Step #0 - "fetch": Pulling image: us.gcr.io/gae-runtimes/utilities/gcs-fetcher:base_20220302a_18_04_RC00
Step #0 - "fetch": base_20220302a_18_04_RC00: Pulling from gae-runtimes/utilities/gcs-fetcher
Step #0 - "fetch": 05867982f162: Pulling fs layer
Step #0 - "fetch": 05867982f162: Verifying Checksum
Step #0 - "fetch": 05867982f162: Download complete
Step #0 - "fetch": 05867982f162: Pull complete
Step #0 - "fetch": Digest: sha256:3534f59733f91a6b570e0fee8394f356100459ce1b9b25aa80fa0dae19fd2b4b
Step #0 - "fetch": Status: Downloaded newer image for us.gcr.io/gae-runtimes/utilities/gcs-fetcher:base_20220302a_18_04_RC00
Step #0 - "fetch": us.gcr.io/gae-runtimes/utilities/gcs-fetcher:base_20220302a_18_04_RC00
Step #0 - "fetch": Fetching manifest gs://staging.fitstack-343223.appspot.com/ae/b92b526e-7dcf-4786-9d01-988286bbd036/manifest.json.
Step #0 - "fetch": Processing 32 files.
Step #0 - "fetch": ******************************************************
Step #0 - "fetch": Status:                      SUCCESS
Step #0 - "fetch": Started:                     2022-03-16T01:27:57Z
Step #0 - "fetch": Completed:                   2022-03-16T01:27:57Z
Step #0 - "fetch": Requested workers:    200
Step #0 - "fetch": Actual workers:        32
Step #0 - "fetch": Total files:           32
Step #0 - "fetch": Total retries:          0
Step #0 - "fetch": GCS timeouts:           0
Step #0 - "fetch": MiB downloaded:         0.27 MiB
Step #0 - "fetch": MiB/s throughput:       2.30 MiB/s
Step #0 - "fetch": Time for manifest:     73.99 ms
Step #0 - "fetch": Total time:             0.20 s
Step #0 - "fetch": ******************************************************
Finished Step #0 - "fetch"
Starting Step #1 - "pre-buildpack"
Step #1 - "pre-buildpack": Pulling image: us.gcr.io/gae-runtimes/utilities/buildpack-shim:base_20220302a_18_04_RC00
Step #1 - "pre-buildpack": base_20220302a_18_04_RC00: Pulling from gae-runtimes/utilities/buildpack-shim
Step #1 - "pre-buildpack": 47d17572643b: Already exists
Step #1 - "pre-buildpack": b69d4a399026: Already exists
Step #1 - "pre-buildpack": 3c2cba919283: Already exists
Step #1 - "pre-buildpack": 5683da2e62ee: Already exists
Step #1 - "pre-buildpack": 5d61b34c58e5: Already exists
Step #1 - "pre-buildpack": 871c5c6098f7: Already exists
Step #1 - "pre-buildpack": 258748e39430: Already exists
Step #1 - "pre-buildpack": 9044308efa14: Already exists
Step #1 - "pre-buildpack": 3dcf4435d2c6: Already exists
Step #1 - "pre-buildpack": dc5b391f6f2a: Already exists
Step #1 - "pre-buildpack": 2c067104188b: Already exists
Step #1 - "pre-buildpack": e60795ed0a63: Pulling fs layer
Step #1 - "pre-buildpack": b8988709d36f: Pulling fs layer
Step #1 - "pre-buildpack": ab002007ac6d: Pulling fs layer
Step #1 - "pre-buildpack": b8988709d36f: Download complete
Step #1 - "pre-buildpack": ab002007ac6d: Download complete
Step #1 - "pre-buildpack": e60795ed0a63: Verifying Checksum
Step #1 - "pre-buildpack": e60795ed0a63: Download complete
Step #1 - "pre-buildpack": e60795ed0a63: Pull complete
Step #1 - "pre-buildpack": b8988709d36f: Pull complete
Step #1 - "pre-buildpack": ab002007ac6d: Pull complete
Step #1 - "pre-buildpack": Digest: sha256:275cba4037e38f32445232017e902e70e6b29251ddbf8e2fba1b95f3fe37a6cf
Step #1 - "pre-buildpack": Status: Downloaded newer image for us.gcr.io/gae-runtimes/utilities/buildpack-shim:base_20220302a_18_04_RC00
Step #1 - "pre-buildpack": us.gcr.io/gae-runtimes/utilities/buildpack-shim:base_20220302a_18_04_RC00
Step #1 - "pre-buildpack": Preparing directory /layers
Step #1 - "pre-buildpack": Preparing directory /workspace
Step #1 - "pre-buildpack": Preparing directory /builder/home
Step #1 - "pre-buildpack": Preparing directory /builder/outputs
Step #1 - "pre-buildpack": Preparing directory /platform/env
Step #1 - "pre-buildpack": Passing build environment variable BUILDER_OUTPUT to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GOOGLE_DEBUG to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GOOGLE_RUNTIME to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GOOGLE_LABEL_BUILDER_VERSION to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GOOGLE_LABEL_BUILDER_IMAGE to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GOOGLE_LABEL_RUN_IMAGE to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GAE_APP_ENGINE_APIS to buildpacks
Step #1 - "pre-buildpack": Passing build environment variable GOOGLE_EXPERIMENTAL_AR_AUTH_ENABLED to buildpacks
Step #1 - "pre-buildpack": Retagging us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest as us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:f0da5db4-4130-4784-9276-90236bc2e6c6
Step #1 - "pre-buildpack": Checking if image us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest exists
Step #1 - "pre-buildpack": Image us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest exists
Step #1 - "pre-buildpack": DEBUG: "us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest"(us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest) took 381.418627ms
Step #1 - "pre-buildpack": Checking if image us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest is valid
Step #1 - "pre-buildpack": DEBUG: ...pull("us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest") took 95.856602ms
Step #1 - "pre-buildpack": DEBUG: ...validate("us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest") took 204.495818ms
Step #1 - "pre-buildpack": Image us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest is valid
Step #1 - "pre-buildpack": DEBUG: "us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest"(us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest) took 300.520902ms
Step #1 - "pre-buildpack": Image us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest copied to us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:f0da5db4-4130-4784-9276-90236bc2e6c6
Step #1 - "pre-buildpack": DEBUG: "us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest", "us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:f0da5db4-4130-4784-9276-90236bc2e6c6"(us.gcr.io/fitstack-343223/app-engine-tmp/build-cache/default/ttl-7d:latest) took 634.021045ms
Finished Step #1 - "pre-buildpack"
Starting Step #2 - "build"
Step #2 - "build": Pulling image: us.gcr.io/gae-runtimes/buildpacks/go116/builder:go116_20220306_1_16_13_RC00
Step #2 - "build": go116_20220306_1_16_13_RC00: Pulling from gae-runtimes/buildpacks/go116/builder
Step #2 - "build": 47d17572643b: Already exists
Step #2 - "build": b69d4a399026: Already exists
Step #2 - "build": 3c2cba919283: Already exists
Step #2 - "build": 5683da2e62ee: Already exists
Step #2 - "build": 5d61b34c58e5: Already exists
Step #2 - "build": 871c5c6098f7: Already exists
Step #2 - "build": 258748e39430: Already exists
Step #2 - "build": 9044308efa14: Already exists
Step #2 - "build": 3dcf4435d2c6: Already exists
Step #2 - "build": dc5b391f6f2a: Already exists
Step #2 - "build": 2c067104188b: Already exists
Step #2 - "build": 0f543a8b6413: Pulling fs layer
Step #2 - "build": 6b10d361d16a: Pulling fs layer
Step #2 - "build": 11c1bcc7b79a: Pulling fs layer
Step #2 - "build": d41faa8feb5c: Pulling fs layer
Step #2 - "build": 49ef2925f143: Pulling fs layer
Step #2 - "build": 9ebd49cad864: Pulling fs layer
Step #2 - "build": 9f660d20a3a2: Pulling fs layer
Step #2 - "build": e8c7adea3b75: Pulling fs layer
Step #2 - "build": 06f428a8446f: Pulling fs layer
Step #2 - "build": dcaad5a887e8: Pulling fs layer
Step #2 - "build": bfddb12fd793: Pulling fs layer
Step #2 - "build": 2dc944e4043e: Pulling fs layer
Step #2 - "build": 674804e5a494: Pulling fs layer
Step #2 - "build": fe55734633e1: Pulling fs layer
Step #2 - "build": d1ced7a31646: Pulling fs layer
Step #2 - "build": 8d51793b1c23: Pulling fs layer
Step #2 - "build": d32271d57ef0: Pulling fs layer
Step #2 - "build": 50e8b9c0dddc: Pulling fs layer
Step #2 - "build": 4f4fb700ef54: Pulling fs layer
Step #2 - "build": d41faa8feb5c: Waiting
Step #2 - "build": 49ef2925f143: Waiting
Step #2 - "build": 674804e5a494: Waiting
Step #2 - "build": 9ebd49cad864: Waiting
Step #2 - "build": fe55734633e1: Waiting
Step #2 - "build": 9f660d20a3a2: Waiting
Step #2 - "build": e8c7adea3b75: Waiting
Step #2 - "build": d1ced7a31646: Waiting
Step #2 - "build": 06f428a8446f: Waiting
Step #2 - "build": 8d51793b1c23: Waiting
Step #2 - "build": dcaad5a887e8: Waiting
Step #2 - "build": d32271d57ef0: Waiting
Step #2 - "build": bfddb12fd793: Waiting
Step #2 - "build": 2dc944e4043e: Waiting
Step #2 - "build": 50e8b9c0dddc: Waiting
Step #2 - "build": 4f4fb700ef54: Waiting
Step #2 - "build": 6b10d361d16a: Verifying Checksum
Step #2 - "build": 6b10d361d16a: Download complete
Step #2 - "build": 0f543a8b6413: Verifying Checksum
Step #2 - "build": 0f543a8b6413: Download complete
Step #2 - "build": d41faa8feb5c: Verifying Checksum
Step #2 - "build": d41faa8feb5c: Download complete
Step #2 - "build": 49ef2925f143: Download complete
Step #2 - "build": 0f543a8b6413: Pull complete
Step #2 - "build": 9ebd49cad864: Verifying Checksum
Step #2 - "build": 9ebd49cad864: Download complete
Step #2 - "build": 9f660d20a3a2: Verifying Checksum
Step #2 - "build": 9f660d20a3a2: Download complete
Step #2 - "build": e8c7adea3b75: Verifying Checksum
Step #2 - "build": e8c7adea3b75: Download complete
Step #2 - "build": 06f428a8446f: Verifying Checksum
Step #2 - "build": 06f428a8446f: Download complete
Step #2 - "build": 6b10d361d16a: Pull complete
Step #2 - "build": bfddb12fd793: Verifying Checksum
Step #2 - "build": bfddb12fd793: Download complete
Step #2 - "build": dcaad5a887e8: Verifying Checksum
Step #2 - "build": dcaad5a887e8: Download complete
Step #2 - "build": 2dc944e4043e: Verifying Checksum
Step #2 - "build": 2dc944e4043e: Download complete
Step #2 - "build": 674804e5a494: Verifying Checksum
Step #2 - "build": 674804e5a494: Download complete
Step #2 - "build": fe55734633e1: Verifying Checksum
Step #2 - "build": fe55734633e1: Download complete
Step #2 - "build": d1ced7a31646: Verifying Checksum
Step #2 - "build": d1ced7a31646: Download complete
Step #2 - "build": d32271d57ef0: Verifying Checksum
Step #2 - "build": d32271d57ef0: Download complete
Step #2 - "build": 8d51793b1c23: Verifying Checksum
Step #2 - "build": 8d51793b1c23: Download complete
Step #2 - "build": 4f4fb700ef54: Verifying Checksum
Step #2 - "build": 4f4fb700ef54: Download complete
Step #2 - "build": 50e8b9c0dddc: Verifying Checksum
Step #2 - "build": 50e8b9c0dddc: Download complete
Step #2 - "build": 11c1bcc7b79a: Verifying Checksum
Step #2 - "build": 11c1bcc7b79a: Download complete
Step #2 - "build": 11c1bcc7b79a: Pull complete
Step #2 - "build": d41faa8feb5c: Pull complete
Step #2 - "build": 49ef2925f143: Pull complete
Step #2 - "build": 9ebd49cad864: Pull complete
Step #2 - "build": 9f660d20a3a2: Pull complete
Step #2 - "build": e8c7adea3b75: Pull complete
Step #2 - "build": 06f428a8446f: Pull complete
Step #2 - "build": dcaad5a887e8: Pull complete
Step #2 - "build": bfddb12fd793: Pull complete
Step #2 - "build": 2dc944e4043e: Pull complete
Step #2 - "build": 674804e5a494: Pull complete
Step #2 - "build": fe55734633e1: Pull complete
Step #2 - "build": d1ced7a31646: Pull complete
Step #2 - "build": 8d51793b1c23: Pull complete
Step #2 - "build": d32271d57ef0: Pull complete
Step #2 - "build": 50e8b9c0dddc: Pull complete
Step #2 - "build": 4f4fb700ef54: Pull complete
Step #2 - "build": Digest: sha256:874ed274d98a67c23a1102811baac2313a3db7b0e1d60f2bdc34c9e2615e45a7
Step #2 - "build": Status: Downloaded newer image for us.gcr.io/gae-runtimes/buildpacks/go116/builder:go116_20220306_1_16_13_RC00
Step #2 - "build": us.gcr.io/gae-runtimes/buildpacks/go116/builder:go116_20220306_1_16_13_RC00
Step #2 - "build": ===> DETECTING
Step #2 - "build": google.go.appengine_gomod 0.9.0
Step #2 - "build": google.go.gomod           0.9.0
Step #2 - "build": google.go.build           0.9.0
Step #2 - "build": google.go.appengine       0.9.0
Step #2 - "build": google.utils.label        0.0.2
Step #2 - "build": ===> ANALYZING
Step #2 - "build": Previous image with name "us.gcr.io/fitstack-343223/app-engine-tmp/app/default/ttl-18h:b92b526e-7dcf-4786-9d01-988286bbd036" not found
Step #2 - "build": Restoring metadata for "google.go.gomod:gopath" from cache
Step #2 - "build": ===> RESTORING
Step #2 - "build": Restoring data for "google.go.gomod:gopath" from cache
Step #2 - "build": ===> BUILDING
Step #2 - "build": === App Engine Gomod (google.go.appengine_gomod@0.9.0) ===
Step #2 - "build": --------------------------------------------------------------------------------
Step #2 - "build": Running "cp --dereference -R . /layers/google.go.appengine_gomod/srv"
Step #2 - "build": Done "cp --dereference -R . /layers/google.go.appengine_gomod/srv" (62.041821ms)
Step #2 - "build": === Go - Gomod (google.go.gomod@0.9.0) ===
Step #2 - "build": DEBUG: go.mod SHA has changed: clearing GOPATH layer's cache
Step #2 - "build": Failure: (ID: 4516fb13) removing /layers/google.go.gomod/gopath: unlinkat /layers/google.go.gomod/gopath/pkg/mod/gonum.org/v1/gonum@v0.9.3/internal/math32/signbit.go: permission denied
Step #2 - "build": --------------------------------------------------------------------------------
Step #2 - "build": Running "mv -f /builder/outputs/output-5577006791947779410 /builder/outputs/output"
Step #2 - "build": Done "mv -f /builder/outputs/output-5577006791947779410 /builder/o..." (35.537571ms)
Step #2 - "build": ERROR: failed to build: exit status 1
Finished Step #2 - "build"
ERROR
ERROR: build step 2 "us.gcr.io/gae-runtimes/buildpacks/go116/builder:go116_20220306_1_16_13_RC00" failed: step exited with non-zero status: 145

here is my go mod

module github.com/voodoostack/fitstackapi

go 1.17

require golang.org/x/crypto v0.0.0-20220214200702-86341886e292

require (
    github.com/99designs/gqlgen v0.17.1
    github.com/georgysavva/scany v0.3.0
    github.com/go-chi/chi v1.5.4
    github.com/golang-migrate/migrate/v4 v4.15.1
    github.com/jackc/pgx/v4 v4.15.0
    github.com/joho/godotenv v1.4.0
    github.com/lestrrat-go/jwx v1.2.20
    github.com/stretchr/testify v1.7.0
    github.com/vektah/gqlparser/v2 v2.4.0
)

require (
    github.com/agnivade/levenshtein v1.1.0 // indirect
    github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
    github.com/davecgh/go-spew v1.1.1 // indirect
    github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d // indirect
    github.com/goccy/go-json v0.9.4 // indirect
    github.com/gorilla/websocket v1.4.2 // indirect
    github.com/hashicorp/errwrap v1.0.0 // indirect
    github.com/hashicorp/go-multierror v1.1.0 // indirect
    github.com/hashicorp/golang-lru v0.5.1 // indirect
    github.com/jackc/chunkreader/v2 v2.0.1 // indirect
    github.com/jackc/pgconn v1.11.0 // indirect
    github.com/jackc/pgio v1.0.0 // indirect
    github.com/jackc/pgpassfile v1.0.0 // indirect
    github.com/jackc/pgproto3/v2 v2.2.0 // indirect
    github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
    github.com/jackc/pgtype v1.10.0 // indirect
    github.com/jackc/puddle v1.2.1 // indirect
    github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
    github.com/lestrrat-go/blackmagic v1.0.0 // indirect
    github.com/lestrrat-go/httpcc v1.0.0 // indirect
    github.com/lestrrat-go/iter v1.0.1 // indirect
    github.com/lestrrat-go/option v1.0.0 // indirect
    github.com/lib/pq v1.10.2 // indirect
    github.com/matryer/moq v0.2.3 // indirect
    github.com/mitchellh/mapstructure v1.2.3 // indirect
    github.com/pkg/errors v0.9.1 // indirect
    github.com/pmezard/go-difflib v1.0.0 // indirect
    github.com/russross/blackfriday/v2 v2.1.0 // indirect
    github.com/stretchr/objx v0.2.0 // indirect
    github.com/urfave/cli/v2 v2.3.0 // indirect
    go.uber.org/atomic v1.6.0 // indirect
    golang.org/x/mod v0.5.1 // indirect
    golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
    golang.org/x/text v0.3.7 // indirect
    golang.org/x/tools v0.1.9 // indirect
    golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
    gopkg.in/yaml.v2 v2.4.0 // indirect
    gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)

and finally my app.yaml

runtime: go117
env: standard
instance_class: F1
handlers:
  - url: /.*
    script: auto
  - url: .*
    script: auto
env_variables:
  DATABASE_URL: none
automatic_scaling:
  min_idle_instances: automatic
  max_idle_instances: automatic
  min_pending_latency: automatic
  max_pending_latency: automatic
network: {}
service_account: fitstack-343223@appspot.gserviceaccount.com

Google cloud with the appengine doesn’t support go 1.17 yet, only go 1.16 max at the moment

Not the answer you’re looking for? Browse other questions tagged go or ask your own question.