ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.15k stars 1.57k forks source link

Android App crashes when selecting an Image with ( java.net.SocketException) #2109

Open SiddhantSharma575 opened 1 week ago

SiddhantSharma575 commented 1 week ago

Version

Tell us which versions you are using:

Platform

Expected behaviour

App should works fine with image picking

Actual behaviour

The Android app crashes unexpectedly when selecting an image. However, after reopening the app following the crash, it works without issues. This problem occurs only on the first installation of the app. If the app is already installed and then updated, the issue does not arise. The crash is accompanied by the following exception: it's giving an socket exception although i am not using any websocket in my codebase.

Error occurred, shutting down websocket connection: Websocket exception java.net.SocketException: Software caused connection abort at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:118) at java.net.SocketInputStream.read(SocketInputStream.java:173) at java.net.SocketInputStream.read(SocketInputStream.java:143) at okio.InputStreamSource.read(JvmOkio.kt:91) at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129) at okio.RealBufferedSource.request(RealBufferedSource.kt:206) at okio.RealBufferedSource.require(RealBufferedSource.kt:199) at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209) at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119) at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102) at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293) at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)

Steps to reproduce

  1. Install the application and tried to pick an image

  2. App got crashed with above exception

  3. When i re-open the app it works fine.

Attachments

// stacktrace or any other useful debug info

Love react-native-image-crop-picker? Please consider supporting our collective: 👉 https://opencollective.com/react-native-image-crop-picker/donate