Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase functions fails to deploy on macos recently

all of a sudden my firebase functions have stopped deploying

the logs I see are below. i have tried deploying multiple times and upgrading packages etc but no luck. don't see anything useful in the logs either

[debug] [2021-11-15T00:54:01.810Z] ----------------------------------------------------------------------
[debug] [2021-11-15T00:54:01.812Z] Command:       /usr/local/bin/node /usr/local/bin/firebase deploy --only functions:divi_prices
[debug] [2021-11-15T00:54:01.812Z] CLI Version:   9.22.0
[debug] [2021-11-15T00:54:01.812Z] Platform:      darwin
[debug] [2021-11-15T00:54:01.812Z] Node Version:  v14.17.0
[debug] [2021-11-15T00:54:01.819Z] Time:          Sun Nov 14 2021 18:54:01 GMT-0600 (Central Standard Time)
[debug] [2021-11-15T00:54:01.819Z] ----------------------------------------------------------------------
 https://cloudfunctions.googleapis.com/v1/operations/c2xvdy1jaGVzcy1taXQvdXMtY2VudHJhbDEvZGl2aV9wcmljZXMvNndzU0tnb2VLbDQ {"name":"operations/c2xvdy1jaGVzcy1taXQvdXMtY2VudHJhbDEvZGl2aV9wcmljZXMvNndzU0tnb2VLbDQ","metadata":{"@type":"type.googleapis.com/google.cloud.functions.v1.OperationMetadataV1","target":"projects/slow-chess-mit/locations/us-central1/functions/divi_prices","type":"UPDATE_FUNCTION","request":{"@type":"type.googleapis.com/google.cloud.functions.v1.CloudFunction","name":"projects/slow-chess-mit/locations/us-central1/functions/divi_prices","eventTrigger":{"eventType":"google.pubsub.topic.publish","resource":"projects/slow-chess-mit/topics/firebase-schedule-divi_prices-us-central1","service":"pubsub.googleapis.com","failurePolicy":{}},"status":"OFFLINE","entryPoint":"divi_prices","timeout":"60s","availableMemoryMb":256,"serviceAccountEmail":"[email protected]","updateTime":"2021-11-14T04:51:50.789Z","versionId":"10","labels":{"deployment-scheduled":"true","deployment-tool":"cli-a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb":{"imageSizeBytes":"419002479","layerId":"","mediaType":"application/vnd.docker.distribution.manifest.v2+json","tag":["divi_prices_version-11","latest"],"timeCreatedMs":"315532801000","timeUploadedMs":"1636937698325"}},"name":"slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088","tags":["divi_prices_version-11","latest"]}
[debug] [2021-11-15T00:55:24.179Z] Could not find image for function projects/slow-chess-mit/locations/us-central1/functions/on_game_finished_compute_highest_score
[debug] [2021-11-15T00:55:24.179Z] <<< [apiv2][status] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list 200
[debug] [2021-11-15T00:55:24.179Z] <<< [apiv2][body] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list {"child":["cache"],"manifest":{"sha256:998103042d58a26a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb":{"imageSizeBytes":"419002479","layerId":"","mediaType":"application/vnd.docker.distribution.manifest.v2+json","tag":["divi_prices_version-11","latest"],"timeCreatedMs":"315532801000","timeUploadedMs":"1636937698325"}},"name":"slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088","tags":["divi_prices_version-11","latest"]}
[debug] [2021-11-15T00:55:24.179Z] Could not find image for function projects/slow-chess-mit/locations/us-central1/functions/on_token_audit_update_profile_coins
[debug] [2021-11-15T00:55:24.179Z] <<< [apiv2][status] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list 200
[debug] [2021-11-15T00:55:24.179Z] <<< [apiv2][body] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list {"child":["cache"],"manifest":{"sha256:998103042d58a26a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb":{"imageSizeBytes":"419002479","layerId":"","mediaType":"application/vnd.docker.distribution.manifest.v2+json","tag":["divi_prices_version-11","latest"],"timeCreatedMs":"315532801000","timeUploadedMs":"1636937698325"}},"name":"slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088","tags":["divi_prices_version-11","latest"]}
[debug] [2021-11-15T00:55:24.180Z] Could not find image for function projects/slow-chess-mit/locations/us-central1/functions/on_user_created_update_user_count
[debug] [2021-11-15T00:55:24.180Z] <<< [apiv2][status] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list 200
[debug] [2021-11-15T00:55:24.180Z] <<< [apiv2][body] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list {"child":["cache"],"manifest":{"sha256:998103042d58a26a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb":{"imageSizeBytes":"419002479","layerId":"","mediaType":"application/vnd.docker.distribution.manifest.v2+json","tag":["divi_prices_version-11","latest"],"timeCreatedMs":"315532801000","timeUploadedMs":"1636937698325"}},"name":"slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088","tags":["divi_prices_version-11","latest"]}
[debug] [2021-11-15T00:55:24.180Z] Could not find image for function projects/slow-chess-mit/locations/us-central1/functions/on_game_finished_update_game_type
[debug] [2021-11-15T00:55:24.181Z] <<< [apiv2][status] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list 200
[debug] [2021-11-15T00:55:24.181Z] <<< [apiv2][body] GET https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/tags/list {"child":["cache"],"manifest":{"sha256:998103042d58a26a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb":{"imageSizeBytes":"419002479","layerId":"","mediaType":"application/vnd.docker.distribution.manifest.v2+json","tag":["divi_prices_version-11","latest"],"timeCreatedMs":"315532801000","timeUploadedMs":"1636937698325"}},"name":"slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088","tags":["divi_prices_version-11","latest"]}
[
[debug] [2021-11-15T00:55:24.364Z] <<< [apiv2][status] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/cache/manifests/latest 202
[debug] [2021-11-15T00:55:24.364Z] <<< [apiv2][body] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/cache/manifests/latest {"errors":[]}
[debug] [2021-11-15T00:55:24.365Z] >>> [apiv2][query] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/cache/manifests/sha256:df5c0e894e1e7998f9438f13f353878e17b7e7e69f30ec53d3d7da1e27c2d49c [none]
[debug] [2021-11-15T00:55:24.727Z] <<< [apiv2][status] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/cache/manifests/sha256:df5c0e894e1e7998f9438f13f353878e17b7e7e69f30ec53d3d7da1e27c2d49c 202
[debug] [2021-11-15T00:55:24.728Z] <<< [apiv2][body] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/cache/manifests/sha256:df5c0e894e1e7998f9438f13f353878e17b7e7e69f30ec53d3d7da1e27c2d49c {"errors":[]}
[debug] [2021-11-15T00:55:24.728Z] <<< [apiv2][status] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/manifests/sha256:998103042d58a26a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb 202
[debug] [2021-11-15T00:55:24.728Z] <<< [apiv2][body] DELETE https://us.gcr.io/v2/slow-chess-mit/gcf/us-central1/e3f3ddb4-7b92-44c8-9b00-c66ac3023088/manifests/sha256:998103042d58a26a4fb043f92ee7c5e00683c2fe3f0f07240e7f3434fa08a4fb {"errors":[]}
[debug] [2021-11-15T00:55:24.832Z] Error: Failed to update function divi_prices in region us-central1
    at /usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:38:11
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Fabricator.updateV1Function (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:250:32)
    at async Fabricator.updateEndpoint (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:134:13)
    at async handle (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:75:17)
[error] 
[error] Error: There was an error deploying functions
like image 592
Moblize IT Avatar asked Sep 17 '25 17:09

Moblize IT


2 Answers

So, I decided to delete the latest function that i added and do a deploy for rest of the previously deployed unchanged functions in my index.ts. When i did that it gave me a warning that the new function that i added is not in my index.ts so should i delete that?

This means the error was kind of bogus and function actually got deployed. i headed over to the console and saw that function was indeed deployed though had some missing dependency error.

LEARNING: even with deployment showing failed with errors, do take a look at the firebase console.

like image 194
Moblize IT Avatar answered Sep 20 '25 12:09

Moblize IT


I just had the same problem and stumbled upon this Question. Though in my case running yarn install in the functions direction solved it. Apparently there was some mismatch with the package.json upon upgrading a package. Maybe this is useful for someone else.

like image 21
seveneights Avatar answered Sep 20 '25 11:09

seveneights