hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
408 stars 51 forks source link

Links don't load past first screen on emulator using API 32 and under #257

Closed connorbey13 closed 1 year ago

connorbey13 commented 1 year ago

I've been building using an API 33 emulator for a while which works fine. I started to test older versions and on API 32 and under, the first screen loads but clicking a link shows an infinite spinning wheel. Rails gives a 200 OK but on the Android app it doesn't proceed past visitLocation, never executing visitStarted. I've built the app using the basic setup in the docs guide, so nothing out of the ordinary. I also tested using the Demo app plugging in 10.0.2.2 and the same thing. So I assume it is a bug when using 10.0.2.2 not receiving the response properly. Or maybe something with my Rails app is causing it but seems unlikely. The issue may even be a bug within the latest macOS.

I bought a cheap physical device that uses API 30 and everything works there. So no worries and maybe others are having this issue. Would be nice to emulate and test the other versions though.

System macOS ARM 13.0.1 Android Studio 2022.2.1 Patch 1 ruby 3.2.0 rails 7.0.4.2 turbo-rails 1.3.3

jayohms commented 1 year ago

I'm not aware of others broadly having issues on older platform versions, so it could be due to a couple things:

sedubois commented 1 year ago

@jayohms you mentioned Please make sure that the Android System WebView app installed on the device/emulator is updated to a recent Chromium version. How/where to do that in the emulator?

I've also encountered the web view infinite spinning wheel when testing from Android Studio on emulators with lower API levels (24-27). But the emulators I managed to run (mostly Pixel 6 Pro) don't have Play Store available and I don't find any app called "Chromium" in their lists of apps. (There is just an app called "WebView Shell" which has version 1.0.)

In Android Studio's Device Manager, when selecting Create Device, only some devices such as the Pixel 4 or Nexus 5X have an indicator that they support Play Store, which might offer a way to ensure the WebView app is the most recent. But when selecting such an emulator device, then in the next screen titled System Image I found no API 24-27 system image supporting Google Play and which can run on my Macbook M2. Only the x86 images have Google Play available, but they don't start at all on my machine (for example I tried Release Name: Nougat - API level: 24 - ABI: x86 - Target: Android 7.0 (Google Play)).

NB:

And how to locate the emulator's "WebView app" to begin with, in order to check its version? How to upgrade it without Play Store?

So I haven't yet had success in seeing a working Turbo WebView in API 24-27. I need this to confirm that it works fine for our users, and also to be able to troubleshoot various other issues (not related to Turbo) they may be having with our app on those lower API levels. I'd be grateful for any suggestions 🙏.