angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.67k stars 2.19k forks source link

Firebase Cloud function hit "Error: deadline-exceeded" #2528

Closed weilies closed 3 years ago

weilies commented 4 years ago

Version info

Angular:9.1.11

Firebase: 7.15.5

AngularFire: 6.0.2

Other (e.g. Ionic/Cordova, Node, browser, operating system): Chrome Browser, StackBlitz

How to reproduce these conditions

Firebase Cloud function always tieout in 1 min, regardless timeout maxed to 9min in Firebase console. Detail screenshots and codes mentioned in StackOverflow https://stackoverflow.com/questions/62587762/firebase-cloud-function-set-timeout-540s-but-ended-at-60s Resolution (workaround) please search for section "Update as of 1 Jul"

Steps to set up and reproduce Refer StackOverflow link above

Debug output

Refer StackOverflow link above

Expected behavior

Cloud function should process more than 1 min and less than 9min. The main root cause is it doesn't allow us to set timeout option under httpCallable in AngularFire as mentioned here https://github.com/firebase/angularfire/issues/983#issuecomment-618083153

Actual behavior

Cloud function run for 500 seconds if usuing Firebase official SDK Cloud function run at most 60 seconds if using AngularFire package

jamesdaniels commented 3 years ago

You can now pass options to httpsCallable now (6.1) that include custom timeouts