2

in my build.gradle I have some thing like that:

productFlavors {
    dev {
      buildConfigField "String", "BASE_URL", '"https://uat_mobile.xxxxx.com/something/rest/json/"'
    }
}

the problem is when I try to call a WS I have this error which appears because of underscore in url:

javax.net.ssl.SSLHandshakeException: java.lang.IllegalArgumentException: Invalid input to toASCII: uat_mobile.xxxxx.com

What is the workaround to this problem please ?

In advance thank you,

O. Boujaouane
  • 285
  • 5
  • 18
  • subdomains are not allowed to have an underscore – Tim Jul 20 '17 at 11:34
  • https://stackoverflow.com/a/14622263/115145 "So underscores in hostnames are a no-no, underscores in domain names are a-ok." What you have here is a hostname, used in a URL. – CommonsWare Jul 20 '17 at 11:36

1 Answers1

3

I have faced this issue at my organization, they used underscore "_" for sub-domains, I did a workaround for it you can try the following:

  • Open your terminal or console command line app.
  • Type:

    ping mohammedfathy.wordpress.com

    PING lb.wordpress.com (192.0.78.12) 56(84) bytes of data.

  • Use "lb.wordpress.com" instead it will re-route to the same link. Also sometimes you can use the IP instead of the link, those steps always works with me.

Mohammed Fathy
  • 357
  • 2
  • 10