ModusCreateOrg / ionic-vue

Vuejs integration for Ionic versions 4 and 5
MIT License
272 stars 26 forks source link

Navigation error on Android 6 #132

Closed NunoSav closed 4 years ago

NunoSav commented 4 years ago

I'm upgrading a @ionic/vue project to @modus/ionic-vue and so far i've found this one error when going back in navigation. I can push new routes just fine, it's just the going-back that throws the following error: Uncaught (in promise) TypeError: r.scrollTo is not a function

This only happens on Android 6, i've also tested iOS(latest) and Android 9.

Possible reason (source):

Also, Capacitor requires an Android WebView with Chrome version 50 or later. On Android 5 and 6, the Capacitor uses the System WebView. On Android 7+, Google Chrome is used.

Any help is appreciated, thanks.

NunoSav commented 4 years ago

I fixed this issue by updating Android System Webview through Play Store. This however means that customers using the app with a outdated webview will run into issues. Is it possible to add a check for scrollTo existence?

michaeltintiuc commented 4 years ago

Thanks for reporting this @NunoSav could you share what version of @modus/ionic-vue are you running and perhaps sharing example code and/or a stacktrace? I have lead, but would like to confirm the version first, perhaps you're landing on a route that doesn't have ion-content or some other edge case is causing scrollElement to evaluate to false, either way it's a logic mistake on my part, it's a quick fix https://github.com/ModusCreateOrg/ionic-vue/blob/master/src/router.ts#L132

NunoSav commented 4 years ago

I also thought this could be related to Capacitor so i opened an issue with them (closed now) and created a sample. Here it is. Hope it helps.

michaeltintiuc commented 4 years ago

@NunoSav give it a try with 1.3.10 please and let me know

NunoSav commented 4 years ago

The only physical device that i have running with Android 5/6 has the System Webview updated so i'll try emulator for now. In the next week or so i will receive a Android 5 phone and will test with it as well.

Thanks for the effort.

Edit: I've tried 1.3.10 with emulator and had no issues, perhaps i should try with 1.3.9 also to check if it throws error. Otherwise it means emulators come with all the latest updates.

Edit 2: 1.3.9 also run fine on emulator (API 22) so i guess the Webview is up to date

michaeltintiuc commented 4 years ago

@NunoSav I don't think it's related to webview or devices, pretty sure that was just a logic error on my part, but let me know if it comes back. Thanks for the tests!