question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy Functions Sometimes Stuck in Infinite Loop

See original GitHub issue

[REQUIRED] Environment info

Firebase CLI v7.3.2

firebase-tools: 7.3.2

Platform: macOS

Sometimes when we run firebase deploy, functions get stuck in a loop and never finish deploying. This seems to happen more often when a new function has been added since the last deploy.

CLI output

=== Deploying to 'modulz-stephen'...

i  deploying firestore, functions, hosting
i  firestore: checking firestore.rules for compilation errors...
i  firestore: reading indexes from firestore.indexes.json...
✔  firestore: rules file firestore.rules compiled successfully
i  functions: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
i  firestore: uploading rules firestore.rules...
i  firestore: there are some indexes defined in your project that are not present in your firestore indexes file. Run firebase firestore:indexes and save the result to correct the discrepancy.
i  firestore: there are some field overrides defined in your project that are not present in your firestore indexes file. Run firebase firestore:indexes and save the result to correct the discrepancy.
✔  firestore: deployed indexes in firestore.indexes.json successfully
i  functions: preparing packages/cloud-functions directory for uploading...
i  functions: packaged packages/cloud-functions (259.04 KB) for uploading
✔  functions: packages/cloud-functions folder uploaded successfully
i  hosting[modulz-stephen]: beginning deploy...
i  hosting[modulz-stephen]: found 17 files in packages/app/build
✔  hosting[modulz-stephen]: file upload complete
✔  firestore: released rules firestore.rules to cloud.firestore
i  functions: updating Node.js 8 function renderToSketch(us-central1)...
i  functions: updating Node.js 8 function serveSketchLibrary(us-central1)...
i  functions: updating Node.js 8 function bundle(us-central1)...
i  functions: updating Node.js 8 function customToken(us-central1)...

Debug Log


[info] i  functions: updating Node.js 8 function customToken(us-central1)...
[debug] [2019-09-24T22:00:39.370Z] Trigger is:  {"httpsTrigger":{}}
[debug] [2019-09-24T22:00:39.370Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/modulz-stephen/services/cloudscheduler.googleapis.com  
 
[debug] [2019-09-24T22:00:39.884Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:39.886Z] >>> HTTP REQUEST PATCH https://cloudfunctions.googleapis.com/v1/projects/modulz-stephen/locations/us-central1/functions/renderToSketch {"updateMask":"sourceUploadUrl,name,labels,runtime,httpsTrigger"} 

[debug] [2019-09-24T22:00:39.887Z] >>> HTTP REQUEST PATCH https://cloudfunctions.googleapis.com/v1/projects/modulz-stephen/locations/us-central1/functions/serveSketchLibrary {"updateMask":"sourceUploadUrl,name,labels,runtime,httpsTrigger"} 

[debug] [2019-09-24T22:00:39.888Z] >>> HTTP REQUEST PATCH https://cloudfunctions.googleapis.com/v1/projects/modulz-stephen/locations/us-central1/functions/bundle {"updateMask":"sourceUploadUrl,name,labels,runtime,httpsTrigger"} 

[debug] [2019-09-24T22:00:39.889Z] >>> HTTP REQUEST PATCH https://cloudfunctions.googleapis.com/v1/projects/modulz-stephen/locations/us-central1/functions/customToken {"updateMask":"sourceUploadUrl,name,labels,runtime,httpsTrigger"} 

[debug] [2019-09-24T22:00:40.392Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.394Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.394Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.395Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.396Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/projects/modulz-stephen/locations/-/functions  
 
[debug] [2019-09-24T22:00:40.801Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.802Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvcmVuZGVyVG9Ta2V0Y2gvbmxfMEJ4RlpoSE0  
 
[debug] [2019-09-24T22:00:40.803Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvc2VydmVTa2V0Y2hMaWJyYXJ5L3pmaUhrYlRxbzd3  
 
[debug] [2019-09-24T22:00:40.803Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvYnVuZGxlLzdnRk40bnZ0dnBr  
 
[debug] [2019-09-24T22:00:40.803Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvY3VzdG9tVG9rZW4vVXJTMjF0c2lDOHc  
 
[debug] [2019-09-24T22:00:40.945Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.962Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.973Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:40.981Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:42.946Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvYnVuZGxlLzdnRk40bnZ0dnBr  
 
[debug] [2019-09-24T22:00:42.963Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvc2VydmVTa2V0Y2hMaWJyYXJ5L3pmaUhrYlRxbzd3  
 
[debug] [2019-09-24T22:00:42.973Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvcmVuZGVyVG9Ta2V0Y2gvbmxfMEJ4RlpoSE0  
 
[debug] [2019-09-24T22:00:42.981Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvY3VzdG9tVG9rZW4vVXJTMjF0c2lDOHc  
 
[debug] [2019-09-24T22:00:43.100Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:43.111Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:43.113Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:44.141Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:45.103Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvcmVuZGVyVG9Ta2V0Y2gvbmxfMEJ4RlpoSE0  
 
[debug] [2019-09-24T22:00:45.113Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvY3VzdG9tVG9rZW4vVXJTMjF0c2lDOHc  
 
[debug] [2019-09-24T22:00:45.114Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvc2VydmVTa2V0Y2hMaWJyYXJ5L3pmaUhrYlRxbzd3  
 
[debug] [2019-09-24T22:00:45.248Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:45.254Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:45.271Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:46.143Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvYnVuZGxlLzdnRk40bnZ0dnBr  
 
[debug] [2019-09-24T22:00:46.302Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:47.250Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvc2VydmVTa2V0Y2hMaWJyYXJ5L3pmaUhrYlRxbzd3  
 
[debug] [2019-09-24T22:00:47.256Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvY3VzdG9tVG9rZW4vVXJTMjF0c2lDOHc  
 
[debug] [2019-09-24T22:00:47.272Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvcmVuZGVyVG9Ta2V0Y2gvbmxfMEJ4RlpoSE0  
 
[debug] [2019-09-24T22:00:47.390Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:47.393Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:47.403Z] <<< HTTP RESPONSE 200
[debug] [2019-09-24T22:00:48.303Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/bW9kdWx6LXN0ZXBoZW4vdXMtY2VudHJhbDEvYnVuZGxlLzdnRk40bnZ0dnBr  
 
.... this repeats forever until you ctrl c out of the deploy in terminal

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinajiancommented, Sep 30, 2019

Hey all,

There was an issue with Cloud Functions that you can see on the Cloud Status Dashboard. This has since been resolved so I’ll close this issue. Sorry for the inconvenience.

This should have been reported on the Firebase status dashboard—I’ll work on getting that updated.

1reaction
adamdurencommented, Sep 25, 2019

https://status.cloud.google.com/ is reporting multiple outages across several Google Cloud Services. Probably related.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cloud Functions for Firebase invoked many times
I deployed this cloud function and added just one node from my app. I went to the Firebase Functions dashboard and see that...
Read more >
How to solve the React useEffect Hook's infinite loop patterns
Solve the issue of infinite loops when using the useEffect Hook in React to more smoothly utilize the Hook for your app's side...
Read more >
VCF 4.0 NSX-T Deployment stuck in endless loop
Im stuck at an endless loop of deploying the management cluster nodes then the builder tearing them down again... The vcd-bringup-debug.log ...
Read more >
6 Troubleshoot Process Hangs and Loops - Java
This chapter provides information and guidance about some specific procedures for troubleshooting hanging or looping processes.
Read more >
C#'s infinite loops explained (+ causes & solutions)
A stuck app. When an application is stuck in an infinite loop, it will not continue with its job. So your app looks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found