Home » Java » Firefox “breaks” while uploading

Firefox “breaks” while uploading

Posted by: admin October 26, 2017 Leave a comment


There is a form that allows for a file to be uploaded together with some text inputs. Sometimes on Firefox the upload never finishes and gets stuck on read:

at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
- locked [email protected]
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
- locked [email protected]
at com.caucho.vfs.SocketStream.read(SocketStream.java:187)
at com.caucho.vfs.ReadStream.read(ReadStream.java:478)
at com.caucho.server.http.ContentLengthStream.read(ContentLengthStream.java:79)
at com.caucho.vfs.ReadStream.read(ReadStream.java:478)
at com.caucho.server.http.ServletInputStreamImpl.read(ServletInputStreamImpl.java:79)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:977)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at org.apache.commons.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:125)
at java.io.FilterInputStream.read(FilterInputStream.java:107)

After a while I try to cancel the upload. The user clicks somewhere in the page, a confirmation box is opened to cancel the upload but the request does not leave Firefox.
Any action on any page in Firefox (different sites) won’t do anything. Clicking on a simple link won’t do anything even if there is no connection the site where the upload was performed.

So basically my problem is that anything on Firefox stops working because of this upload. Different menus on pages still appear when you hover over then but nothing happens if you try to click on them.

(This only happens on Firefox (52+) and works well on Chrome, IE, Safari). Affects just some users and it’s very random. To get out of it you need to force close Firefox because nothing else will work.