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

Firebase Deploy with Skipped Functions Prevent Deployment with Hosting Rewrite to Function #6636

Closed
chriswaterbury opened this issue Dec 22, 2023 · 4 comments

Comments

@chriswaterbury
Copy link

chriswaterbury commented Dec 22, 2023

[REQUIRED] Environment info

**firebase-tools:**13.0.2

Platform: macOS, Ubuntu

[REQUIRED] Test case

Firebase functions that do not update during a deployment with Skipped (No changes detected) will cause an error if hosting rewrites to a function that didn't update (Skipped (No changes detected)).

Ex hosting config:

"hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "/**",
        "function": "helloWorld"
      }
    ]
  }

[REQUIRED] Steps to reproduce

  1. firebase init functions
  2. write a function and firebase deploy
  3. firebase init hosting
  4. add a hosting rewrite to your deployed firebase hosting
  5. firebase deploy
  6. function should be Skipped (No changes detected)
  7. Error: HTTP Error: 400, Cloud Run service 'hostingFunction' does not exist in region 'region' in this project.

[REQUIRED] Expected behavior

firebase deploy should deploy even if changes to a hosting rewrite function aren't made

[REQUIRED] Actual behavior

[debug] [2023-12-22T19:58:05.682Z] ----------------------------------------------------------------------
[debug] [2023-12-22T19:58:05.683Z] Command:       /Users/userhome/.nvm/versions/node/v18.18.2/bin/node /Users/userhome/.nvm/versions/node/v18.18.2/bin/firebase deploy --debug
[debug] [2023-12-22T19:58:05.683Z] CLI Version:   13.0.2
[debug] [2023-12-22T19:58:05.683Z] Platform:      darwin
[debug] [2023-12-22T19:58:05.683Z] Node Version:  v18.18.2
[debug] [2023-12-22T19:58:05.684Z] Time:          Fri Dec 22 2023 14:58:05 GMT-0500 (Eastern Standard Time)
[debug] [2023-12-22T19:58:05.684Z] ----------------------------------------------------------------------
[debug] 
[debug] [2023-12-22T19:58:05.715Z] > 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"]
[debug] [2023-12-22T19:58:05.715Z] > authorizing via signed-in user (username@gmail.com)
[debug] [2023-12-22T19:58:05.716Z] [iam] checking project firebase-project-name for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get","firebasehosting.sites.update"]
[debug] [2023-12-22T19:58:05.716Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project-name:testIamPermissions [none]
[debug] [2023-12-22T19:58:05.717Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project-name:testIamPermissions x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:05.717Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project-name:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-12-22T19:58:05.861Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project-name:testIamPermissions 200
[debug] [2023-12-22T19:58:05.862Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/firebase-project-name:testIamPermissions {"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-12-22T19:58:05.862Z] >>> [apiv2][query] POST https://iam.googleapis.com/v1/projects/firebase-project-name/serviceAccounts/firebase-project-name@appspot.gserviceaccount.com:testIamPermissions [none]
[debug] [2023-12-22T19:58:05.863Z] >>> [apiv2][body] POST https://iam.googleapis.com/v1/projects/firebase-project-name/serviceAccounts/firebase-project-name@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[debug] [2023-12-22T19:58:06.028Z] <<< [apiv2][status] POST https://iam.googleapis.com/v1/projects/firebase-project-name/serviceAccounts/firebase-project-name@appspot.gserviceaccount.com:testIamPermissions 200
[debug] [2023-12-22T19:58:06.029Z] <<< [apiv2][body] POST https://iam.googleapis.com/v1/projects/firebase-project-name/serviceAccounts/firebase-project-name@appspot.gserviceaccount.com:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[debug] [2023-12-22T19:58:06.031Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name [none]
[debug] [2023-12-22T19:58:06.244Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name 200
[debug] [2023-12-22T19:58:06.245Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name {"projectId":"firebase-project-name","projectNumber":"729387610014","displayName":"firebase-project-name","name":"projects/firebase-project-name","resources":{"hostingSite":"firebase-project-name","storageBucket":"firebase-project-name.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_797f4946-5c10-4f25-bdc3-f605f65bca65"}
[info] 
[info] === Deploying to 'firebase-project-name'...
[info] 
[info] i  deploying functions, hosting 
[info] Running command: npm --prefix "$RESOURCE_DIR" run lint
[info] ✔  functions: Finished running predeploy script. 
[debug] [2023-12-22T19:58:06.835Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name [none]
[debug] [2023-12-22T19:58:07.025Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name 200
[debug] [2023-12-22T19:58:07.025Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name {"projectId":"firebase-project-name","projectNumber":"729387610014","displayName":"firebase-project-name","name":"projects/firebase-project-name","resources":{"hostingSite":"firebase-project-name","storageBucket":"firebase-project-name.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_797f4946-5c10-4f25-bdc3-f605f65bca65"}
[info] i  functions: preparing codebase default for deployment 
[info] i  functions: ensuring required API cloudfunctions.googleapis.com is enabled... 
[info] i  functions: ensuring required API cloudbuild.googleapis.com is enabled... 
[info] i  artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled... 
[debug] [2023-12-22T19:58:07.027Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudfunctions.googleapis.com [none]
[debug] [2023-12-22T19:58:07.027Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudfunctions.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:07.029Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/runtimeconfig.googleapis.com [none]
[debug] [2023-12-22T19:58:07.029Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/runtimeconfig.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:07.030Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudbuild.googleapis.com [none]
[debug] [2023-12-22T19:58:07.030Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudbuild.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:07.031Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/artifactregistry.googleapis.com [none]
[debug] [2023-12-22T19:58:07.031Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/artifactregistry.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:07.535Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudfunctions.googleapis.com 200
[debug] [2023-12-22T19:58:07.535Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudfunctions.googleapis.com [omitted]
[info] ✔  functions: required API cloudfunctions.googleapis.com is enabled 
[debug] [2023-12-22T19:58:07.536Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/artifactregistry.googleapis.com 200
[debug] [2023-12-22T19:58:07.537Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/artifactregistry.googleapis.com [omitted]
[info] ✔  artifactregistry: required API artifactregistry.googleapis.com is enabled 
[debug] [2023-12-22T19:58:07.538Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudbuild.googleapis.com 200
[debug] [2023-12-22T19:58:07.538Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/cloudbuild.googleapis.com [omitted]
[info] ✔  functions: required API cloudbuild.googleapis.com is enabled 
[debug] [2023-12-22T19:58:07.539Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/runtimeconfig.googleapis.com 200
[debug] [2023-12-22T19:58:07.539Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/runtimeconfig.googleapis.com [omitted]
[debug] [2023-12-22T19:58:07.539Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name/adminSdkConfig [none]
[debug] [2023-12-22T19:58:07.759Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name/adminSdkConfig 200
[debug] [2023-12-22T19:58:07.759Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name/adminSdkConfig {"projectId":"firebase-project-name","storageBucket":"firebase-project-name.appspot.com","locationId":"us-central"}
[debug] [2023-12-22T19:58:07.760Z] >>> [apiv2][query] GET https://runtimeconfig.googleapis.com/v1beta1/projects/firebase-project-name/configs [none]
[debug] [2023-12-22T19:58:08.053Z] <<< [apiv2][status] GET https://runtimeconfig.googleapis.com/v1beta1/projects/firebase-project-name/configs 200
[debug] [2023-12-22T19:58:08.054Z] <<< [apiv2][body] GET https://runtimeconfig.googleapis.com/v1beta1/projects/firebase-project-name/configs {}
[debug] [2023-12-22T19:58:08.056Z] Validating nodejs source
[debug] [2023-12-22T19:58:08.469Z] > [functions] package.json contents: {
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "lint": "eslint .",
    "serve": "firebase emulators:start --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "engines": {
    "node": "18"
  },
  "main": "index.js",
  "dependencies": {
    "firebase-admin": "^11.8.0",
    "firebase-functions": "^4.3.1"
  },
  "devDependencies": {
    "eslint": "^8.15.0",
    "eslint-config-google": "^0.14.0",
    "firebase-functions-test": "^3.1.0"
  },
  "private": true
}
[debug] [2023-12-22T19:58:08.469Z] Building nodejs source
[info] i  functions: Loading and analyzing source code for codebase default to determine what to deploy 
[debug] [2023-12-22T19:58:08.470Z] Could not find functions.yaml. Must use http discovery
[debug] [2023-12-22T19:58:08.476Z] Found firebase-functions binary at '/Users/userhome/Documents/FirebaseTest/functions/node_modules/.bin/firebase-functions'
[info] Serving at port 8493

[debug] [2023-12-22T19:58:08.645Z] Got response from /__/functions.yaml {"endpoints":{"helloWorld":{"availableMemoryMb":null,"timeoutSeconds":null,"minInstances":null,"maxInstances":null,"ingressSettings":null,"concurrency":null,"serviceAccountEmail":null,"vpc":null,"platform":"gcfv2","labels":{},"httpsTrigger":{},"entryPoint":"helloWorld"}},"specVersion":"v1alpha1","requiredAPIs":[]}
[info] i  functions: preparing functions directory for uploading... 
[info] i  functions: packaged /Users/userhome/Documents/FirebaseTest/functions (74.5 KB) for uploading 
[debug] [2023-12-22T19:58:08.672Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v1/projects/firebase-project-name/locations/-/functions [none]
[debug] [2023-12-22T19:58:09.259Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v1/projects/firebase-project-name/locations/-/functions 200
[debug] [2023-12-22T19:58:09.260Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v1/projects/firebase-project-name/locations/-/functions {}
[debug] [2023-12-22T19:58:09.261Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/firebase-project-name/locations/-/functions filter=environment%3D%22GEN_2%22
[debug] [2023-12-22T19:58:09.800Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/firebase-project-name/locations/-/functions 200
[debug] [2023-12-22T19:58:09.800Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/firebase-project-name/locations/-/functions {"functions":[{"name":"projects/firebase-project-name/locations/us-central1/functions/helloWorld","buildConfig":{"build":"projects/729387610014/locations/us-central1/builds/1bc5169d-5531-450e-859f-dd80d95c0745","runtime":"nodejs18","entryPoint":"helloWorld","source":{"storageSource":{"bucket":"gcf-v2-sources-729387610014-us-central1","object":"helloWorld/function-source.zip","generation":"1703274952468433"}},"environmentVariables":{"GOOGLE_NODE_RUN_SCRIPTS":""},"sourceProvenance":{"resolvedStorageSource":{"bucket":"gcf-v2-sources-729387610014-us-central1","object":"helloWorld/function-source.zip","generation":"1703274952468433"}},"dockerRegistry":"ARTIFACT_REGISTRY"},"serviceConfig":{"service":"projects/firebase-project-name/locations/us-central1/services/helloworld","timeoutSeconds":60,"environmentVariables":{"FIREBASE_CONFIG":"{\"projectId\":\"firebase-project-name\",\"storageBucket\":\"firebase-project-name.appspot.com\",\"locationId\":\"us-central\"}","GCLOUD_PROJECT":"firebase-project-name","EVENTARC_CLOUD_EVENT_SOURCE":"projects/firebase-project-name/locations/us-central1/services/helloWorld","FUNCTION_TARGET":"helloWorld","FUNCTION_SIGNATURE_TYPE":"http"},"maxInstanceCount":100,"ingressSettings":"ALLOW_ALL","uri":"https://helloworld-voiiisaqfq-uc.a.run.app","serviceAccountEmail":"729387610014-compute@developer.gserviceaccount.com","availableMemory":"256Mi","allTrafficOnLatestRevision":true,"revision":"helloworld-00004-wiq","maxInstanceRequestConcurrency":80,"availableCpu":"1"},"state":"ACTIVE","updateTime":"2023-12-22T19:56:51.300910237Z","labels":{"deployment-tool":"cli-firebase","firebase-functions-hash":"c1df28a96a7dfe2da402c843bb8394434dc940bf"},"environment":"GEN_2","url":"https://us-central1-firebase-project-name.cloudfunctions.net/helloWorld"}]}
[info] i  functions: ensuring required API run.googleapis.com is enabled... 
[info] i  functions: ensuring required API eventarc.googleapis.com is enabled... 
[info] i  functions: ensuring required API pubsub.googleapis.com is enabled... 
[info] i  functions: ensuring required API storage.googleapis.com is enabled... 
[debug] [2023-12-22T19:58:09.805Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/run.googleapis.com [none]
[debug] [2023-12-22T19:58:09.806Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/run.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:09.808Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/eventarc.googleapis.com [none]
[debug] [2023-12-22T19:58:09.808Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/eventarc.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:09.809Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/pubsub.googleapis.com [none]
[debug] [2023-12-22T19:58:09.810Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/pubsub.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:09.811Z] >>> [apiv2][query] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/storage.googleapis.com [none]
[debug] [2023-12-22T19:58:09.812Z] >>> [apiv2][(partial)header] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/storage.googleapis.com x-goog-quota-user=projects/firebase-project-name
[debug] [2023-12-22T19:58:10.187Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/eventarc.googleapis.com 200
[debug] [2023-12-22T19:58:10.187Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/eventarc.googleapis.com [omitted]
[info] ✔  functions: required API eventarc.googleapis.com is enabled 
[debug] [2023-12-22T19:58:10.188Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/pubsub.googleapis.com 200
[debug] [2023-12-22T19:58:10.189Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/pubsub.googleapis.com [omitted]
[info] ✔  functions: required API pubsub.googleapis.com is enabled 
[debug] [2023-12-22T19:58:10.190Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/storage.googleapis.com 200
[debug] [2023-12-22T19:58:10.190Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/storage.googleapis.com [omitted]
[info] ✔  functions: required API storage.googleapis.com is enabled 
[debug] [2023-12-22T19:58:10.191Z] <<< [apiv2][status] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/run.googleapis.com 200
[debug] [2023-12-22T19:58:10.191Z] <<< [apiv2][body] GET https://serviceusage.googleapis.com/v1/projects/firebase-project-name/services/run.googleapis.com [omitted]
[info] ✔  functions: required API run.googleapis.com is enabled 
[info] i  functions: generating the service identity for pubsub.googleapis.com... 
[info] i  functions: generating the service identity for eventarc.googleapis.com... 
[debug] [2023-12-22T19:58:10.192Z] >>> [apiv2][query] POST https://serviceusage.googleapis.com/v1beta1/projects/729387610014/services/pubsub.googleapis.com:generateServiceIdentity [none]
[debug] [2023-12-22T19:58:10.194Z] >>> [apiv2][query] POST https://serviceusage.googleapis.com/v1beta1/projects/729387610014/services/eventarc.googleapis.com:generateServiceIdentity [none]
[debug] [2023-12-22T19:58:10.696Z] <<< [apiv2][status] POST https://serviceusage.googleapis.com/v1beta1/projects/729387610014/services/eventarc.googleapis.com:generateServiceIdentity 200
[debug] [2023-12-22T19:58:10.697Z] <<< [apiv2][body] POST https://serviceusage.googleapis.com/v1beta1/projects/729387610014/services/eventarc.googleapis.com:generateServiceIdentity {"name":"operations/finished.DONE_OPERATION","done":true,"response":{"@type":"type.googleapis.com/google.api.serviceusage.v1beta1.ServiceIdentity","email":"service-729387610014@gcp-sa-eventarc.iam.gserviceaccount.com","uniqueId":"104901129214665267513"}}
[debug] [2023-12-22T19:58:10.829Z] <<< [apiv2][status] POST https://serviceusage.googleapis.com/v1beta1/projects/729387610014/services/pubsub.googleapis.com:generateServiceIdentity 200
[debug] [2023-12-22T19:58:10.829Z] <<< [apiv2][body] POST https://serviceusage.googleapis.com/v1beta1/projects/729387610014/services/pubsub.googleapis.com:generateServiceIdentity {"name":"operations/finished.DONE_OPERATION","done":true,"response":{"@type":"type.googleapis.com/google.api.serviceusage.v1beta1.ServiceIdentity","email":"service-729387610014@gcp-sa-pubsub.iam.gserviceaccount.com","uniqueId":"102311284036056188287"}}
[debug] [2023-12-22T19:58:10.833Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name [none]
[debug] [2023-12-22T19:58:11.117Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name 200
[debug] [2023-12-22T19:58:11.117Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/firebase-project-name {"projectId":"firebase-project-name","projectNumber":"729387610014","displayName":"firebase-project-name","name":"projects/firebase-project-name","resources":{"hostingSite":"firebase-project-name","storageBucket":"firebase-project-name.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_797f4946-5c10-4f25-bdc3-f605f65bca65"}
[debug] [2023-12-22T19:58:11.123Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions [none]
[debug] [2023-12-22T19:58:11.123Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions {"status":"CREATED","labels":{"deployment-tool":"cli-firebase"}}
[debug] [2023-12-22T19:58:11.616Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions 200
[debug] [2023-12-22T19:58:11.616Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions {"name":"projects/729387610014/sites/firebase-project-name/versions/b89deb9ea6d79d3a","status":"CREATED","config":{},"labels":{"deployment-tool":"cli-firebase"}}
[info] i  hosting[firebase-project-name]: beginning deploy... 
[info] i  hosting[firebase-project-name]: found 1 files in public 
[debug] [2023-12-22T19:58:11.619Z] [hosting] uploading with 200 concurrency
[debug] [2023-12-22T19:58:11.621Z] [hosting] hash cache [cHVibGlj] stored for 1 files
[debug] [2023-12-22T19:58:11.621Z] [hosting][hash queue][FINAL] {"max":0,"min":0,"avg":0,"active":0,"complete":1,"success":1,"errored":0,"retried":0,"total":1,"elapsed":0}
[debug] [2023-12-22T19:58:11.622Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/729387610014/sites/firebase-project-name/versions/b89deb9ea6d79d3a:populateFiles [none]
[debug] [2023-12-22T19:58:11.622Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/729387610014/sites/firebase-project-name/versions/b89deb9ea6d79d3a:populateFiles {"files":{"/index.html":"9abb7c713022b298e05340cf7775877994f8e2d040b4431b6067bf336043e46e"}}
[debug] [2023-12-22T19:58:11.869Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/729387610014/sites/firebase-project-name/versions/b89deb9ea6d79d3a:populateFiles 200
[debug] [2023-12-22T19:58:11.870Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/729387610014/sites/firebase-project-name/versions/b89deb9ea6d79d3a:populateFiles {"uploadUrl":"https://upload-firebasehosting.googleapis.com/upload/sites/firebase-project-name/versions/b89deb9ea6d79d3a/files"}
[debug] [2023-12-22T19:58:11.870Z] [hosting][populate queue][FINAL] {"max":249,"min":249,"avg":249,"active":0,"complete":1,"success":1,"errored":0,"retried":0,"total":1,"elapsed":249}
[debug] [2023-12-22T19:58:11.871Z] [hosting] uploads queued: 0
[debug] [2023-12-22T19:58:11.871Z] [hosting][upload queue][FINAL] {"max":0,"min":9999999999,"avg":0,"active":0,"complete":0,"success":0,"errored":0,"retried":0,"total":0,"elapsed":1703275091871}
[info] i  hosting: upload complete 
[info] ✔  hosting[firebase-project-name]: file upload complete 
[debug] [2023-12-22T19:58:11.872Z] [hosting] deploy completed after 254ms
[info] i  functions: Skipping the deploy of unchanged functions with experimental support for skipdeployingnoopfunctions 
[info] ✔  functions[helloWorld(us-central1)] Skipped (No changes detected) 
[debug] [2023-12-22T19:58:11.878Z] Total Function Deployment time: 1
[debug] [2023-12-22T19:58:11.878Z] 0 Functions Deployed
[debug] [2023-12-22T19:58:11.879Z] 0 Functions Errored
[debug] [2023-12-22T19:58:11.879Z] 0 Function Deployments Aborted
[debug] [2023-12-22T19:58:11.879Z] Average Function Deployment time: NaN
[debug] [2023-12-22T19:58:11.962Z] Not printing URL for HTTPS function. Typically this means it didn't match a filter or we failed deployment
[info] i  functions: cleaning up build files... 
[debug] [2023-12-22T19:58:11.963Z] >>> [apiv2][query] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/firebase-project-name/locations/us-central1/repositories/gcf-artifacts/packages/hello_world [none]
[debug] [2023-12-22T19:58:11.964Z] >>> [apiv2][query] GET https://us.gcr.io/v2/firebase-project-name/gcf/us-central1/tags/list [none]
[debug] [2023-12-22T19:58:12.077Z] <<< [apiv2][status] GET https://us.gcr.io/v2/firebase-project-name/gcf/us-central1/tags/list 200
[debug] [2023-12-22T19:58:12.078Z] <<< [apiv2][body] GET https://us.gcr.io/v2/firebase-project-name/gcf/us-central1/tags/list {"child":[],"manifest":{},"name":"firebase-project-name/gcf/us-central1","tags":[]}
[debug] [2023-12-22T19:58:12.078Z] Could not find image for function projects/firebase-project-name/locations/us-central1/functions/helloWorld
[debug] [2023-12-22T19:58:12.208Z] <<< [apiv2][status] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/firebase-project-name/locations/us-central1/repositories/gcf-artifacts/packages/hello_world 404
[debug] [2023-12-22T19:58:12.209Z] <<< [apiv2][body] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/firebase-project-name/locations/us-central1/repositories/gcf-artifacts/packages/hello_world {"error":{"code":404,"message":"Package \"projects/firebase-project-name/locations/us-central1/repositories/gcf-artifacts/packages/hello_world\" was not found.","status":"NOT_FOUND"}}
[debug] [2023-12-22T19:58:12.209Z] [
  {
    "config": {
      "public": "public",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ],
      "rewrites": [
        {
          "source": "/**",
          "function": {
            "functionId": "helloWorld"
          }
        }
      ],
      "site": "firebase-project-name"
    },
    "version": "projects/729387610014/sites/firebase-project-name/versions/b89deb9ea6d79d3a"
  }
]
[info] i  hosting[firebase-project-name]: finalizing version... 
[debug] [2023-12-22T19:58:12.210Z] >>> [apiv2][query] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions/b89deb9ea6d79d3a updateMask=status%2Cconfig
[debug] [2023-12-22T19:58:12.210Z] >>> [apiv2][body] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions/b89deb9ea6d79d3a {"status":"FINALIZED","config":{"rewrites":[{"glob":"/**","run":{"serviceId":"helloWorld","region":"us-central1"}}]}}
[debug] [2023-12-22T19:58:12.470Z] <<< [apiv2][status] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions/b89deb9ea6d79d3a 400
[debug] [2023-12-22T19:58:12.470Z] <<< [apiv2][body] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/firebase-project-name/versions/b89deb9ea6d79d3a {"error":{"code":400,"message":"Cloud Run service `helloWorld` does not exist in region `us-central1` in this project.","status":"INVALID_ARGUMENT"}}
[error] 
[error] Error: HTTP Error: 400, Cloud Run service `helloWorld` does not exist in region `us-central1` in this project.
[debug] [2023-12-22T19:58:12.542Z] Error Context: {
  "body": {
    "error": {
      "code": 400,
      "message": "Cloud Run service `helloWorld` does not exist in region `us-central1` in this project.",
      "status": "INVALID_ARGUMENT"
    }
  },
  "response": {
    "statusCode": 400
  }
}
@aalej
Copy link
Contributor

aalej commented Jan 2, 2024

Hi @chriswaterbury, thanks for the detailed report. I was able to reproduce this issue. I’ll notify our engineering team so they can take a look, and I’ll be marking this as reproducible.

@jjgriff93
Copy link

Also seeing this in version 13.4.0

@aalej
Copy link
Contributor

aalej commented Mar 22, 2024

Hey folks, there was a recent fix #6658, which is available on the latest version of firebase-tools(v13.5.2), that should address this issue. I tried to reproduce this issue again using v13.5.2, and no errors were raised during deployment. Just to verify, can anyone try using the latest version to deploy to see if the issue persists.

@joehan
Copy link
Contributor

joehan commented Mar 26, 2024

Closing this as fixed. If you're still experiencing this error, please ping this issue and we will reopen + investigate further.

@joehan joehan closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants