[英]ECONNREFUSED Error when trying to run Firebase pubsub scheduled cloud function on shell
I am trying to run a pubsub.schedule function on Firebase emulator.我正在尝试在 Firebase 模拟器上运行 pubsub.schedule function。 I tried to follow the instructions in the following links.我尝试按照以下链接中的说明进行操作。
https://github.com/firebase/firebase-tools/issues/1748#issuecomment-609735979 https://github.com/firebase/firebase-tools/issues/1748#issuecomment-609735979
https://firebase.google.com/docs/functions/local-shell#set_up_admin_credentials_optional https://firebase.google.com/docs/functions/local-shell#set_up_admin_credentials_optional
I keep getting the error below when I run firebase functions:shell
.当我运行firebase functions:shell
时,我不断收到以下错误。
Error: Server Error. connect ECONNREFUSED 127.0.0.1:4400
Any idea how to solve it?知道如何解决吗? Thank you.谢谢你。
In my case, this was caused by Microsoft Defender, it may be any other firewall block.在我的情况下,这是由 Microsoft Defender 引起的,它可能是任何其他防火墙阻止。 Try running "firebase emulators:start" in the same cmd window, if you get a message from MS Defender, click "Allow".尝试在同一 cmd window 中运行“firebase emulators:start”,如果您收到来自 MS Defender 的消息,请单击“允许”。 Then you can stop the emulators and run "firebase functions:shell" in the same cmd window, it should work properly.然后你可以停止模拟器并在同一个 cmd window 中运行“firebase 函数:shell”,它应该可以正常工作。
In my case, after running "firebase emulators:start" everything worked.在我的例子中,运行“firebase emulators:start”后一切正常。 It appeared that the command installed a few.jar files and perhaps that was the reason.该命令似乎安装了几个 .jar 文件,也许这就是原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.