Ionic3 + HTTP call + Android 9.0.4

You cant use to generate free SSL on your own server.

1 Like

@VasuNagpal I expect your issue is to do with the bug in the latest version of Chrome ?

hi @richardshergold
not in chrome.

This apparently happen due to no SSL certificate.
was enough to work here

Try this it wil work for you.

<preference name="usesCleartextTraffic" value="true" />

Same problem with ionic 3 app and Android 9. Trying solution…

can you say where put this line?

Hola @derman10 esa linea la colocarias en en archivo config.xml, fijate q existen varias lineas q empiezan con la etiqueta

<preference name=“algo” value=“algo” /

antes de la linea

<platform name=“android”


Not only this did not work, but it made my app break in many devices.

If anyone is going to try this, be careful.
My app had never had more than 1 error or ANR on Google Play.
When I deployed the version with this fix, the errors raised to 62, affecting 11 users.

in config.xml, the root of the ionic project

I had same issue on Android 9 Devices. First I have tried with updating config.xml by adding the following:

<platform name="android">

        <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />

Still faced sames issue. My Webserver is enabled CORS. But Same issue.
After surfing on internet for a solution:

Updated the network_security_config.xml (resources/android/xml…) file with the following code

<?xml version="1.0" encoding="utf-8"?>
   <base-config cleartextTrafficPermitted="true">
           <certificates src="system" />
    <domain-config cleartextTrafficPermitted="true">

and now issue is solved… Please let me know if anyone facing the issues. Thank You


I have this issue please help me to solve this. Link

Domain name Add SSL certificate working!!!

1 Like


<uses-sdk android:targetSdkVersion="27" />

use this SDK version in your AndroidManifest.xml file and it will work in android 9.


Merci @suhailparad pour ta réponse, j’ai bien reçu à faire fonctionner sous ionic 5.2 et android 9
Post 23 super

Good afternoon.
If the same problem occurs, please correct this error by installing an ssl certificate in my domain. You can get a free ssl certificate for your domain, let’s encrypt.
It worked for me.

1 Like

Thanks alot this solved my problem

This worked for me. Thanks a lot :grinning:

When run android 8 API 27, it is working(subscribe out put success). But when run android 9 API 28, it is NOT working.(subscribe out put error) What is the reason for this? Please help me.

import { HttpClient, HttpHeaders, HttpErrorResponse } from ‘@angular/common/http’;
import { Component } from ‘@angular/core’;

selector: ‘app-home’,
templateUrl: ‘’,
styleUrls: [‘’],

export class HomePage {

constructor(public httpClient: HttpClient) { }

sendPostRequest () {

var headers = new HttpHeaders();
headers.append("Accept", 'text/plain');
headers.append('Content-Type', 'text/plain; charset=utf-8');

const requestOptions = { headers: headers };

this.httpClient.get("", requestOptions)

  .subscribe(result  => {
    alert("okkkkkkkk " + result );
  }, error => {
    alert("Error 6 " + error.error + " \n" + error.message + " \n" + error.names);




<?php header("Access-Control-Allow-Origin: *"); echo '{ "con_ststus": true, "msg":"network connection sucessful." }'; ?>

merci cher ami ! j’avais ce problème depuis 2 semaines et sans réponse mais la ça marche mieux avec android 9 . sois même bénis :crossed_fingers: