Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何停止向Firebase模拟器发送请求?_Firebase_Google Cloud Platform_Google Cloud Firestore_Google Cloud Functions_Firebase Cli - Fatal编程技术网

如何停止向Firebase模拟器发送请求?

如何停止向Firebase模拟器发送请求?,firebase,google-cloud-platform,google-cloud-firestore,google-cloud-functions,firebase-cli,Firebase,Google Cloud Platform,Google Cloud Firestore,Google Cloud Functions,Firebase Cli,我的项目: Google Cloud Functions使用调度函数(Pubsub+Cloud Scheduler)向第三方API发送SOAP请求,解析、清理响应并将其存储在Firestore中。它已通过服务帐户验证 怎么了: 它已经部署并在生产中运行良好。部署后,我安装了新的Firebase模拟器,效果很好。但是,现在它总是在运行shell时尝试连接到模拟器(模拟器可能是问题所在): 在日志中,我可以看到它试图连接到模拟器,但据我所知,它应该自动绕过它们。我在文档中找不到任何可以解决这个问题的

我的项目:

Google Cloud Functions使用调度函数(Pubsub+Cloud Scheduler)向第三方API发送SOAP请求,解析、清理响应并将其存储在Firestore中。它已通过服务帐户验证

怎么了:

它已经部署并在生产中运行良好。部署后,我安装了新的Firebase模拟器,效果很好。但是,现在它总是在运行shell时尝试连接到模拟器(模拟器可能是问题所在):

在日志中,我可以看到它试图连接到模拟器,但据我所知,它应该自动绕过它们。我在文档中找不到任何可以解决这个问题的东西

我的问题和日志:

有人知道如何绕过此连接尝试,以便我可以直接写入Firestore而不是模拟器吗

以下是日志:

    [debug] [2020-06-24T20:16:37.808Z] ----------------------------------------------------------------------
[debug] [2020-06-24T20:16:37.810Z] Command:       C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\firebase-tools\lib\bin\firebase.js functions:shell
[debug] [2020-06-24T20:16:37.811Z] CLI Version:   8.4.3
[debug] [2020-06-24T20:16:37.811Z] Platform:      win32
[debug] [2020-06-24T20:16:37.811Z] Node Version:  v10.18.1
[debug] [2020-06-24T20:16:37.812Z] Time:          Wed Jun 24 2020 17:16:37 GMT-0300 (Atlantic Daylight Time)
[debug] [2020-06-24T20:16:37.812Z] ----------------------------------------------------------------------
[debug] [2020-06-24T20:16:37.812Z] 
[debug] [2020-06-24T20:16:37.822Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-06-24T20:16:37.823Z] > authorizing via signed-in user
[debug] [2020-06-24T20:16:37.823Z] [iam] checking project rtiwebservices for permissions ["firebase.projects.get"]
[debug] [2020-06-24T20:16:37.827Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/rtiwebservices:testIamPermissions  
 {"permissions":["firebase.projects.get"]}
[debug] [2020-06-24T20:16:38.208Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Wed, 24 Jun 2020 20:16:35 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=182","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-06-24T20:16:38.209Z] >>> HTTP REQUEST GET http://localhost:4400/emulators  
 
[debug] [2020-06-24T20:16:40.215Z] Error: connect ECONNREFUSED 127.0.0.1:4400
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[error] 
[error] Error: Server Error. connect ECONNREFUSED 127.0.0.1:4400
[debug][2020-06-24T20:16:37.808Z]----------------------------------------------------------------------
[debug][2020-06-24T20:16:37.810Z]命令:C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node\U modules\firebase tools\lib\bin\firebase.js函数:shell
[调试][2020-06-24T20:16:37.811Z]CLI版本:8.4.3
[调试][2020-06-24T20:16:37.811Z]平台:win32
[debug][2020-06-24T20:16:37.811Z]节点版本:v10.18.1
[调试][2020-06-24T20:16:37.812Z]时间:星期三2020年6月24日17:16:37 GMT-0300(大西洋夏令时)
[调试][2020-06-24T20:16:37.812Z]----------------------------------------------------------------------
[调试][2020-06-24T20:16:37.812Z]
[debug][2020-06-24T20:16:37.822Z]>命令需要作用域:[“email”、“openid”和https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[调试][2020-06-24T20:16:37.823Z]>通过登录用户进行授权
[debug][2020-06-24T20:16:37.823Z][iam]正在检查project rtiwebservices的权限[“firebase.projects.get”]
[调试][2020-06-24T20:16:37.827Z]>>>HTTP请求发布https://cloudresourcemanager.googleapis.com/v1/projects/rtiwebservices:testIamPermissions  
{“权限”:[“firebase.projects.get”]}
[调试][2020-06-24T20:16:38.208Z]>HTTP请求获取http://localhost:4400/emulators  
[调试][2020-06-24T20:16:40.215Z]错误:连接ECONREFUSSED 127.0.0.1:4400
在TCPConnectWrap.afterConnect[as oncomplete](net.js:1107:14)
[错误]
[错误]错误:服务器错误。连接EConrefuse127.0.0.1:4400

您找到解决方案了吗?显然,我在运行emulator套件后尝试启动函数shell时遇到了同样的问题。我还没有找到解决方案,但如果找到了,我会在这里发布。
    [debug] [2020-06-24T20:16:37.808Z] ----------------------------------------------------------------------
[debug] [2020-06-24T20:16:37.810Z] Command:       C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\firebase-tools\lib\bin\firebase.js functions:shell
[debug] [2020-06-24T20:16:37.811Z] CLI Version:   8.4.3
[debug] [2020-06-24T20:16:37.811Z] Platform:      win32
[debug] [2020-06-24T20:16:37.811Z] Node Version:  v10.18.1
[debug] [2020-06-24T20:16:37.812Z] Time:          Wed Jun 24 2020 17:16:37 GMT-0300 (Atlantic Daylight Time)
[debug] [2020-06-24T20:16:37.812Z] ----------------------------------------------------------------------
[debug] [2020-06-24T20:16:37.812Z] 
[debug] [2020-06-24T20:16:37.822Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-06-24T20:16:37.823Z] > authorizing via signed-in user
[debug] [2020-06-24T20:16:37.823Z] [iam] checking project rtiwebservices for permissions ["firebase.projects.get"]
[debug] [2020-06-24T20:16:37.827Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/rtiwebservices:testIamPermissions  
 {"permissions":["firebase.projects.get"]}
[debug] [2020-06-24T20:16:38.208Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Wed, 24 Jun 2020 20:16:35 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=182","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-06-24T20:16:38.209Z] >>> HTTP REQUEST GET http://localhost:4400/emulators  
 
[debug] [2020-06-24T20:16:40.215Z] Error: connect ECONNREFUSED 127.0.0.1:4400
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[error] 
[error] Error: Server Error. connect ECONNREFUSED 127.0.0.1:4400