meteor / cordova-plugin-meteor-webapp

Cordova plugin that serves a Meteor web app through a local server and implements hot code push
MIT License
66 stars 74 forks source link

HCP: Android files are not loaded, iOS works #75

Open KennyHammerlund opened 5 years ago

KennyHammerlund commented 5 years ago

HCP on android works for 1.6.0 but breaks on 1.6.1+ The app reloads on a change but the new files are not used. The only error I see in the verbose logs is an SSR error from one of our GraphQL requests.

I wish I had more info but maybe someone else with a similar issue can input. This is an abbreviated log.

I20190221-13:26:10.444(-6)? 02-21 13:25:56.551 26707 26707 D MeteorWebApp: Initial bundle loaded 7bbc0e0053c40eb1721f94bd3936e7df54954f5c

I20190221-13:26:10.742(-6)? 02-21 13:26:10.754 26707 27022 D MeteorWebApp: Downloaded asset manifest for version: d89c18075b6e903e8e865ad206f9c959c6e15950
I20190221-13:26:10.746(-6)? 02-21 13:26:10.758 26707 27022 W MeteorWebApp: Loading asset bundle from directory file:///data/user/0/league.poolplayers.com/files/meteor/Downloading
I20190221-13:26:10.775(-6)? 02-21 13:26:10.786 26707 27022 D MeteorWebApp: Start downloading assets from bundle with version: d89c18075b6e903e8e865ad206f9c959c6e15950

I20190221-13:26:12.509(-6)? SSR Error /__cordova/ { Error: GraphQL error: No data was found.
...
I20190221-13:26:12.623(-6)? 02-21 13:26:12.635 26707 27025 D MeteorWebApp: Finished downloading new asset bundle version: d89c18075b6e903e8e865ad206f9c959c6e15950
I20190221-13:26:12.624(-6)? 02-21 13:26:12.636 26707 27025 I MeteorWebApp: Finished downloading d89c18075b6e903e8e865ad206f9c959c6e15950

I20190221-13:26:16.101(-6)? 02-21 13:26:16.111 26707 26916 I MeteorWebApp: Startup completed received. New good version is 7bbc0e0053c40eb1721f94bd3936e7df54954f5c
I20190221-13:26:16.150(-6)? 02-21 13:26:16.156 26707 26812 W MeteorWebApp: Asset /assets/global/img/logo.png found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:16.208(-6)? 02-21 13:26:16.219 26707 26826 W MeteorWebApp: Asset /__cordova/fonts/glyphicons-regular.woff2 found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:16.232(-6)? 02-21 13:26:16.243 26707 26826 W MeteorWebApp: Asset /favicon.ico found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:16.461(-6)? 02-21 13:26:16.471 26707 27022 D MeteorWebApp: Downloaded asset manifest for version: d89c18075b6e903e8e865ad206f9c959c6e15950
I20190221-13:26:16.461(-6)? 02-21 13:26:16.471 26707 27022 I MeteorWebApp: Skipping downloading pending version: d89c18075b6e903e8e865ad206f9c959c6e15950

I20190221-13:26:39.919(-6)? 02-21 13:26:39.928 26707 26916 I MeteorWebApp: Startup completed received. New good version is 7bbc0e0053c40eb1721f94bd3936e7df54954f5c
I20190221-13:26:39.960(-6)? 02-21 13:26:39.971 26707 26891 W MeteorWebApp: Asset /assets/global/img/logo.png found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:40.022(-6)? 02-21 13:26:40.033 26707 26891 W MeteorWebApp: Asset /__cordova/fonts/glyphicons-regular.woff2 found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:40.045(-6)? 02-21 13:26:40.055 26707 26891 W MeteorWebApp: Asset /favicon.ico found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:40.189(-6)? 02-21 13:26:40.199 26707 27022 D MeteorWebApp: Downloaded asset manifest for version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8
I20190221-13:26:40.190(-6)? 02-21 13:26:40.199 26707 27022 I MeteorWebApp: Skipping downloading pending version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8

I20190221-13:26:41.678(-6)? 02-21 13:26:41.687  7570  7938 W chromium: [WARNING:syncer_proto_util.cc(342)] Error posting from syncer: Response Code (bogus on error): 401 Content-Length (bogus on error): 5 Server Status: SYNC_AUTH_ERROR
I20190221-13:26:41.678(-6)? 02-21 13:26:41.687  7570  7938 W chromium: [WARNING:commit.cc(142)] Post commit failed

CHANGE HAPPENS - METEOR RESTARTS

I20190221-13:26:34.546(-6)? 02-21 13:26:34.557 26707 27022 D MeteorWebApp: Downloaded asset manifest for version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8
I20190221-13:26:34.550(-6)? 02-21 13:26:34.562 26707 27022 W MeteorWebApp: Loading asset bundle from directory file:///data/user/0/league.poolplayers.com/files/meteor/Downloading
I20190221-13:26:34.571(-6)? 02-21 13:26:34.583 26707 27022 D MeteorWebApp: Start downloading assets from bundle with version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8

I20190221-13:26:36.244(-6)? SSR Error /__cordova/ { Error: GraphQL error: No data was found.
...

I20190221-13:26:36.388(-6)? 02-21 13:26:36.399 26707 27237 D MeteorWebApp: Finished downloading new asset bundle version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8
I20190221-13:26:36.389(-6)? 02-21 13:26:36.400 26707 27237 I MeteorWebApp: Finished downloading 1e6802c359acc89919f6ff9eadcd556a5cc313c8

I20190221-13:26:39.919(-6)? 02-21 13:26:39.928 26707 26916 I MeteorWebApp: Startup completed received. New good version is 7bbc0e0053c40eb1721f94bd3936e7df54954f5c
I20190221-13:26:39.960(-6)? 02-21 13:26:39.971 26707 26891 W MeteorWebApp: Asset /assets/global/img/logo.png found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:40.022(-6)? 02-21 13:26:40.033 26707 26891 W MeteorWebApp: Asset /__cordova/fonts/glyphicons-regular.woff2 found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:40.045(-6)? 02-21 13:26:40.055 26707 26891 W MeteorWebApp: Asset /favicon.ico found in bundle 7bbc0e0053c40eb1721f94bd3936e7df54954f5c:file:///android_asset/www/application
I20190221-13:26:40.189(-6)? 02-21 13:26:40.199 26707 27022 D MeteorWebApp: Downloaded asset manifest for version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8
I20190221-13:26:40.190(-6)? 02-21 13:26:40.199 26707 27022 I MeteorWebApp: Skipping downloading pending version: 1e6802c359acc89919f6ff9eadcd556a5cc313c8
I20190221-13:26:40.197(-6)? 02-21 13:26:40.206 26707 26707 I chromium: [INFO:CONSOLE(29195)] "You may test your Stripe.js integration over HTTP. However, live Stripe.js integrations must use HTTPS.", source: http://localhost:12632/__cordova/packages/modules.js?hash=226ab44da71f0192be5765aa5d438cde92eb2937 (29195)
I20190221-13:26:40.271(-6)? 02-21 13:26:40.282 26707 26707 I chromium: [INFO:CONSOLE(29195)] "ServiceWorker registration failed: ", source: http://localhost:12632/__cordova/packages/modules.js?hash=226ab44da71f0192be5765aa5d438cde92eb2937 (29195)
I20190221-13:26:40.324(-6)? 02-21 13:26:40.332 26707 26707 I chromium: [INFO:CONSOLE(40233)] "graphql:Viewer", source: http://localhost:12632/__cordova/app/app.js?hash=cf12d684519038c2741c0e9ae54fb7577642585f (40233)
I20190221-13:26:40.325(-6)? 02-21 13:26:40.337 26707 26707 I chromium: [INFO:CONSOLE(29195)] "[object Object]", source: http://localhost:12632/__cordova/packages/modules.js?hash=226ab44da71f0192be5765aa5d438cde92eb2937 (29195)
I20190221-13:26:40.326(-6)? 02-21 13:26:40.337 26707 26707 I chromium: [INFO:CONSOLE(29195)] "[object Object]", source: http://localhost:12632/__cordova/packages/modules.js?hash=226ab44da71f0192be5765aa5d438cde92eb2937 (29195)
I20190221-13:26:40.327(-6)? 02-21 13:26:40.338 26707 26707 I chromium: [INFO:CONSOLE(29195)] "%cloaded in 283ms", source: http://localhost:12632/__cordova/packages/modules.js?hash=226ab44da71f0192be5765aa5d438cde92eb2937 (29195)
I20190221-13:26:40.329(-6)? 02-21 13:26:40.340 26707 26707 I chromium: [INFO:CONSOLE(40244)] "console.groupEnd", source: http://localhost:12632/__cordova/app/app.js?hash=cf12d684519038c2741c0e9ae54fb7577642585f (40244)
I20190221-13:26:41.678(-6)? 02-21 13:26:41.687  7570  7938 W chromium: [WARNING:syncer_proto_util.cc(342)] Error posting from syncer: Response Code (bogus on error): 401 Content-Length (bogus on error): 5 Server Status: SYNC_AUTH_ERROR
I20190221-13:26:41.678(-6)? 02-21 13:26:41.687  7570  7938 W chromium: [WARNING:commit.cc(142)] Post commit failed
benjamn commented 5 years ago

Have you tried updating to the latest Meteor beta version?

meteor update --release 1.8.1-beta.17
KennyHammerlund commented 5 years ago

Ben,

Thanks for reaching out we are on 1.8.0.2 now I will get a chance in the next couple of days to try the upgrade and see if it works then.

Nauzer commented 5 years ago

Hey @KennyHammerlund Interested to read back your findings for the test. For us using 1.8.1-beta.15+ seems to have solved all HCP issues but I'm curious to see if there might be any cases we've missed testing for.

Nauzer commented 5 years ago

@KennyHammerlund Any findings from your side on the HCP improvements of meteor beta/rc releases?

https://github.com/meteor/meteor/pull/10248 1.8.1-rc.1 seems to be the latest atm.

KennyHammerlund commented 5 years ago

In the process of going to 1.8.1 now. Running into some issues with the android build. I will let you know what we find.

KoenLav commented 5 years ago

@KennyHammerlund any update?

killerchip commented 5 years ago

I'm having the same issue, once I updated from cordova-plugin-meteor-webapp from 1.6.0 to 1.6.5. My current meteor version is 1.8.0.2. I will try with 1.8.1 and see how it goes.

ronaldso55 commented 5 years ago

We have upgraded cordova-plugin-meteor-webapp to 1.6.5 as a part of MeteorJS upgrade from 1.6.1 to 1.8.1 then HCP stopped working for Android while working perfectly fine in iOS. Can anyone provide some insights on what may have gone wrong?

Nauzer commented 5 years ago

I use 1.7.0 for cordova-plugin-meteor-webapp with Meteor release 1.8.1-issue-10516.0 and don't have any problems with HCP.

(Background: https://github.com/meteor/meteor/issues/10516)

ronaldso55 commented 5 years ago

My bad. I need to add the WebAppLocalServer.switchToPendingVersion call.

https://forums.meteor.com/t/meteor-1-8-1-released/48436

Cordova Hot Code Push mechanism is now switching versions explicitly with call to  WebAppLocalServer.switchToPendingVersion  instead of trying to switch every time a browser reload is detected. If you use any third party package or have your own HCP routines implemented be sure to call it before forcing a browser reload. If you use the automatic reload from the  Reload  meteor package you do not need to do anything. cordova-plugin-meteor-webapp PR #62 

RealHandy commented 5 years ago

I use 1.7.0 for cordova-plugin-meteor-webapp with Meteor release 1.8.1-issue-10516.0 and don't have any problems with HCP.

(Background: meteor/meteor#10516)

@Nauzer 1.7.0 plugin? The last release I see is 1.6.5 -- where is the 1.7.0? Thanks!