http failure response for (unknown url) 0 unknown error ionic 3

How to resolve MongoDB error errno:111 Connection refused or “exit-code”
August 17, 2019

http failure response for (unknown url) 0 unknown error ionic 3

Update config.xml file

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

network_security_config.xml inside resources/android/ folder


<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
   <base-config cleartextTrafficPermitted="true">
       <trust-anchors>
           <certificates src="system" />
       </trust-anchors>
   </base-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain>api.mydomain.in</domain>
    </domain-config>
</network-security-config>

Leave a Reply