IOS Docker and HCP


#1

I’m having issues get HCP working. I have deployed my app to a public AWS and also pushed the IOS app up to the app store. On the AWS server, the app is running in a docker container. The startup command is:

docker run -d -p 3000:80 --name ethui -e MONGO_URL=mongodb://$MONGO_IP -e ROOT_URL=http://x.x.x.x:3000 bitbucket.ciena.com/ethui

The problem is that the IOS app is not updating any html/css/js changes I have put on the client code. The web app updates fine. The IOS app is able to connect to the server and it is getting the correct data. The IOS app takes about 3 or 4 seconds to startup.

The IOS app was built using meteor build …/myAppBuilds/myBuild --server http://x.x.x.x:3000
Some settings info:

accounts-password 1.1.8 Password support for accounts
accounts-twitter 1.0.9 Login service for Twitter accounts
anback:bootstrap-validator 0.9.0 Bootstrap-validator Packaged for Meteor, see http://1000hz.github.io/bootstrap-validator
autopublish 1.0.7 (For prototyping only) Publish the entire database to all clients
blaze-html-templates 1.0.4 Compile HTML templates into reactive UI with Meteor Blaze
ecmascript 0.4.3 Compiler plugin that supports ES2015+ in all .js files
es5-shim 4.5.10 Shims and polyfills to improve ECMAScript 5 support
hot-code-push 1.0.4 Update the client in place when new code is available.
http 1.1.5 Make HTTP calls to remote servers
ian:accounts-ui-bootstrap-3 1.2.89 Bootstrap-styled accounts-ui with multi-language support.
iron:router 1.0.12 Routing specifically designed for Meteor
jonperl:accounts-linkedin 1.1.0 Login service for LinkedIn accounts
jquery 1.11.8 Manipulate the DOM using CSS selectors
meteor-base 1.0.4 Packages that every Meteor app needs
mizzao:bootboxjs 4.4.0 Programmatic dialog boxes using Twitter’s bootstrap modals
mobile-experience 1.0.4 Packages for a great mobile user experience
mongo 1.1.7 Adaptor for using MongoDB and Minimongo over DDP
pcel:loading 1.0.3 A beautiful loading splash screen (please-wait + spinkit bundle)
schiller:twit 0.0.3 Twitter API Client (REST & Streaming)
session 1.1.5 Session variable
standard-minifier-css 1.0.6 Standard css minifier used with Meteor apps by default.
standard-minifier-js 1.0.6 Standard javascript minifiers used with Meteor apps by default.
tracker 1.0.13 Dependency tracker to allow reactive callbacks
twbs:bootstrap 3.3.6 The most popular front-end framework for developing responsive, mobile first projects on the web.

From the xcode project …app/index.html:


#2

Any logs or errors in either the Xcode console or using Safari remote debugging?

Can you check if your server serves the Cordova manifest (/__cordova/manifest.json)?


#3

Thanks for your quick reply marti.

I checked the server and attached to the meteor docker container and there are no manifest.json files under a cordova directory. There is no files/directories named __cordova in the docker container

another thing to mention is I’m building the meteor docker container image using meteord…but…I’m not using the EthUI.tar.gz from the meteor build -server blablabla

my Dockerfile contents:
FROM meteorhacks/meteord:onbuild

I did try developer tools with the app running and menu was greyed out. “No Inspectable Applications”


#4

Did you try loading http://<host>/__cordova/manifest.json? The manifest.json is not served from disk as is but built up and kept in memory on the server.

If your device is connected through USB and running a development build, you should be able to remote debug it in Safari.

I’ve never used meteord, so I can’t help you with that.


#5

Yes, it does serve it up. Here’s a small sample of what was returned:

{
format: “web-program-pre1”,
manifest: [
{
path: “9d0e06701d1864b8e41ccf3719e4aed0d41f38c3.js”,
where: “client”,
type: “js”,
cacheable: true,
url: “/9d0e06701d1864b8e41ccf3719e4aed0d41f38c3.js?meteor_js_resource=true”,
size: 765560,
hash: “9d0e06701d1864b8e41ccf3719e4aed0d41f38c3”
},
{
path: “5bb2db2e22351de512a2fb07ef258647fa849f00.css”,
where: “client”,
type: “css”,
cacheable: true,
url: “/5bb2db2e22351de512a2fb07ef258647fa849f00.css?meteor_css_resource=true”,
size: 144668,
hash: “5bb2db2e22351de512a2fb07ef258647fa849f00”
},


#6

Any logs or errors in either the Xcode console or using Safari remote debugging?


#7

Here’s the log when running the buillt app from XCode:

016-04-29 12:44:45.417 EthUI[19420:15316038] Apache Cordova native platform version 4.1.0 is starting.
2016-04-29 12:44:45.418 EthUI[19420:15316038] Multi-tasking -> Device: YES, App: YES
2016-04-29 12:44:45.456 EthUI[19420:15316038]

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read “iOS Data Storage Guidelines” at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to “local” in the Cordova config.xml file

2016-04-29 12:44:45.568 EthUI[19420:15316038] Using WKWebView
2016-04-29 12:44:45.570 EthUI[19420:15316038] [CDVTimer][handleopenurl] 0.072002ms
2016-04-29 12:44:45.572 EthUI[19420:15316038] [CDVTimer][intentandnavigationfilter] 1.866996ms
2016-04-29 12:44:45.573 EthUI[19420:15316038] [CDVTimer][gesturehandler] 0.066996ms
2016-04-29 12:44:45.684 EthUI[19420:15316038] Serving asset bundle version: 79a8a455b3f5680d423b9d4f0e85bd8ee76eb068
[INFO] GCDWebServer started on port 12880 and reachable at http://localhost:12880/
2016-04-29 12:44:45.688 EthUI[19420:15316038] [CDVTimer][webapplocalserver] 113.728046ms
2016-04-29 12:44:45.694 EthUI[19420:15316038] [CDVTimer][statusbar] 6.044030ms
2016-04-29 12:44:45.788 EthUI[19420:15316038] [CDVTimer][splashscreen] 94.238997ms
2016-04-29 12:44:45.789 EthUI[19420:15316038] [CDVTimer][TotalPluginStartup] 219.354033ms
2016-04-29 12:44:46.846 EthUI[19420:15316038] Start downloading asset manifest from: manifest.json – http://54.186.50.217:3000/__cordova/
2016-04-29 12:44:46.846 EthUI[19420:15316038] THREAD WARNING: [‘WebAppLocalServer’] took ‘18.219971’ ms. Plugin should use a background thread.
2016-04-29 12:44:47.147 EthUI[19420:15317451] Downloaded asset manifest for version: b276053f1db4acb0053977f84dc7fc81357fa7a0
2016-04-29 12:44:47.148 EthUI[19420:15317451] Download failure: Skipping downloading new version because the Cordova platform version or plugin versions have changed and are potentially incompatible


#8

Well, here is your answer… Are your built app and the server running the same version of Meteor? Have there been any changes to the set of installed plugins?


#9

Yea, I saw that. I think the meteord that builds the docker container may be pulling down different package version that my dev environment. Maybe its better if I deploy the EthUI.tar.gz to production instead.

So, what you’re saying is that if anything changes in the meteor packages (version updates, etc), then all HCP are disabled?

Thanks,

Mike


#10

Only if changes to Meteor packages result in changes to Cordova plugins, or you add/remove/change Cordova plugins yourself.


#11

OK, that makes sense. We added twitter accounts ui package, so maybe that triggered a Cordova plugin change.