I have server and app built on meteor 1.8.1.
When I build the server with changed content in the public folder, if I had any browser open on the server URL, it refreshes and shows the updated public content.
But, android apps do not detect the update. Even if I close, run or uninstall+install, the app never detect update.
I have done a full meteor uninstall, install, reset, remove platform, add platform etc. Nothing works.
I have also added the “meteor add cordova:cordova-plugin-meteor-webapp@1.7.0”
Android log shows some errors like cordova.js not found in bundle etc.
The app works perfectly though. Just the HCP does not work on public folder content change.
08-19 16:07:16.775 24331 24331 W MeteorWebApp: Loading asset bundle from directory file:///android_asset/www/application
08-19 16:07:16.814 24331 24331 D MeteorWebApp: Initial bundle loaded dcbda88356768b5995eb01252953c33e8792f5ab
08-19 16:07:16.815 24331 24331 D MeteorWebApp: Detected new bundled version, removing versions directory if it exists
08-19 16:07:16.879 24331 24331 D CordovaWebViewImpl: >>> loadUrl(http://localhost:12712/)
08-19 16:07:16.895 24331 24331 D CordovaActivity: Started the activity.
08-19 16:07:16.900 24331 24331 D CordovaActivity: Resumed the activity.
08-19 16:07:16.907 24373 24410 I chromium: [INFO:library_loader_hooks.cc(51)] Chromium logging enabled: level = 0, default verbosity = 0
08-19 16:07:16.936 24331 24388 W MeteorWebApp: Asset / found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application
08-19 16:07:17.022 24331 24414 I chatty : uid=10312(com.quranerkotha.app) Chrome_InProcGp identical 2 lines
08-19 16:07:17.230 24331 24331 D CordovaWebViewImpl: onPageDidNavigate(http://localhost:12712/)
08-19 16:07:17.292 24331 24402 W MeteorWebApp: Asset /__cordova/a8716fc383e1d6798d1d2f74c7a1efa133561b90.css found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application
**08-19 16:07:17.296 24331 24402 W MeteorWebApp: Asset /cordova.js not found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application, no parent bundle**
**08-19 16:07:17.299 24331 24402 W MeteorWebApp: Asset /__cordova/a8d580dfb116687d638680181d41e5be31e2912e.js found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application**
**08-19 16:07:17.369 24331 24388 W MeteorWebApp: Asset /cordova_plugins.js not found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application, no parent bundle**
**08-19 16:07:17.380 24331 24388 W MeteorWebApp: Asset /plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js not found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application, no parent bundle**
**08-19 16:07:17.383 24331 24388 W MeteorWebApp: Asset /plugins/cordova-plugin-statusbar/www/statusbar.js not found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application, no parent bundle**
**08-19 16:07:17.390 24331 24388 W MeteorWebApp: Asset /plugins/cordova-plugin-splashscreen/www/splashscreen.js not found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application, no parent bundle**
08-19 16:07:17.396 24331 24388 W MeteorWebApp: Asset /plugins/onesignal-cordova-plugin/www/OneSignal.js not found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application, no parent bundle
08-19 16:07:18.295 24331 24331 D CordovaWebViewImpl: onPageFinished(http://localhost:12712/)
08-19 16:07:18.360 24331 24386 W MeteorWebApp: Asset /index/index.html found in bundle dcbda88356768b5995eb01252953c33e8792f5ab:file:///android_asset/www/application
08-19 16:07:18.372 24331 24331 D SystemWebChromeClient: http://localhost:12712/__cordova/a8d580dfb116687d638680181d41e5be31e2912e.js?meteor_js_resource=true: Line 135 : Application startup
08-19 16:07:18.376 24331 24331 D SystemWebChromeClient: http://localhost:12712/__cordova/a8d580dfb116687d638680181d41e5be31e2912e.js?meteor_js_resource=true: Line 135 : Initialize onesignal
08-19 16:07:18.440 24331 24435 W PluginManager: THREAD WARNING: exec() call to OneSignalPush.init blocked the main thread for 59ms. Plugin should use CordovaInterface.getThreadPool().
08-19 16:07:18.443 24331 24331 D SystemWebChromeClient: http://localhost:12712/__cordova/a8d580dfb116687d638680181d41e5be31e2912e.js?meteor_js_resource=true: Line 135 : Initialized onesignal
I tried calling WebAppLocalServer.checkForUpdates(); manually. But I can see this exception:
08-19 16:07:19.368 24331 24445 W MeteorWebApp: Download failure
08-19 16:07:19.368 24331 24445 W MeteorWebApp: com.meteor.webapp.WebAppException: Error parsing asset manifest
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at com.meteor.webapp.AssetManifest.<init>(AssetManifest.java:80)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at com.meteor.webapp.AssetBundleManager$1.onResponse(AssetBundleManager.java:112)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: at java.lang.Thread.run(Thread.java:764)
08-19 16:07:19.368 24331 24445 W MeteorWebApp: Caused by: org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
The app is definitely connected to the server. I can call APIs on the server. So, the server is running and receiving calls from the apps.