GCloud: Debug “function crashed out of request scope”

无人久伴 提交于 2019-12-11 05:27:38

问题


I'm running a GCloud function, which seems to crash silently, without any kind of error trace.

Everything works perfectly in the emulator but crashes when running on GCloud!

The following message shows up in the function's logs:

Error: function crashed out of request scope Function killed.

Any idea on how to debug this?


回答1:


I think this issue has to do with what you are returning, and how you returning it. In the production environment, if you do not properly return a promise your function will be killed since it assumes your work is done. locally, that will probably not happen so the bug is invisible. Look here, for an example: https://github.com/firebase/functions-samples/issues/78



来源:https://stackoverflow.com/questions/44899374/gcloud-debug-function-crashed-out-of-request-scope

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!