Question: I have an android app that is used by several thousand users. And recently one user contacted me with a problem that his Instagram login page is not loading. He said that he does not use vpn or anything else that could in any way affect the Internet connection. I cannot understand what the reason for this behavior is, this is an isolated case out of many thousands.

[![enter image description here](https://i.stack.imgur.com/7PLbp.png)](https://i.stack.imgur.com/7PLbp.png)

This is how I start the loading:

```
webView.clearCache(true)
webView.clearFormData()
webView.clearHistory()
webView.clearSslPreferences()

webView.webViewClient = object : WebViewClient() {
          override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
              view.loadUrl(url)
              return false
          }

          override fun onLoadResource(view: WebView?, url: String?) {
              // some my code
          }
}

webView.settings.javaScriptEnabled = true
webView.settings.domStorageEnabled = true      
webView.settings.loadWithOverviewMode = true  
webView.settings.useWideViewPort = true      
webView.settings.userAgentString = InstagramClient.Configuration.current.webUserAgent

webView.post {
    run {
        webView.loadUrl("https://www.instagram.com/accounts/login/")
    }
}

```

The webUserAgent (if it matters):

```
val webUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS $osVersion like Mac OS X) " +
                "AppleWebKit/$webKitVersion (KHTML, like Gecko) $safariVersion"

```

I will be glad for any help!

Answer: 
The problem was with the webUserAgent. Apparently, for some reason, a crash may occur when loading the IOS agent on Android.

I just replaced the agent. For example here <https://developers.whatismybrowser.com/useragents/explore/operating_system_name/android/>
Try Using This library It will return you social Id & Name of the user

[Instagram Login Helper](https://github.com/aahanverma00710/InstagramLogin)