Meteor 1.3 Android Emulator

No cordva plugins. there were no errors in the network but now I’m having XMLHttpRequest CORS errors again, after adding crosswalk I deleted the build so it would rebuild itself. This sucks, I think I’m going to stick with 1.2.1 until I can figure this out. Have no issues with 1.2.1

Just had an idea: Do you override the generated config.xml through the cordova-build-override mechanism maybe? That would explain this, because you would be missing the right access rules (in particular <allow-navigation> for http://localhost:12088).

No, could the mdg:camera cause issues?

these are the packages I have installed

standard-app-packages
coffeescript
amplify
accounts-password
accounts-ui
underscore
jquery
natestrauser:font-awesome
less
arunoda:streams
mrt:mask
percolatestudio:fastclick
brentjanderson:buzz
mizzao:bootboxjs
alanning:roles
aldeed:collection2
gadicohen:sitemaps
wizonesolutions:canonical
mquandalle:jade
http
ground:db
accounts-twitter
service-configuration
github
facebook
accounts-github
meteorhacks:subs-manager
facts
meteorhacks:kadira
raix:handlebar-helpers
bozhao:accounts-instagram
matb33:collection-hooks
tmeasday:publish-with-relations
natestrauser:animate-css
pcel:loading
gwendall:body-events
chrismbeckett:toastr
mdg:geolocation
dfischer:prerenderio
email
aldeed:autoform-bs-datepicker
rajit:bootstrap3-datepicker
meteorhacks:aggregate
chart:chart
numeral:numeral
miro:mailchimp-lists
krstffr:fb-feed-getter
rzymek:fullcalendar
copleykj:jquery-autosize
momentjs:moment
risul:moment-timezone
risul:bootstrap-colorpicker
aldeed:autoform
dangrossman:bootstrap-daterangepicker@=2.1.13
meteorhacks:fast-render
launch-screen
sacha:spin
kadira:debug
nemo64:bootstrap
saucecode:timezoned-synced-cron
kadira:flow-router
kadira:blaze-layout
nimble:restivus
yasinuslu:blaze-meta
jparker:gravatar
utilities:avatar
accolver:twilio-meteor
chriswessels:hammer
accounts-facebook
cosmos:browserify
tmeasday:publish-counts
aldeed:simple-schema
rubaxa:sortable
aldeed:template-extension
copleykj:stripe-sync
natestrauser:connection-banner
bozhao:link-accounts
selaias:avatar-manager
standard-minifier-css
standard-minifier-js
mdg:camera
crosswalk

This is the config.xml that is generated

<?xml version="1.0"?>
<widget id="com.test.app" version="0.9.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>Test</name>
  <description>This is a test.</description>
  <author href="https://test.us" email="rey@test.us">Rey</author>
  <preference name="webviewbounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="AutoHideSplashScreen" value="false"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="5000"/>
  <preference name="FadeSplashScreenDuration" value="250"/>
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <preference name="StatusBarOverlaysWebView" value="false"/>
  <preference name="StatusBarStyle" value="default"/>
  <preference name="StatusBarBackgroundColor" value="#000000"/>
  <content src="http://localhost:12088/"/>
  <allow-intent href="tel:*"/>
  <allow-intent href="geo:*"/>
  <allow-intent href="mailto:*"/>
  <allow-intent href="sms:*"/>
  <allow-intent href="market:*"/>
  <allow-intent href="itms:*"/>
  <allow-intent href="itms-apps:*"/>
  <allow-navigation href="http://localhost"/>
  <access origin="*"/>
  <platform name="ios">
    <icon src="resources/iphone_2x.icon.png" width="120" height="120"/>
    <icon src="resources/iphone_3x.icon.png" width="180" height="180"/>
    <icon src="resources/ipad.icon.png" width="76" height="76"/>
    <icon src="resources/ipad_2x.icon.png" width="152" height="152"/>
    <icon src="resources/ipad_pro.icon.png" width="167" height="167"/>
    <icon src="resources/ios_settings.icon.png" width="29" height="29"/>
    <icon src="resources/ios_settings_2x.icon.png" width="58" height="58"/>
    <icon src="resources/ios_spotlight.icon.png" width="40" height="40"/>
    <icon src="resources/ios_spotlight_2x.icon.png" width="80" height="80"/>
    <splash src="resources/iphone_2x.splash.png" width="640" height="960"/>
    <splash src="resources/iphone5.splash.png" width="640" height="1136"/>
    <splash src="resources/iphone6.splash.png" width="750" height="1334"/>
    <splash src="resources/iphone6p_portrait.splash.png" width="1242" height="2208"/>
    <splash src="resources/iphone6p_landscape.splash.png" width="2208" height="1242"/>
    <splash src="resources/ipad_portrait.splash.png" width="768" height="1024"/>
    <splash src="resources/ipad_portrait_2x.splash.png" width="1536" height="2048"/>
    <splash src="resources/ipad_landscape.splash.png" width="1024" height="768"/>
    <splash src="resources/ipad_landscape_2x.splash.png" width="2048" height="1536"/>
  </platform>
  <platform name="android">
    <icon src="resources/android_mdpi.icon.png" width="48" height="48"/>
    <icon src="resources/android_hdpi.icon.png" width="72" height="72"/>
    <icon src="resources/android_xhdpi.icon.png" width="96" height="96"/>
    <icon src="resources/android_xxhdpi.icon.png" width="144" height="144"/>
    <icon src="resources/android_xxxhdpi.icon.png" width="192" height="192"/>
    <splash src="resources/android_mdpi_portrait.splash.png" width="320" height="470" density="port-mdpi"/>
    <splash src="resources/android_mdpi_landscape.splash.png" width="470" height="320" density="land-mdpi"/>
    <splash src="resources/android_hdpi_portrait.splash.png" width="480" height="640" density="port-hdpi"/>
    <splash src="resources/android_hdpi_landscape.splash.png" width="640" height="480" density="land-hdpi"/>
    <splash src="resources/android_xhdpi_portrait.splash.png" width="720" height="960" density="port-xhdpi"/>
    <splash src="resources/android_xhdpi_landscape.splash.png" width="960" height="720" density="land-xhdpi"/>
    <splash src="resources/android_xxhdpi_portrait.splash.png" width="1080" height="1440"/>
    <splash src="resources/android_xxhdpi_landscape.splash.png" width="1440" height="1080"/>
  </platform>
</widget>

No, I don’t think mdg:camera would be causing this. There are a lot of packages in there I don’t know, so one of those might be causing trouble, but there is nothing that jumps out.

Googling ‘The connection to the server was unsuccessful’ and Cordova does turn up one other thing we could try. It turns out Cordova has its own timeout mechanism that could be triggered by a really slow load.

Could you try adding this to your mobile-config.js:

App.setPreference("LoadUrlTimeoutValue", 60000);
2 Likes

That did the Trick !!! Thank you so much

1 Like

Great, I’m glad that helped! But worried that it is needed, which means page load was taking over 20 seconds. Has this always been that slow?

No, I’m not sure what is holding it back. I haven’t migrated to imports style yet but will do soon.

I don’t think imports will help with this.

Are you using any external resources (scripts, stylesheets, fonts, etc.) as part of your app, that would have to be loaded from a remote server?

Yes, stripe,stripe checkout, Facebook connect , bootstrap

I don’t know how those are added to the page, but if you have the ability to change script tags to async (making sure to only access those features when the scripts have been loaded), that might make a huge difference in startup time.

And for bootstrap, it would make more sense to add it locally (there are packages for that) instead of downloading it from a CDN (if that is indeed what you are doing).

1 Like

True, I’ll fix the bootstrap one ASAP. I’ll look into stripe, that one has always been a bit of pain.