Volleyball error: hostname not verified

I sometimes get this error when executing volleyball requests. This is strange because it sometimes works, and sometimes it doesn’t work.

com.android.volley.NoConnectionError: java.io.IOException: Hostname '--url--' was not verified

According to this: http://developer.android.com/training/articles/security-ssl.html this is related to checking the host name, but my ALWAYS API call works in the browser and, as I said earlier, sometimes it works on Android via Volley.

Has anyone experienced this before?

I have seen similar issues mentioned here, but none of them apply to Volley. All of them mainly indicate the use of NullHostNameVerifier ( java.io.IOException: hostname not verified ), which I do not know if it can be done on Volley ...

+4
source share
2 answers

I was getting the same error. In my case, all my HTTP requests will work correctly for bits, and then I get the exception "java.io.IOException: hostname not checked", regardless of what I did until I restarted the application.

It turns out that the system clock on my Android device is off for about 2 minutes, which caused the SSL check to fail.

As soon as I set the time on my Android device, the exception no longer occurred.

0
source

This answer may help someone. Verify that the API key for the android client exists on console.developers.google.com. In addition, add all the necessary lib files to the projects lib folder and the generated client files in the appspot folder.

0

Source: https://habr.com/ru/post/1524121/


All Articles