Meteor 1.0.3.1 Cordova hung loading (aka blank page) on iOS and Android

418 views
Skip to first unread message

Derek Gransaull

unread,
Feb 6, 2015, 1:46:03 AM2/6/15
to meteo...@googlegroups.com
I've been experiencing this for the last couple of days ... but just with my app ... not with a plain meteor starter app or with the localmarket.

I've been working on an app for desktop and mobile users, but had been targeting the mobile browser in both standard "browser" mode and "full-screen" mode. Two days ago after looking at a video (from August 2014) of Slava and company demoing Cordova integration I decided to try Cordova.

I followed the instructions in the MDG wiki to add the cordova infrastructure to my environment and my app. However, when ever I do

$ meteor run ios
$ env USE_GLOBAL_ADK=t meteor run android
$ meteor run ios-device
$ env USE_GLOBAL_ADK=t meteor run android-device

I end up with an app that launches but never loads, i.e. just the generic splash and the spinner spinning endlessly on iOS, and a blank white page on Android.

When I inspect the stuck page all that's there is this:

<html>
   <head>
     <script type="text/javascript" src="cordova.js"></script>
     <script type="text/javascript" src="meteor_cordova_loader.js"></script>
     <script src="file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxappnamexxx.app/www/cordova_plugins.js"></script>
     <script src="file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxappnamexxx.app/www/plugins/org.apache.cordova.console/www/console-via-logger.js"></script>
     <script src="file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxappnamexxx.app/www/plugins/org.apache.cordova.console/www/logger.js"></script>
     <script src="file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxappnamexxx.app/www/plugins/org.apache.cordova.splashscreen/www/splashscreen.js"></script>
     <script src="file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxappnamexxx.app/www/plugins/org.apache.cordova.statusbar/www/statusbar.js"></script>
     <script src="file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxappnamexxx.app/www/plugins/org.apache.cordova.inappbrowser/www/inappbrowser.js"></script>
  </head>
    <body>
      <iframe src="gap://ready" style="display: none;"></iframe>
    </body>
</html>

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The iOS related logs all end the same way as the others above:

I20150205-21:53:06.208(-8)? (ios) Multi-tasking -> Device: YES, App: YES

I20150205-21:53:06.209(-8)? (ios) Unlimited access to network resources

I20150205-21:53:06.209(-8)? (ios) 

I20150205-21:53:06.209(-8)? (ios) 

I20150205-21:53:06.209(-8)? (ios) Started backup to iCloud! Please be careful.

I20150205-21:53:06.209(-8)? (ios) Your application might rejected by Apple if you store too much data.

I20150205-21:53:06.209(-8)? (ios) For more information please read "iOS Data Storage Guidelines"

I20150205-21:53:06.209(-8)? (ios) You could find it at the following address https://developer.apple.com/icloud/documentation/data-storage/ .

I20150205-21:53:06.209(-8)? (ios) 

I20150205-21:53:06.677(-8)? (ios) [CDVTimer][splashscreen] 86.992025ms

I20150205-21:53:06.679(-8)? (ios) [CDVTimer][statusbar] 2.152026ms

I20150205-21:53:06.679(-8)? (ios) [CDVTimer][TotalPluginStartup] 89.426994ms

I20150205-21:53:06.757(-8)? (ios) Resetting plugins due to page load.

I20150205-21:53:06.817(-8)? (ios) Finished load of: file:///Users/xxxxxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/8CC2030D-1009-4461-8A45-BB5C541E05F1/xxxxxxxxxx.app/www/index.html

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

On the Android emulator side, the logs end like this:

BUILD SUCCESSFUL

Total time: 5 seconds

Installing app on emulator...

Using apk: /Users/xxx/yyy/zzz/Meteor/xxxappnamexxx/.meteor/local/cordova-build/platforms/android/ant-build/xxxappnamexxx-debug-unaligned.apk

Launching application...

LAUNCH SUCCESS

Command finished with error code 0: /Users/xxx/yyy/zzzr/xxx appname xxx/.meteor/local/cordova-build/platforms/android/cordova/run --emulator

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

By contrast, with a plain meteor starter app or with the localmarket app, we have a ton of stuff like this after the loading of the index.html file:

I20150205-19:41:22.366(-8)? (ios) Market[215:13424756] METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Error reading version file Error: Failed to resolve entry: file:///Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Data/Application/675F8E98-9946-40E4-8F55-54B27F5DF977/Library/NoCloud/meteor/version

I20150205-19:41:22.367(-8)? (ios) Market[215:13424756] METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Couldn't load from the manifest, falling back to the bundled assets.

I20150205-19:41:22.367(-8)? (ios) Market[215:13424756] start serving (

I20150205-19:41:22.368(-8)? (ios)     "/Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/AF8D1BF6-1032-4CF3-B951-4AD7EF335127/Local Market.app/www/application/",

I20150205-19:41:22.368(-8)? (ios)     "/Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/AF8D1BF6-1032-4CF3-B951-4AD7EF335127/Local Market.app/www/"

I20150205-19:41:22.368(-8)? (ios) )

I20150205-19:41:22.368(-8)? (ios) Market[215:13424756] METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Loading from url: http://meteor.local

I20150205-19:41:22.370(-8)? (ios) Market[215:13424756] Resetting plugins due to page load.

I20150205-19:41:22.373(-8)? (ios) Market[215:13424810] METEOR CORDOVA DEBUG loading filepath: /Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/AF8D1BF6-1032-4CF3-B951-4AD7EF335127/Local Market.app/www/application/index.html for path: %2F

I20150205-19:41:22.395(-8)? (ios) Market[215:13424810] METEOR CORDOVA DEBUG loading filepath: /Users/xxx/Library/Developer/CoreSimulator/Devices/0911B087-79F0-48D7-8C31-5D9D1E089AA1/data/Containers/Bundle/Application/AF8D1BF6-1032-4CF3-B951-4AD7EF335127/Local Market.app/www/application/5cdb73159f700138333d1b04069feefec11757a2.css for path: %2F5cdb73159f700138333d1b04069feefec11757a2.css

.... tons more 'loading filepath' stuff ...

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Note there are not fatal errors during build, load, or run.

So, on the same system--OS X 10.10.2 with XCode 6.1.1, and Meteor 1.0.3.1--two apps build, load, and run just fine, and my target app does not. It looks like there's something associated with my app structure or content that is contributing to this behavior. There are two other threads where posters report some similar behavior, but in a different context, and neither of those threads end nor contain a definitive explanation of why/how this silently (no fatal errors) failed app loading is happening. So, I'm wondering if:

  • anyone else has encountered this behavior (hung loading/blank page) with an existing code base that was "converted" to use cordova
  • anyone knows why this behavior happens
  • anyone knows how to resolve it

Thanks!


Derek Gransaull

unread,
Feb 6, 2015, 2:56:51 PM2/6/15
to meteo...@googlegroups.com
It turns out this is due to my having itemized the meteor-platform in my .meteor/packages file. I needed Fastclick for the web app (prior to giving Cordova a try). I discovered that the Fastclick included in meteor-platform was only exported to the Cordova case. So I thought I had to remove meteor-platform and list each of the individual meteor-platform packages, except for Fastclick, then do a meteor add fastclick in order to get it for the web app case. Then, when I decided to give Cordova a try, meteor-platform was still in its itemized state in my packages file. Throw a process of elimination, I discovered that this itemization of meteor-platform causes the silent failure in cordova case.

I imagine this is an edge case, but it's out there. ;-)
Reply all
Reply to author
Forward
0 new messages