【发布时间】: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 现在看起来像这样:
<widget><access origin="http://*.firebaseio.com" /> <access origin="https://*.firebaseio.com" /> <access origin="https://firebaseio.com" /> <access origin="http://firebaseio.com" /></widget>. -
添加了
subdomains="true",就像stackoverflow.com/questions/22383281/…中的建议一样,再次失败。