【问题标题】:Uncaught Error: This Firebase project requires import into Google Cloud Platform to resume service未捕获的错误:此 Firebase 项目需要导入 Google Cloud Platform 才能恢复服务
【发布时间】:2018-04-20 09:18:50
【问题描述】:

出现此未捕获的错误:此 Firebase 项目需要导入 Google Cloud Platform 才能恢复服务。 当我尝试通过 Webrtc 进行视频通话时。

我得到了这个网址-https://firebase.google.com/support/guides/firebase-web#import_your_project_to_the_firebase_console

但我不想将我的项目上传到云端。

【问题讨论】:

    标签: firebase webrtc simplewebrtc openwebrtc openwebrtcdemo


    【解决方案1】:

    我得到了解决方案。 转到此 url https://console.firebase.google.com/ 并以 gmail 帐户登录。 点击“添加项目” 你会得到这样的页面 See this image

    之后,您将获得像这样创建的项目 See this image

    现在点击项目。您将重定向到 firebase 项目概览页面。点击“将 Firebase 添加到您的网络应用”。 See this image

    你会得到这个代码

    apiKey: "******************************", authDomain: "****-****", 数据库URL:“****-****”, 项目编号:“****-****”, storageBucket: "****-*****", messagesSenderId: "************"

    See this image

    复制 databaseURL 并替换为定义 firebase url 或代码的 webrtc 代码。

    你可能会在 webrtc 代码中得到这样的结果

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

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

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

    请删除''中的****

    现在点击左侧的数据库选项并选择“实时数据库”

    See this image

    现在单击“规则”选项卡并更改“读写”值。两个值都应为“真”。 See this image

    现在检查您的 webrtc 咨询。这将在没有 firebase 错误的情况下运行。

    【讨论】:

      猜你喜欢
      • 2018-05-19
      • 2019-02-09
      • 2020-02-23
      • 2019-03-28
      • 2021-12-13
      • 2016-04-08
      • 2021-09-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多