Rahul Matte Rahul Matte - 1 month ago 44
Android Question

WebSocket is closed before the connection is established in Android 4.2

My

WebView
app has file download link with
download
attribute in anchor tag,

<a href="path/to/the/file" download>


I am using
socket.io
in my
WebView
. In Android 4.4.2, I am able to download the file without any
socket.io
interruption but in Android 4.2 webview, I have got below error

Error:

E/Web Consoleļ¹• WebSocket is closed before the connection is established.:0

Answer

Accidentally I changed socket.io version. After reverting to older version it started working.