Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ERR_PNPM_OUTDATED_LOCKFILE while attempting to deploy this example #12

Closed
michaelnguyenm opened this issue Apr 1, 2024 · 6 comments

Comments

@michaelnguyenm
Copy link

Not sure if related to #11 but I did try the newest commit. But since this error seems to be different from before and I also tried the commit titled "Fix remeda import", and got the same error, I assume it's related to something else so I opted to create another issue.

I believe I should be using the same lock file that is already included and I'm using the specified version of pnpm set by corepack (8.12.1), so I'm not exactly sure why I'm getting a pnpm related error (though the newest pnpm version is 8.15.5).

I am also using a brand new project (no functions deployed) so I don't have a previously working deployment using this sample repo.

Based on the attached log, I could just find some information about some people having trouble with transitioning between pnpm 7 and 8 pnpm/pnpm#6312 but I don't think that might be the case here since I'm just using all pnpm 8 here. So I'm not exactly sure if there are any other issues to consider.

api > npx firebase deploy --debug
[2024-04-01T15:20:29.167Z] Object ".functions" in "firebase.json" has unknown property: {"additionalProperty":"isolate"}
[2024-04-01T15:20:29.168Z] Field ".functions" in "firebase.json" is possibly invalid: should be array
[2024-04-01T15:20:29.168Z] Field ".functions" in "firebase.json" is possibly invalid: should match some schema in anyOf
[2024-04-01T15:20:29.172Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2024-04-01T15:20:29.173Z] > authorizing via signed-in user (m@mail.com)
[2024-04-01T15:20:29.173Z] [iam] checking project some-project-id for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[2024-04-01T15:20:29.175Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions [none]
[2024-04-01T15:20:29.176Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:29.176Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]}
[2024-04-01T15:20:29.333Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions 200
[2024-04-01T15:20:29.334Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]}
[2024-04-01T15:20:29.334Z] >>> [apiv2][query] POST https://iam.googleapis.com/v1/projects/some-project-id/serviceAccounts/some-project-id@appspot.gserviceaccount.com:testIamPermissions [none]
[2024-04-01T15:20:29.334Z] >>> [apiv2][body] POST https://iam.googleapis.com/v1/projects/some-project-id/serviceAccounts/some-project-id@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[2024-04-01T15:20:29.454Z] <<< [apiv2][status] POST https://iam.googleapis.com/v1/projects/some-project-id/serviceAccounts/some-project-id@appspot.gserviceaccount.com:testIamPermissions 200
[2024-04-01T15:20:29.454Z] <<< [apiv2][body] POST https://iam.googleapis.com/v1/projects/some-project-id/serviceAccounts/some-project-id@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}

=== Deploying to 'some-project-id'...

i  deploying functions
Running command: turbo build
• Packages in scope: @repo/api
• Running build in 1 packages
• Remote caching disabled    
@repo/backend:build: cache hit (outputs already on disk), replaying logs 458f0911af1fc863
@repo/backend:build: 
@repo/backend:build: > @repo/backend@0.0.0 build C:\Users\mega\github\mono-ts\packages\backend 
@repo/backend:build: > run-p bundle type:gen
@repo/backend:build: 
@repo/backend:build: 
@repo/backend:build: > @repo/backend@0.0.0 bundle C:\Users\mega\github\mono-ts\packages\backend
@repo/backend:build: > tsup-node
@repo/backend:build: 
@repo/backend:build: 
@repo/backend:build: > @repo/backend@0.0.0 type:gen C:\Users\mega\github\mono-ts\packages\backend
@repo/backend:build: > tsc --emitDeclarationOnly
@repo/backend:build: 
@repo/backend:build: CLI Building entry: {"utils/index":"src/utils/index.ts","firebase":"src/firebase.ts"}
@repo/backend:build: CLI Using tsconfig: tsconfig.json
@repo/backend:build: CLI tsup v8.0.2
@repo/backend:build: CLI Using tsup config: C:\Users\mega\github\mono-ts\packages\backend\tsup.config.ts
@repo/backend:build: CLI Target: es2022
@repo/backend:build: ESM Build start
@repo/backend:build: ESM dist\utils\index.js     923.00 B
@repo/backend:build: ESM dist\firebase.js        822.00 B
@repo/backend:build: ESM dist\firebase.js.map    1.46 KB
@repo/backend:build: ESM dist\utils\index.js.map 1.84 KB
@repo/backend:build: ESM ⚡️ Build success in 26ms
@repo/api:build: cache hit (outputs already on disk), replaying logs d05108c11031fbdf
@repo/api:build: 
@repo/api:build: > @repo/api@0.0.0 build C:\Users\mega\github\mono-ts\services\api
@repo/api:build: > tsup-node
@repo/api:build: 
@repo/api:build: CLI Building entry: src/index.ts
@repo/api:build: CLI Using tsconfig: tsconfig.json
@repo/api:build: CLI tsup v8.0.2
@repo/api:build: CLI Using tsup config: C:\Users\mega\github\mono-ts\services\api\tsup.config.ts
@repo/api:build: CLI Target: node18
@repo/api:build: CLI Cleaning output folder
@repo/api:build: ESM Build start
@repo/api:build: ESM dist\index.js     3.73 KB
@repo/api:build: ESM dist\index.js.map 8.42 KB
@repo/api:build: ESM ⚡️ Build success in 69ms

 Tasks:    2 successful, 2 total
Cached:    2 cached, 2 total
  Time:    296ms >>> FULL TURBO

+  functions: Finished running predeploy script. 
[2024-04-01T15:20:30.294Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id [none]
[2024-04-01T15:20:30.519Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id 200
[2024-04-01T15:20:30.519Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id {"projectId":"some-project-id","projectNumber":"587075144678","displayName":"izumo-dev","name":"projects/some-project-id","resources":{"hostingSite":"some-project-id"},"state":"ACTIVE","etag":"1_2d472ddb-a3d3-4aaa-b931-2d364c78d796"}
i  functions: preparing codebase api for deployment
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
[2024-04-01T15:20:30.521Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudfunctions.googleapis.com [none]
[2024-04-01T15:20:30.522Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudfunctions.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:30.523Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/runtimeconfig.googleapis.com [none]
[2024-04-01T15:20:30.523Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/runtimeconfig.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:30.524Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudbuild.googleapis.com [none]
[2024-04-01T15:20:30.524Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudbuild.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:30.525Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/artifactregistry.googleapis.com [none]
[2024-04-01T15:20:30.525Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/artifactregistry.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:30.776Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/artifactregistry.googleapis.com 200
[2024-04-01T15:20:30.776Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/artifactregistry.googleapis.com [omitted]
+  artifactregistry: required API artifactregistry.googleapis.com is enabled
[2024-04-01T15:20:30.784Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/runtimeconfig.googleapis.com 200
[2024-04-01T15:20:30.784Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/runtimeconfig.googleapis.com [omitted]
[2024-04-01T15:20:30.788Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudbuild.googleapis.com 200
[2024-04-01T15:20:30.788Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudbuild.googleapis.com [omitted]
+  functions: required API cloudbuild.googleapis.com is enabled
[2024-04-01T15:20:30.793Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudfunctions.googleapis.com 200
[2024-04-01T15:20:30.793Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/cloudfunctions.googleapis.com [omitted]
+  functions: required API cloudfunctions.googleapis.com is enabled
[2024-04-01T15:20:30.794Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id/adminSdkConfig [none]
[2024-04-01T15:20:31.088Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id/adminSdkConfig 200
[2024-04-01T15:20:31.088Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id/adminSdkConfig {"projectId":"some-project-id","storageBucket":"some-project-id.appspot.com"}
[2024-04-01T15:20:31.089Z] >>> [apiv2][query] GET https://runtimeconfig.googleapis.com/v1beta1/projects/some-project-id/configs [none]
[2024-04-01T15:20:31.224Z] <<< [apiv2][status] GET https://runtimeconfig.googleapis.com/v1beta1/projects/some-project-id/configs 200
[2024-04-01T15:20:31.225Z] <<< [apiv2][body] GET https://runtimeconfig.googleapis.com/v1beta1/projects/some-project-id/configs {}
[2024-04-01T15:20:31.226Z] Validating nodejs source
[2024-04-01T15:20:32.611Z] > [functions] package.json contents: {
  "name": "@repo/api",
  "version": "0.0.0",
  "type": "module",
  "main": "./dist/index.js",
  "module": "./dist/index.js",
  "files": [
    "dist",
    ".env.*"
  ],
  "scripts": {
    "type:check": "tsc --noEmit",
    "build": "tsup-node",
    "build:watch": "tsup-node --watch",
    "emulate": "firebase emulators:start --project demo-mono-ts --only functions",
    "dev": "run-p build:watch emulate",
    "lint": "eslint . --max-warnings 0",
    "deploy": "firebase deploy --project demo-mono-ts --only functions"
  },
  "license": "MIT",
  "dependencies": {
    "@google-cloud/functions-framework": "^3.3.0",
    "@repo/backend": "workspace:*",
    "@repo/common": "workspace:*",
    "body-parser": "^1.20.2",
    "compression": "^1.7.4",
    "cors": "^2.8.5",
    "express": "^4.19.2",
    "firebase-admin": "^12.0.0",
    "firebase-functions": "^4.8.2",
    "firestore-server-utils": "1.0.0-4",
    "nocache": "^4.0.0",
    "remeda": "^1.56.0",
    "zod": "^3.22.4"
  },
  "devDependencies": {
    "@repo/eslint-config": "workspace:*",
    "@repo/typescript-config": "workspace:*",
    "@types/body-parser": "^1.19.5",
    "@types/compression": "^1.7.5",
    "@types/cors": "^2.8.17",
    "@types/express": "^4.17.21",
    "@types/node": "^20.12.2",
    "firebase-tools-with-isolate": "13.6.4",
    "npm-run-all": "^4.1.5",
    "tsup": "^8.0.2",
    "typescript": "^5.4.3",
    "vitest": "^1.4.0"
  }
}
[2024-04-01T15:20:32.615Z] Building nodejs source
i  functions: Loading and analyzing source code for codebase api to determine what to deploy
[2024-04-01T15:20:32.616Z] Could not find functions.yaml. Must use http discovery
[2024-04-01T15:20:32.624Z] Found firebase-functions binary at 'C:\Users\mega\github\mono-ts\services\api\node_modules\.bin\firebase-functions'
Serving at port 8216

[2024-04-01T15:20:33.748Z] Got response from /__/functions.yaml {"endpoints":{"api":{"availableMemoryMb":null,"timeoutSeconds":null,"minInstances":null,"maxInstances":null,"ingressSettings":null,"concurrency":null,"serviceAccountEmail":null,"vpc":null,"platform":"gcfv2","region":["europe-west3"],"secretEnvironmentVariables":[{"key":"DEMO_API_KEY"}],"labels":{},"httpsTrigger":{},"entryPoint":"api"}},"specVersion":"v1alpha1","requiredAPIs":[],"params":[{"type":"secret","name":"DEMO_API_KEY"}]}
i  functions: Loaded environment variables from .env. 
[2024-04-01T15:20:33.769Z] >>> [apiv2][query] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY [none]
[2024-04-01T15:20:33.942Z] <<< [apiv2][status] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY 200
[2024-04-01T15:20:33.942Z] <<< [apiv2][body] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY {"name":"projects/587075144678/secrets/DEMO_API_KEY","replication":{"automatic":{}},"createTime":"2024-04-01T05:29:16.175515Z","labels":{"firebase-managed":"true"},"etag":"\"161502453f909b\""}
[2024-04-01T15:20:33.943Z] >>> [apiv2][query] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY/versions/latest [none]
i  functions: preparing . directory for uploading...
i  functions: Start isolating the source folder...
debug Using isolate-package version 1.13.2
debug Found tsconfig at: ./tsconfig.json
debug Workspace root resolved to C:\Users\mega\github\mono-ts
debug Isolate target package (root)/\services\api
debug Isolate output directory (root)/\services\api\isolate
[2024-04-01T15:20:34.782Z] <<< [apiv2][status] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY/versions/latest 200
[2024-04-01T15:20:34.782Z] <<< [apiv2][body] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY/versions/latest {"name":"projects/587075144678/secrets/DEMO_API_KEY/versions/1","createTime":"2024-04-01T05:29:16.523081Z","state":"ENABLED","replicationStatus":{"automatic":{}},"etag":"\"1615024544de49\""}
debug Cleaned the existing isolate output directory
debug Detected package manager pnpm 8.12.1
debug Detected pnpm packages globs: [ 'apps/*', 'packages/*', 'services/*' ]
debug Registering package ./apps\web
debug Registering package ./packages\typescript-config
debug Registering package ./packages\eslint-config
debug Registering package ./packages\common
debug Registering package ./packages\backend
debug Registering package ./services\fns
debug Registering package ./services\api
debug Using PNPM pack instead of NPM pack
debug Packed (temp)/repo-backend-0.0.0.tgz
debug Packed (temp)/repo-common-0.0.0.tgz
debug Unpacking (temp)/repo-backend-0.0.0.tgz
debug Unpacking (temp)/repo-common-0.0.0.tgz
debug Moved package files to (isolate)/\packages\common
debug Moved package files to (isolate)/\packages\backend
debug Packed (temp)/repo-api-0.0.0.tgz
info Generating PNPM lockfile...
debug Relevant importer ids: [ 'services/api', 'packages\\backend', 'packages\\common' ]
debug Setting target package importer on root
debug Pruning the lockfile
debug Created lockfile at C:\Users\mega\github\mono-ts\services\api\isolate\pnpm-lock.yaml
debug Deleting temp directory (root)/\services\api\isolate\__tmp
info Isolate completed at C:\Users\mega\github\mono-ts\services\api\isolate
i  functions: Finished isolation at C:\Users\mega\github\mono-ts\services\api\isolate
i  functions: packaged C:\Users\mega\github\mono-ts\services\api\isolate (47.26 KB) for uploading 
[2024-04-01T15:20:40.781Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v1/projects/some-project-id/locations/-/functions [none]
[2024-04-01T15:20:41.357Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v1/projects/some-project-id/locations/-/functions 200
[2024-04-01T15:20:41.357Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v1/projects/some-project-id/locations/-/functions {}
[2024-04-01T15:20:41.358Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/-/functions filter=environment%3D%22GEN_2%22
[2024-04-01T15:20:41.870Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/-/functions 200
[2024-04-01T15:20:41.870Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/-/functions {}
i  functions: ensuring required API run.googleapis.com is enabled...
i  functions: ensuring required API eventarc.googleapis.com is enabled...
i  functions: ensuring required API pubsub.googleapis.com is enabled...
i  functions: ensuring required API storage.googleapis.com is enabled...
[2024-04-01T15:20:41.873Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/run.googleapis.com [none]
[2024-04-01T15:20:41.873Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/run.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:41.874Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/eventarc.googleapis.com [none]
[2024-04-01T15:20:41.874Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/eventarc.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:41.875Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/pubsub.googleapis.com [none]
[2024-04-01T15:20:41.875Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/pubsub.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:41.876Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/storage.googleapis.com [none]
[2024-04-01T15:20:41.876Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/storage.googleapis.com x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:42.115Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/eventarc.googleapis.com 200
[2024-04-01T15:20:42.115Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/eventarc.googleapis.com [omitted]
+  functions: required API eventarc.googleapis.com is enabled
[2024-04-01T15:20:42.117Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/pubsub.googleapis.com 200
[2024-04-01T15:20:42.117Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/pubsub.googleapis.com [omitted]
+  functions: required API pubsub.googleapis.com is enabled
[2024-04-01T15:20:42.129Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/run.googleapis.com 200
[2024-04-01T15:20:42.129Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/run.googleapis.com [omitted]
+  functions: required API run.googleapis.com is enabled
[2024-04-01T15:20:42.141Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/storage.googleapis.com 200
[2024-04-01T15:20:42.141Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/some-project-id/services/storage.googleapis.com [omitted]
+  functions: required API storage.googleapis.com is enabled
i  functions: generating the service identity for pubsub.googleapis.com...
i  functions: generating the service identity for eventarc.googleapis.com...
[2024-04-01T15:20:42.142Z] >>> [apiv2][query] POST https://serviceusage.googleapis.com/v1beta1/projects/587075144678/services/pubsub.googleapis.com:generateServiceIdentity [none]
[2024-04-01T15:20:42.143Z] >>> [apiv2][query] POST https://serviceusage.googleapis.com/v1beta1/projects/587075144678/services/eventarc.googleapis.com:generateServiceIdentity [none]
[2024-04-01T15:20:42.443Z] <<< [apiv2][status] POST https://serviceusage.googleapis.com/v1beta1/projects/587075144678/services/pubsub.googleapis.com:generateServiceIdentity 200
[2024-04-01T15:20:42.443Z] <<< [apiv2][body] POST https://serviceusage.googleapis.com/v1beta1/projects/587075144678/services/pubsub.googleapis.com:generateServiceIdentity {"name":"operations/finished.DONE_OPERATION","done":true,"response":{"@type":"type.googleapis.com/google.api.serviceusage.v1beta1.ServiceIdentity","email":"service-587075144678@gcp-sa-pubsub.iam.gserviceaccount.com","uniqueId":"108631385510699709457"}}
[2024-04-01T15:20:42.580Z] <<< [apiv2][status] POST https://serviceusage.googleapis.com/v1beta1/projects/587075144678/services/eventarc.googleapis.com:generateServiceIdentity 200
[2024-04-01T15:20:42.580Z] <<< [apiv2][body] POST https://serviceusage.googleapis.com/v1beta1/projects/587075144678/services/eventarc.googleapis.com:generateServiceIdentity {"name":"operations/finished.DONE_OPERATION","done":true,"response":{"@type":"type.googleapis.com/google.api.serviceusage.v1beta1.ServiceIdentity","email":"service-587075144678@gcp-sa-eventarc.iam.gserviceaccount.com","uniqueId":"110202057313630454318"}}
[2024-04-01T15:20:42.581Z] >>> [apiv2][query] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY/versions/latest [none]
[2024-04-01T15:20:42.821Z] <<< [apiv2][status] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY/versions/latest 200
[2024-04-01T15:20:42.821Z] <<< [apiv2][body] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY/versions/latest {"name":"projects/587075144678/secrets/DEMO_API_KEY/versions/1","createTime":"2024-04-01T05:29:16.523081Z","state":"ENABLED","replicationStatus":{"automatic":{}},"etag":"\"1615024544de49\""}
[2024-04-01T15:20:42.822Z] Resolved secret version of DEMO_API_KEY to 1.
[2024-04-01T15:20:42.822Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id [none]
[2024-04-01T15:20:43.023Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id 200
[2024-04-01T15:20:43.024Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/some-project-id {"projectId":"some-project-id","projectNumber":"587075144678","displayName":"izumo-dev","name":"projects/some-project-id","resources":{"hostingSite":"some-project-id"},"state":"ACTIVE","etag":"1_2d472ddb-a3d3-4aaa-b931-2d364c78d796"}
i  functions: ensuring 587075144678-compute@developer.gserviceaccount.com access to secret DEMO_API_KEY.
[2024-04-01T15:20:43.025Z] >>> [apiv2][query] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY:getIamPolicy [none]
[2024-04-01T15:20:43.323Z] <<< [apiv2][status] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY:getIamPolicy 200
[2024-04-01T15:20:43.324Z] <<< [apiv2][body] GET https://secretmanager.googleapis.com/v1/projects/some-project-id/secrets/DEMO_API_KEY:getIamPolicy {"version":1,"etag":"BwYVAk98m9A=","bindings":[{"role":"roles/secretmanager.secretAccessor","members":["serviceAccount:587075144678-compute@developer.gserviceaccount.com"]}]}
+  functions: ensured 587075144678-compute@developer.gserviceaccount.com access to DEMO_API_KEY.
[2024-04-01T15:20:43.325Z] [functions] found 1 new HTTP functions, testing setIamPolicy permission...
[2024-04-01T15:20:43.325Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions [none]
[2024-04-01T15:20:43.325Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions x-goog-quota-user=projects/some-project-id
[2024-04-01T15:20:43.325Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions {"permissions":["cloudfunctions.functions.setIamPolicy"]}
[2024-04-01T15:20:43.461Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions 200
[2024-04-01T15:20:43.462Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/some-project-id:testIamPermissions {"permissions":["cloudfunctions.functions.setIamPolicy"]}
[2024-04-01T15:20:43.462Z] [functions] found setIamPolicy permission, proceeding with deploy
[2024-04-01T15:20:43.463Z] >>> [apiv2][query] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions:generateUploadUrl [none]
[2024-04-01T15:20:44.317Z] <<< [apiv2][status] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions:generateUploadUrl 200
[2024-04-01T15:20:44.317Z] <<< [apiv2][body] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions:generateUploadUrl {"uploadUrl":"https://storage.googleapis.com/gcf-v2-uploads-587075144678-europe-west3/8cae9160-4d89-4c10-ad8b-3d06603720e4.zip?GoogleAccessId=service-587075144678@gcf-admin-robot.iam.gserviceaccount.com&Expires=1711986645&Signature=R1P5FKZmt%2FHKUosQ7VVfaY8rDV7biWJieMEfRCAZWgooQSeZNIDMfWLOUKqX3x8IbZTqyeTkV8OeE8H1ssIdcim1Xm5lPBw2Ie%2BT6LhZcDFvR3d7Kr70%2BNpSLWleFDEhejYWWFYToFQWNqGV3Pr%2FXi3PUE%2FTl5JmNqrtu6luEiknwqvai1%2BHPeZTbVPgQEY9CkNzZeHfNRoXvra1xEhsxlRDPsbAgBfThiJgR%2BJ%2Flz9wvjpKmtTz4%2B1nB5jHxQhGLeA7zsaoUpCMLMwr928SHsUIhuoPTKvagvKdc0gLJRIxxnSsWqv7GdMIJYhXfJaIvV1E%2FHEKbzPP%2Fqj1s4Phdg%3D%3D","storageSource":{"bucket":"gcf-v2-uploads-587075144678-europe-west3","object":"8cae9160-4d89-4c10-ad8b-3d06603720e4.zip"}}
[2024-04-01T15:20:44.318Z] >>> [apiv2][query] PUT https://storage.googleapis.com/gcf-v2-uploads-587075144678-europe-west3/8cae9160-4d89-4c10-ad8b-3d06603720e4.zip GoogleAccessId=service-587075144678%40gcf-admin-robot.iam.gserviceaccount.com&Expires=1711986645&Signature=R1P5FKZmt%2FHKUosQ7VVfaY8rDV7biWJieMEfRCAZWgooQSeZNIDMfWLOUKqX3x8IbZTqyeTkV8OeE8H1ssIdcim1Xm5lPBw2Ie%2BT6LhZcDFvR3d7Kr70%2BNpSLWleFDEhejYWWFYToFQWNqGV3Pr%2FXi3PUE%2FTl5JmNqrtu6luEiknwqvai1%2BHPeZTbVPgQEY9CkNzZeHfNRoXvra1xEhsxlRDPsbAgBfThiJgR%2BJ%2Flz9wvjpKmtTz4%2B1nB5jHxQhGLeA7zsaoUpCMLMwr928SHsUIhuoPTKvagvKdc0gLJRIxxnSsWqv7GdMIJYhXfJaIvV1E%2FHEKbzPP%2Fqj1s4Phdg%3D%3D
[2024-04-01T15:20:44.318Z] >>> [apiv2][body] PUT https://storage.googleapis.com/gcf-v2-uploads-587075144678-europe-west3/8cae9160-4d89-4c10-ad8b-3d06603720e4.zip [stream]
[2024-04-01T15:20:45.300Z] <<< [apiv2][status] PUT https://storage.googleapis.com/gcf-v2-uploads-587075144678-europe-west3/8cae9160-4d89-4c10-ad8b-3d06603720e4.zip 200
[2024-04-01T15:20:45.301Z] <<< [apiv2][body] PUT https://storage.googleapis.com/gcf-v2-uploads-587075144678-europe-west3/8cae9160-4d89-4c10-ad8b-3d06603720e4.zip [omitted]
+  functions: . folder uploaded successfully
i  functions: creating Node.js 20 (2nd Gen) function api:api(europe-west3)...
[2024-04-01T15:20:45.304Z] >>> [apiv2][query] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions functionId=api
[2024-04-01T15:20:45.304Z] >>> [apiv2][body] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions {"name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-uploads-587075144678-europe-west3","object":"8cae9160-4d89-4c10-ad8b-3d06603720e4.zip"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"secretEnvironmentVariables":[{"key":"DEMO_API_KEY","secret":"DEMO_API_KEY","projectId":"some-project-id","version":"1"}],"ingressSettings":null,"timeoutSeconds":null,"serviceAccountEmail":null,"availableMemory":"256Mi","minInstanceCount":null,"maxInstanceCount":null,"maxInstanceRequestConcurrency":80,"availableCpu":"1","vpcConnector":null,"vpcConnectorEgressSettings":null},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"}}
[2024-04-01T15:20:46.515Z] <<< [apiv2][status] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions 200
[2024-04-01T15:20:46.516Z] <<< [apiv2][body] POST https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/functions {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2"},"done":false}
[2024-04-01T15:20:46.517Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:20:47.249Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:20:47.249Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"BUILD","state":"NOT_STARTED"},{"name":"SERVICE","state":"NOT_STARTED"}],"operationType":"CREATE_FUNCTION"},"done":false}
[2024-04-01T15:20:47.766Z] [create-api-europe-west3-api] Retrying task index 0
[2024-04-01T15:20:47.766Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:20:48.484Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:20:48.485Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"BUILD","state":"NOT_STARTED"},{"name":"SERVICE","state":"NOT_STARTED"}],"operationType":"CREATE_FUNCTION"},"done":false}
[2024-04-01T15:20:49.499Z] [create-api-europe-west3-api] Retrying task index 0
[2024-04-01T15:20:49.500Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:20:50.214Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:20:50.215Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"BUILD","message":"Build in progress","state":"IN_PROGRESS","resource":"projects/587075144678/locations/europe-west3/builds/060fabe5-e91c-4bb5-a0d6-ac5e9807178d","resourceUri":"https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678"},{"name":"SERVICE","state":"NOT_STARTED"}],"operationType":"CREATE_FUNCTION"},"done":false}
[2024-04-01T15:20:52.217Z] [create-api-europe-west3-api] Retrying task index 0
[2024-04-01T15:20:52.218Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:20:52.928Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:20:52.929Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"BUILD","message":"Build in progress","state":"IN_PROGRESS","resource":"projects/587075144678/locations/europe-west3/builds/060fabe5-e91c-4bb5-a0d6-ac5e9807178d","resourceUri":"https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678"},{"name":"SERVICE","state":"NOT_STARTED"}],"operationType":"CREATE_FUNCTION"},"done":false}
[2024-04-01T15:20:56.930Z] [create-api-europe-west3-api] Retrying task index 0
[2024-04-01T15:20:56.930Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:20:57.662Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:20:57.662Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"BUILD","message":"Build in progress","state":"IN_PROGRESS","resource":"projects/587075144678/locations/europe-west3/builds/060fabe5-e91c-4bb5-a0d6-ac5e9807178d","resourceUri":"https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678"},{"name":"SERVICE","state":"NOT_STARTED"}],"operationType":"CREATE_FUNCTION"},"done":false}
[2024-04-01T15:21:05.676Z] [create-api-europe-west3-api] Retrying task index 0
[2024-04-01T15:21:05.677Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:21:06.399Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:21:06.399Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"BUILD","message":"Build in progress","state":"IN_PROGRESS","resource":"projects/587075144678/locations/europe-west3/builds/060fabe5-e91c-4bb5-a0d6-ac5e9807178d","resourceUri":"https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678"},{"name":"SERVICE","state":"NOT_STARTED"}],"operationType":"CREATE_FUNCTION"},"done":false}
[2024-04-01T15:21:16.402Z] [create-api-europe-west3-api] Retrying task index 0
[2024-04-01T15:21:16.403Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b [none]
[2024-04-01T15:21:17.115Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b 200
[2024-04-01T15:21:17.115Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b {"name":"projects/some-project-id/locations/europe-west3/operations/operation-1711984847718-6150a88b587b5-070a912b-04ac934b","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2024-04-01T15:20:48.178994453Z","endTime":"2024-04-01T15:21:18.704568995Z","target":"projects/some-project-id/locations/europe-west3/functions/api","verb":"create","cancelRequested":false,"apiVersion":"v2","requestResource":{"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/some-project-id/locations/europe-west3/functions/api","buildConfig":{"runtime":"nodejs20","entryPoint":"api","source":{"storageSource":{"bucket":"gcf-v2-sources-587075144678-europe-west3","object":"api/function-source.zip","generation":"1711984847866154"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""}},"serviceConfig":{"service":"projects/some-project-id/locations/europe-west3/services/api","timeoutSeconds":60,"environmentVariables":{"FIRESTORE_EMULATOR_HOST":"localhost:8080","FIREBASE_CONFIG":"{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}","GCLOUD_PROJECT":"some-project-id","EVENTARC_CLOUD_EVENT_SOURCE":"projects/some-project-id/locations/europe-west3/services/api","FUNCTION_TARGET":"api"},"ingressSettings":"ALLOW_ALL","serviceAccountEmail":"587075144678-compute@developer.gserviceaccount.com","availableMemory":"256Mi","secretEnvironmentVariables":[{"key":"DEMO_API_KEY","projectId":"some-project-id","secret":"DEMO_API_KEY","version":"1"}],"maxInstanceRequestConcurrency":80,"availableCpu":"1"},"labels":{"deployment-tool":"cli-firebase","firebase-functions-codebase":"api","firebase-functions-hash":"7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"},"environment":"GEN_2"},"stages":[{"name":"ARTIFACT_REGISTRY","message":"Deleting function artifacts in Artifact Registry","state":"COMPLETE"},{"name":"SERVICE","message":"Deleting Cloud Run service","state":"COMPLETE","resource":"projects/some-project-id/locations/europe-west3/services/api"}],"operationType":"CREATE_FUNCTION"},"done":true,"error":{"code":3,"message":"Build failed with status: FAILURE and message: installing pnpm dependencies: (error ID: 8622936f):\nScope: all 3 workspace projects\n ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with \"frozen-lockfile\" because pnpm-lock.yaml is not up to date with packages/common/package.json\n\nNote that in CI environments this setting is true by default. If you still need to run install in such cases, use \"pnpm install --no-frozen-lockfile\"\n\n   
 Failure reason:\n    specifiers in the lockfile ({}) don't match specs in package.json ({\"firebase\":\"^10.10.0\",\"remeda\":\"^1.56.0\"}). For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678."}}
[2024-04-01T15:21:17.117Z] Got source token undefined for region europe-west3
Build failed with status: FAILURE and message: installing pnpm dependencies: (error ID: 8622936f):
Scope: all 3 workspace projects
 ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with packages/common/package.json

Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

    Failure reason:
    specifiers in the lockfile ({}) don't match specs in package.json ({"firebase":"^10.10.0","remeda":"^1.56.0"}). For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678.
[2024-04-01T15:21:17.119Z] Total Function Deployment time: 31816
[2024-04-01T15:21:17.119Z] 1 Functions Deployed
[2024-04-01T15:21:17.119Z] 1 Functions Errored
[2024-04-01T15:21:17.120Z] 0 Function Deployments Aborted
[2024-04-01T15:21:17.120Z] Average Function Deployment time: 31815

Functions deploy had errors with the following functions:
        api:api(europe-west3)
[2024-04-01T15:21:17.121Z] Not printing URL for HTTPS function. Typically this means it didn't match a filter or we failed deployment
i  functions: cleaning up build files...
[2024-04-01T15:21:17.122Z] >>> [apiv2][query] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/some-project-id/locations/europe-west3/repositories/gcf-artifacts/packages/api [none]
[2024-04-01T15:21:17.123Z] >>> [apiv2][query] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list [none]
[2024-04-01T15:21:17.669Z] <<< [apiv2][status] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list 404
[2024-04-01T15:21:17.669Z] <<< [apiv2][body] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"eu.gcr.io\" not found"}]}
[2024-04-01T15:21:17.670Z] Failed docker command with error  HTTP Error: 404, Not Found {"name":"FirebaseError","children":[],"context":{"body":{"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"eu.gcr.io\" not found"}],"error":{"message":"Not Found"}},"response":{"statusCode":404}},"exit":1,"message":"HTTP Error: 404, Not Found","status":404}
[2024-04-01T15:21:17.686Z] >>> [apiv2][query] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list [none]
[2024-04-01T15:21:17.862Z] <<< [apiv2][status] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/some-project-id/locations/europe-west3/repositories/gcf-artifacts/packages/api 404
[2024-04-01T15:21:17.862Z] <<< [apiv2][body] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/some-project-id/locations/europe-west3/repositories/gcf-artifacts/packages/api {"error":{"code":404,"message":"Package \"projects/some-project-id/locations/europe-west3/repositories/gcf-artifacts/packages/api\" was not found.","status":"NOT_FOUND"}}
[2024-04-01T15:21:18.249Z] <<< [apiv2][status] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list 404
[2024-04-01T15:21:18.249Z] <<< [apiv2][body] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"eu.gcr.io\" not found"}]}
[2024-04-01T15:21:18.250Z] Failed docker command with error  HTTP Error: 404, Not Found {"name":"FirebaseError","children":[],"context":{"body":{"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"eu.gcr.io\" not found"}],"error":{"message":"Not Found"}},"response":{"statusCode":404}},"exit":1,"message":"HTTP Error: 404, Not Found","status":404}
[2024-04-01T15:21:18.357Z] >>> [apiv2][query] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list [none]
[2024-04-01T15:21:18.880Z] <<< [apiv2][status] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list 404
[2024-04-01T15:21:18.880Z] <<< [apiv2][body] GET https://eu.gcr.io/v2/some-project-id/gcf/europe-west3/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"eu.gcr.io\" not found"}]}
[2024-04-01T15:21:18.880Z] Failed docker command with error  HTTP Error: 404, Not Found {"name":"FirebaseError","children":[],"context":{"body":{"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"eu.gcr.io\" not found"}],"error":{"message":"Not Found"}},"response":{"statusCode":404}},"exit":1,"message":"HTTP Error: 404, Not Found","status":404}
!  functions: Unhandled error cleaning up build images. This could result in a small monthly bill if not corrected. You can attempt to delete these images by redeploying or you can delete them manually at https://console.cloud.google.com/gcr/images/some-project-id/eu/gcf    
[2024-04-01T15:21:18.881Z] Functions deploy failed.
[2024-04-01T15:21:18.881Z] {
  "endpoint": {
    "id": "api",
    "project": "some-project-id",
    "region": "europe-west3",
    "entryPoint": "api",
    "platform": "gcfv2",
    "runtime": "nodejs20",
    "httpsTrigger": {},
    "labels": {
      "deployment-tool": "cli-firebase"
    },
    "secretEnvironmentVariables": [
      {
        "key": "DEMO_API_KEY",
        "secret": "DEMO_API_KEY",
        "projectId": "some-project-id",
        "version": "1"
      }
    ],
    "ingressSettings": null,
    "availableMemoryMb": null,
    "serviceAccount": null,
    "timeoutSeconds": null,
    "maxInstances": null,
    "minInstances": null,
    "concurrency": 80,
    "vpc": null,
    "environmentVariables": {
      "FIRESTORE_EMULATOR_HOST": "localhost:8080",
      "FIREBASE_CONFIG": "{\"projectId\":\"some-project-id\",\"storageBucket\":\"some-project-id.appspot.com\"}",
      "GCLOUD_PROJECT": "some-project-id",
      "EVENTARC_CLOUD_EVENT_SOURCE": "projects/some-project-id/locations/europe-west3/services/api"
    },
    "codebase": "api",
    "cpu": 1,
    "targetedByOnly": false,
    "hash": "7104f7b4c2ad4df1ee5ccfbb499057eaa90ff1e9"
  },
  "op": "create",
  "original": {
    "name": "FirebaseError",
    "children": [],
    "exit": 1,
    "message": "Build failed with status: FAILURE and message: installing pnpm dependencies: (error ID: 8622936f):\nScope: all 3 workspace projects\n ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with \"frozen-lockfile\" because pnpm-lock.yaml is not up to date with packages/common/package.json\n\nNote that in CI environments this setting is true by default. If you still need to run install in such cases, use \"pnpm install --no-frozen-lockfile\"\n\n    Failure reason:\n    specifiers in the lockfile ({}) don't match specs in package.json ({\"firebase\":\"^10.10.0\",\"remeda\":\"^1.56.0\"}). For more details see the logs at https://console.cloud.google.com/cloud-build/builds;region=europe-west3/060fabe5-e91c-4bb5-a0d6-ac5e9807178d?project=587075144678.",
    "status": 3,
    "code": 3
  }
}
[2024-04-01T15:21:18.886Z] Error: Failed to create function api in region europe-west3
    at C:\Users\mega\github\mono-ts\node_modules\.pnpm\firebase-tools-with-isolate@13.6.4\node_modules\firebase-tools-with-isolate\lib\deploy\functions\release\fabricator.js:303:27
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Fabricator.createV2Function (C:\Users\mega\github\mono-ts\node_modules\.pnpm\firebase-tools-with-isolate@13.6.4\node_modules\firebase-tools-with-isolate\lib\deploy\functions\release\fabricator.js:284:30)
    at async Fabricator.createEndpoint (C:\Users\mega\github\mono-ts\node_modules\.pnpm\firebase-tools-with-isolate@13.6.4\node_modules\firebase-tools-with-isolate\lib\deploy\functions\release\fabricator.js:136:13)
    at async handle (C:\Users\mega\github\mono-ts\node_modules\.pnpm\firebase-tools-with-isolate@13.6.4\node_modules\firebase-tools-with-isolate\lib\deploy\functions\release\fabricator.js:88:17)

Error: There was an error deploying function

Specifically this is what I get:
image

@0x80
Copy link
Owner

0x80 commented Apr 1, 2024

"some-project-id" was meant as a placeholder name. You shouldn't deploy to that, unless you actually created a firebase project with that name.

I don't know where this error comes from. I have deployed the services/api this afternoon as a test.

Does it work for you when you roll back to the commit I suggested earlier?

@0x80
Copy link
Owner

0x80 commented Apr 1, 2024

Try deploying with npx firebase deploy --project your-actual-project-id

@michaelnguyenm
Copy link
Author

Apologies as I actually replaced the original project ID in the logs above with some-project-id. I assure you it's to a real project ID in my Firebase console 😅

It doesn't work when I roll back to the "Fix remeda import"

@0x80
Copy link
Owner

0x80 commented Apr 1, 2024

Strange. I just checked and did a fresh deployment. Deleting the api function first and then redeploying. It works for me.

Did you change anything to the mono-ts codebase maybe? If so, maybe you can try a fresh checkout. I'm out of ideas for now...

@michaelnguyenm
Copy link
Author

Unfortunately I've tried deleting the api function first and doing a fresh checkout, no modifications to the codebase for both the latest revision and for the revision for "Fix remeda import" and even one from about 3 months back, and I still get the ERR_PNPM_OUTDATED_LOCKFILE after trying to deploy.

I'll try tinkering around some more to see if it's something related to my environment or maybe something related to my firebase project but honestly I'm not sure what could be the issue.

@michaelnguyenm
Copy link
Author

michaelnguyenm commented Apr 1, 2024

At some point I stopped using the firebase cli (specifically your fork) within Windows Subsystem for Linux (WSL) since I was having trouble logging in and I got it working in WSL again just now. I tried deploying from within WSL instead and it deploys now 🤷

Maybe somehow the lock file generated is slightly different when attempting to deploy from Windows instead of WSL, I have no idea but don't really know if I should try digging into it too much since I know WSL works.

Sorry for the trouble and thanks again for the help and this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants