Yogendra
Yogendra

Reputation: 2234

How to open https:localhost for testing inside WebView app in emulator as getting ssl handshake issue

I am working on a website which will open inside WebView of android app. I wanted to test my website in emulator during development but since my website having https://localhost:3000, Emulator WebView App is unable to open it. Given error [ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -202.

Please help to open https://localhost:3000 inside emulator's WebView tester app.

Upvotes: 0

Views: 1005

Answers (1)

Nursultan Almakhanov
Nursultan Almakhanov

Reputation: 301

  • First of all create one common network: the best way is to share personal hotspot from your mobile phone.
  • After that you need to connect this personal hotspot from your emulator computer and local server computer. If you have one computer for both of them, that's ok.
  • Then you should get the IP address of the local server and in android method loadUrl add this IP:port. Example webView.loadUrl("http://xxx.xxx.xxx.xxx:3000/myPath")

Upvotes: 0

Related Questions