-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android crash - Illegal callback invocation from native module - RuntimeException firing twice #113
Comments
The problem is actually that it is called twice. Since react-native is not allowing the fire the callback twice. I assume it's related to this bug here: https://issuetracker.google.com/issues/36930682#c13 The problem arises with fixing this issue. Probably we could implement a flag making sure the method is only called once - or just trying to catch the |
Wow that is an old issue then... 😄 Thanks for looking into this. The unique path value "fix" I've used seems to have helped a lot but something more solid like you mentioned would be cool sort out too. |
Not sure if I have the similar problem, #164 |
…ackage Fix bug issue #113 in new version package(0.16.3)
I've been trying to get to the bottom of this issue. I've seen it over on the old repo and there's not been a good solution for it.
On certain devices...namely Realme, Oppo and Huawei a regular crash seems to be occurring. I've tested using a "Realme 7" phone, Android 11 and can reproduce it every time w/ the below scenario.
The issue seems to be triggered if you re-download a previously downloaded item again and you have
addAndroidDownloads: path
set.Upon completing the 2nd download
onReceive
seems to fire twice.The following line is called:
react-native-blob-util/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java
Line 804 in e73e279
At this point in time
this.callback.mInvoked
is true which fires an exception taking you to line 808 which attempts to fire another callback and causes the crash:react-native-blob-util/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java
Line 808 in e73e279
I can get this issue to stop happening if I change the
path
supplied to be unique so I'm wondering if this is something to do with this value or maybe the source file Url?I'd love to figure out exactly why this is happening! Has anyone else seen this?
The text was updated successfully, but these errors were encountered: