MadMac
MadMac

Reputation: 4871

Proxy error on android 6 device with ionic 4 app

I am getting the following error (see image) when running a very basic Ionic 4 / Capacitor app on an Android 6 device.

I think it is because the the Android system webview needs to be updated.
I don't have access to the device myself as it is with a client, all I have is an emulator. I can't seem to update the webview version on the emulator and I don't think this is possible so I can't replicate.

Capacitor states it should work with back to Android 5.1 if the webview is up to date. I am not that familiar with older Android devices.

https://play.google.com/store/apps/details?id=com.google.android.webview&hl=en

enter image description here

Capacitor docs: https://capacitor.ionicframework.com/docs/android/ **Note:**  Currently to use an Android Emulator you must use a system image of at least Android version 7.0 on API 24. This is due to the System WebView version not being able to be updated on emulators. Physical devices should work as low as Android 5.1 so long as they are kept updated.

Update:

I go the app to run on the device by removing all Capacitor plugins. How ever I still have several issues:

It appears even after updating the Android system webview via google play to the latest and updating google chrome it is still using an old version of the webview.
Here is the userAgent output:

Mozilla/5.0(Linux; Android 6.0; C72 Build/MRA58K; wv) AppleWebKit/537.36(KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119
Mobile Safari/537.36

The latest version on chrome is 73.0.3683.90 so it is way off. This is the device: https://www.chainway.net/Products/Info/42

Final Update:

I contacted the manufacturer of the device and they confirmed that the webview was locked to version 44 on the firmware.
They are look at providing an updated version of the firmware with a more recent webview version.

Also it was only the capacitor/core plugins that were not working. I could still use other 3rd party plugins such as a barcode reader.

If you are in the situation above I recommend using navigator.userAgent to determine the webview version as mentioned by @jcesarmobile in the comments below.

Upvotes: 1

Views: 854

Answers (1)

jcesarmobile
jcesarmobile

Reputation: 53301

Yes, if you send that link and they update the Android System WebView then the app should work fine.

Unless your customer is in China, Play Store doesn't work there.

Upvotes: 1

Related Questions