(Solved) XHR request been canceled ( on Android 6.0 device )

When using Capacitor 6.0 with Angular 18 on Android 6.0 devices, some XHR requests are getting canceled.

Observations:

Additional Notes:

  • The issue does not occur on Android 7+ devices. Only on Android 6 device
1 Like

The three that are working use Google for their SSL. The two that aren’t use Let’s Encrypt.

Let’s Encrypt changed their chain of trust earlier this year and looks like Android 6 doesn’t have the root cert in its certificate store and therefore the certs for the sites that don’t work cannot be trusted/validated. This is my guess :slight_smile:

I bet if you go to https://api.agify.io in the browser on the Android 6 device you’ll get an SSL error.

I have to ask, who still uses Android 6? :joy: It was released nine years ago.

Sources

2 Likes

Hi Thanks for the hint. I think we’re finally on the right track to resolve this issue. Unfortunately old devices still been used by clients, can’t leave them behind :sweat_smile:

No prob! You should be able to add Let’s Encrypt’s root cert manually in Android.

There will be many devices in different cities. As long as our services are accessible, a solution to replace letsencrypt will be simpler. :grinning:

Yeah, if you own all of those services mentioned you could switch to a different SSL provider. Otherwise, you could use a relay server.

We solved this issue by using ZeroSSL. :sparkler:
Big Thanks for your help. :+1: :+1: :grin:

1 Like

I had exactly same error (cancelled request) with capacitor 5 , ionic 8 (and .net 8 rest api on backend) on android device, it was working fine on web browser

The problem was my rest api has not valid ssl and UseHttpsRedirection builder method. Even if i use http adress it was redirecting to https by backend and was getting cancelled request error. Luckly, i caught the error on chrome’s android debug panel and saw this topic :slight_smile: . The fix is just removing the UseHttpsRedirection method if you are going to use api’s http address.