代码之家  ›  专栏  ›  技术社区  ›  Maciej Treder

无法使用Angular Universal和Firebase函数访问云Firestore后端[已关闭]

  •  1
  • Maciej Treder  · 技术社区  · 7 年前

    firebase serve ):

    constructor(private afs: AngularFirestore) {
         this.afs.doc<any>('myData').valueChanges().subscribe(resp => console.log(resp));
    }
    

    我遇到了与Firestore连接的问题:

    error: [2019-01-06T12:26:14.371Z] @firebase/firestore: Firestore (5.5.9): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds. This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.

    • @角度/火焰版本:^5.1.1
    • firebase版本:^5.7.2
    1 回复  |  直到 7 年前
        1
  •  1
  •   Mihaylov    7 年前

    如果您正在开发计算机上运行卡巴斯基防病毒软件,请检查此问题: Issue

    在这种情况下,关闭防病毒程序可能会有所帮助。 可能的解决办法: -首先也是最重要的一点:你必须检查你的firestore连接详细信息是否有效,以及你的应用程序是否真的试图连接到数据库。 -尝试使用以下命令记录firestore错误:firebase.firestore.setLogLevel('debug')。然后,您将能够提供有关您的问题的详细日志,这将有助于解决问题。 -你在为一个--prod构建服务吗?如果没有,试试看问题是否消失。

    推荐文章