skip to Main Content

I had a fully functional app, properly working and had not issue. Today, I sent that app to one of my client as a demo app and client sent screenshot that app is not working and he had tried opening app on multiple device and getting same error but the strange thing is that the same app is working properly on all of my device without any issue.

Error : "com.android.volley.NOConnectionError :
java.net.UnknownHostException/; Unable to resolve host "urlpath" : No
address associated with host name"

One thing that in Error it’s not including the host name like eample.com but including the further path I used like I used https://example.com/urlpath, so it’s showing "urlpath".

Here’s the thing I had already Cross checked with the client:

  1. He is not using any VPN.
  2. Tried both with Mobile Data and WiFi Connection.
  3. Tried to open app in multiple device.
  4. Device not on airplane mode.
  5. Direct url on browser is opening in his device.
  6. My Website is SSL secured and even then I had enabled http traffic in app.

As I error does not came in any of my device I can’t have any logs of error. Help me With the Problem and Let me know if any further information is required.

2

Answers


  1. I guess this is internet error, did u give internet permission to ur app?

    Login or Signup to reply.
  2. If you are running your app Android P and above. Do the following changes in your app

    Add this to the manifest.xml:

    android:networkSecurityConfig="@xml/network_security_config"
    

    create @xml/network_security_config.xml – File

    <?xml version="1.0" encoding="utf-8"?>
    <network-security-config>
        <domain-config cleartextTrafficPermitted="true">
            <domain includeSubdomains="true">example.com</domain>
        </domain-config>
    </network-security-config>
    

    https://developer.android.com/training/articles/security-config

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search