androidwebview

Webview throws ERR_NAME_NOT_RESOLVED during logout


I have an application that loads through webview. I am able to login into application which has been launched through webview. But during logout, it keeps throwing ERR_NAME_NOT_RESOLVED error for the server it is sending logout request against.

When I do the same login/logout in regular browser on mobile, i still get the same error on browser. When I do the same login/logout in regular browser on PC, it works perfectly fine.

Not entirely sure if this is a webview using Chromium client issue or issue with server?


Solution

  • As you are facing this issue on both WebView & Mobile Web browser. This is certainly that website server issue.

    Web applications generally decide many things based on UserAgent Sting of browser

    You can check your user agent string using http://whatsmyuseragent.org/ It will be different for Desktop PC & Mobile Web Browser

    Sample user agent strings

    Desktop PC Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

    Mobile Browser: Mozilla/5.0 (Linux; Android 7.0; PLUS Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36

    To replicate issue on Desktop PC browser, you can use some UserAgent Switcher plugin, Switch to some mobile browser user agent and issue will be reproducible there as well

    One such plugin for Firefox Desktop browser is https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher-revived/