问题描述
刚开始使用Firebase(伟大的概念顺便说一句),我注意到在Chrome控制台它报告WebSocket已关闭,建立连接之前它仍然工作但想知道为什么可能会发生 - 这是什么需要关注?
有趣的是,它确实有一个成功的websocket连接。
谢谢
这是一个已知的问题。 Firebase客户端尝试使用多种方法建立与Firebase服务器的实时连接。如果其中一个方法在WebSocket之前成功,我们取消WebSocket并且看到这个警告。您可以放心地忽略错误。
Just starting out with Firebase (great concept BTW) and I notice in the Chrome console it reports "WebSocket is closed before the connection is established"
It still works but wondered why that might be happening - is it anything to be concerned about?
Interestingly it does state there is a successful websocket connection.
Thanks
This is a known issue. The Firebase client attempts to establish a real-time connection to the Firebase servers using multiple methods. If one of those methods succeeds before the Websocket does, we cancel the Websocket and you see that warning. You can safely ignore the error.
这篇关于Firebase - WebSocket在连接建立之前关闭。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!