React应用Firebase 9.18.0调用Firestore报错:Service firestore not available
问题:Firebase 9.18.0 Firestore 请求失败,报错“Error: Service firestore is not available”
- 我的React Web应用使用
firebase 9.18.0npm包,数日前所有Firestore请求突然失败,报错信息为“Error: Service firestore is not available”。自上次正常运行后代码未做任何修改,为排除代码问题已回滚至首个提交版本。 - 尝试过所有同类问题的解决方案均无效,且从开发初期就一直在使用最新版Firebase。
- Firebase连接的Auth服务运行正常,可完成登录、登出操作。
- Firebase状态页面未显示任何服务故障,2天前提交给谷歌的工单至今未收到回复。已通过Firestore控制台确认集合仍存在,且最初编写Firestore获取代码时可正常运行。
- 尝试使用
@stripe/firestore-stripe-payments 0.0.6库替代firebase 9.18.0进行请求,仍出现相同错误。
求问如何联系谷歌解决此疑似系统问题?
基础代码流程
import { getFirestore, collection } from "firebase/firestore"; const fbApp = initializeApp(firebaseConfig); // 使用同一对象调用getAuth(fbApp)可正常工作 const firestore = getFirestore(fbApp); // 抛出"Error: Service firestore is not available"
补充验证:Auth服务正常运行
import { getFirestore, getAuth, collection } from "firebase/firestore"; const fbApp = initializeApp(firebaseConfig); const auth = getAuth(fbApp); // 可正常工作,能完成用户登录等操作 const firestore = getFirestore(fbApp); // 抛出"Error: Service firestore is not available"
Firebase配置(直接复制自控制台)
const firebaseConfig = { apiKey: "AI9ugIOBOupGHgTF345535OllGghyoGLjhILjhG76575WIc", authDomain: "flashlang-2.firebaseapp.com", projectId: "flashlang-2", storageBucket: "flashlang-2.appspot.com", messagingSenderId: "762856867559", appId: "1:762856867559:web:72c7d5e56dfd55d098c442", measurementId: "G-0FZLD3MDEB", };
Firestore集合状态截图

内容的提问来源于stack exchange,提问作者Byofuel
相关产品推荐
相关产品推荐

