【问题标题】:Genymotion emulator: Can't connect to firebaseGenymotion 模拟器:无法连接到 Firebase
【发布时间】:2015-01-13 23:32:10
【问题描述】:

我正在使用 Cordova、Ionic 和 Firebase 构建一个应用程序。看起来 Genymotion 模拟器无法连接到 Firebase,虽然我将 Firebase 列入了白名单 - 但它在 iOS 模拟器中工作(即使没有列入白名单)。

我的 config.xml:

<widget>
    <access origin="https://correctname.firebaseio.com" />
</widget>

我做错了什么?

我发现的只有 Why is Firebase returning 404 errors in PhoneGap app when running on Android emulator?http://docs.phonegap.com/en/3.0.0/guide_appdev_whitelist_index.md.html

【问题讨论】:

  • *.firebaseio.com和/或firebaseio.com列入白名单是否有效?此外,您可以尝试使用 Firebase.enableLogging(true, true) 启用日志记录,这对于调试连接问题通常很有用。
  • 很遗憾没有。日志只显示“长轮询脚本加载失败:correctname.firebaseio.com”。我的 config.xml 现在看起来像这样:&lt;widget&gt;&lt;access origin="http://*.firebaseio.com" /&gt; &lt;access origin="https://*.firebaseio.com" /&gt; &lt;access origin="https://firebaseio.com" /&gt; &lt;access origin="http://firebaseio.com" /&gt;&lt;/widget&gt;.
  • 添加了subdomains="true",就像stackoverflow.com/questions/22383281/…中的建议一样,再次失败。

标签: cordova firebase ionic


【解决方案1】:

事实证明 Genymotion 的免费版本根本无法连接到互联网,显然是监督了这一点。如果我配置了正确的错误消息,我早就知道了。

【讨论】:

    猜你喜欢
    • 2016-10-09
    • 1970-01-01
    • 2020-07-14
    • 1970-01-01
    • 2014-12-20
    • 1970-01-01
    • 2021-04-29
    • 2014-01-29
    • 2014-12-12
    相关资源
    最近更新 更多