未知错误:此Firebase项目需要导入Google Cloud Platform以恢复服务 [英] Uncaught Error: This Firebase project requires import into Google Cloud Platform to resume service

查看:91
本文介绍了未知错误:此Firebase项目需要导入Google Cloud Platform以恢复服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遇到此未捕获的错误:此Firebase项目需要导入Google Cloud Platform以恢复服务.当我尝试通过Webrtc进行视频通话时.

Getting this Uncaught Error: This Firebase project requires import into Google Cloud Platform to resume service. When I am trying to conference video call through Webrtc.

我得到了这个网址- https://firebase.google.com/支持/指南/firebase-web#import_your_project_to_the_firebase_console

但是我不想将项目上传到云上.

but I don't want to upload my project on cloud.

推荐答案

我找到了解决方案.转到此URL https://console.firebase.google.com/并以gmail帐户登录.点击添加项目"你会得到这样的页面查看此图片

I got the solution. Go to this url https://console.firebase.google.com/ and login as gmail account. Click on "Add Project" You will get page like this See this image

之后,您将获得如下创建的项目查看此图片

After that you'll get your created project like this See this image

现在单击项目.您将重定向到firebase项目概述页面.单击将Firebase添加到您的Web应用程序".查看此图片

Now click on project.You'll redirect to firebase project overview page.Click on "Add Firebase to your web app". See this image

您将获得此代码

apiKey:"**********************************",authDomain:"****-****",databaseURL:"****-****",projectId:"****-****",storageBucket:"****-*****",essagingSenderId:"************"

apiKey: "******************************", authDomain: "****-****", databaseURL: "****-****", projectId: "****-****", storageBucket: "****-*****", messagingSenderId: "************"

查看此图片

复制databaseURL并替换为定义了Firebase URL或代码的webrtc代码.

Copy databaseURL and replace with your webrtc code where firebase url or code is define.

您可能会在webrtc代码中看到类似的内容

You may get like this in webrtc code

openSocket:function(config){var channel = config.channel ||location.href.replace(//|:|#|%|.|[|]/g,'');var socket = new Firebase('####-####'+ channel);socket.channel =频道;socket.on("child_added",function(data){config.onmessage&&config.onmessage(data.val());});socket.send = function(data){this.push(data);};config.onopen&&setTimeout(config.onopen,1);socket.onDisconnect().remove();返回插座;}

openSocket: function(config) { var channel = config.channel || location.href.replace( //|:|#|%|.|[|]/g , ''); var socket = new Firebase('####-####' + channel); socket.channel = channel; socket.on("child_added", function(data) { config.onmessage && config.onmessage(data.val()); }); socket.send = function(data) { this.push(data); }; config.onopen && setTimeout(config.onopen, 1); socket.onDisconnect().remove(); return socket; }

替换
var socket = new Firebase('####-#####'+ channel);

Replace
var socket = new Firebase('####-#####' + channel);

var socket = new Firebase('**** databaseURL ****'+ channel);

var socket = new Firebase('****databaseURL****' + channel);

请删除"中的****

Please Remove **** in ''

现在,单击左侧的数据库选项,然后选择实时数据库"

Now Click on Database option which is placed in left side and select "Realtime Database"

查看此图片

现在,单击规则"选项卡并更改读写"值.两个值均应为"true".查看此图片

Now Click on "Rules" Tab and change the "Read Write" value.Both value should "true". See this image

现在,请检查您的webrtc咨询.该咨询将在没有firebase错误的情况下运行.

Now Check your webrtc consultation.This will run without firebase error.

这篇关于未知错误:此Firebase项目需要导入Google Cloud Platform以恢复服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆