Unsupported Realtime Database URL - FIREBASE FATAL ERROR: Cannot parse Firebase url
@lahirumaramba 已经在做这个了。
开始于 2024年6月5日。
评估
这个 Issue 还没有评估数据。
描述
[READ] Step 1: Are you in the right place?
- For issues related to the code in this repository file a Github issue.
- If the issue pertains to Cloud Firestore, read the instructions in the "Firestore issue"
template. - For general technical questions, post a question on StackOverflow
with the firebase tag. - For general Firebase discussion, use the firebase-talk
google group. - For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: Windows 11 23H2
- Firebase SDK version: ^12.1.0
- Firebase Product: Hosting and Realtime Database
- Node.js version: v20.11.1
- NPM version: 10.8.1
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
I follow this tutorial to set up the Hosting, Cloud Functions, and Realtime Database.
https://developers.home.google.com/codelabs/smarthome-washer#1
After deployment, I visited the site and got this error from the console.
Uncaught Error: FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com
at st (util.ts:172:9)
at Qt (parser.ts:88:5)
at Oi.databaseFromApp (RepoManager.ts:108:21)
at Qi.INTERNAL.registerComponent.z.setServiceProps.Reference [as instanceFactory] (index.ts:52:42)
at S.getOrInitializeService (provider.ts:190:33)
at S.getImmediate (provider.ts:95:29)
at q._getService (firebaseApp.ts:127:54)
at c.<computed> [as database] (firebaseNamespaceCore.ts:228:29)
at Object.i [as database] (firebaseNamespaceCore.ts:209:32)
at SmartHome.handleData (main.js:70:12)
I found that it is caused by const parsedUrl = parseDatabaseURL(dataURL) in parser.ts, it doesn't support the URL with 4 parts.
Firebase projects with Realtime Database in us-central1 region work fine (3 parts)
https://x.firebaseio.com
But other regions don't work (4 parts)
https://x.asia-southeast1.firebasedatabase.app
This is the code causing the error, I didn't modify it much from the example given in the tutorial
firebase.database().ref('/').child('washer').on("value", (snapshot) => {
...
- 主要语言
- TypeScript
- 星标
- 1.7k
- 派生
- 419
- 平均合并
- 4 天 20 小时
- 30 天内合并 PR
- 16
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-node 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3234 ·
-
firebase/firebase-admin-node#3221 · 3 条评论 · 已指派 1 人 ·
-
api: messaging
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-admin-node#3215 ·
-
api: messaging
难度 5/5 一周以上 新手友好度 28/100
firebase/firebase-admin-node#3214 ·
-
api: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 条评论 · 已指派 1 人 ·
查看 firebase/firebase-admin-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·