firebase首先在IOS上调用非常慢

时间:2016-09-16 01:14:59

标签: firebase ionic2

对firebase的第一次调用非常慢> 10秒,发生一些网络错误。我分叉了回购再现问题:https://github.com/frankpolkm/ionic-conference-app

它只是在driftyco / ionic-conference-app演示应用程序中添加了firebase。请查看https://github.com/frankpolkm/ionic-conference-app/blob/master/app/app.ts

中的代码更改

这是控制台日志。添加firebase之前没有网络错误。

0     104436   log      DEVICE READY FIRED AFTER, 1308, ms
1     104725   log      Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
2     104842   time     signInAnonymously
3     105151   debug    swiper initEvents, attach
4     109567   warn     Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
5     109568   warn     Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
6     110230   error    Error: Network Error, http://192.168.2.103:8100/build/js/zone.js, Line: 260
7     110230   error    Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred., http://192.168.2.103:8100/build/js/zone.js, Line: 260
8     115416   timeEnd  signInAnonymously
9     115416   log      signInAnonymously: 10574ms
10    115416   log      uid=mZevh2GdnyaNv1BSfnB78HC17di2
11    120419   error    Error: Network Error, http://192.168.2.103:8100/build/js/zone.js, Line: 260
12    120420   error    Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred., http://192.168.2.103:8100/build/js/zone.js, Line: 260

请让我知道我做错了什么。

谢谢, 弗兰克

1 个答案:

答案 0 :(得分:0)

<allow-navigation href="*" />添加到confix.xml文件中为我解决了这个问题。