Skip to content
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

Error receiving broadcast Intent act=android.intent.action.DOWNLOAD_COMPLETE #236

Open
jankrah12 opened this issue Nov 16, 2018 · 14 comments

Comments

@jankrah12
Copy link

Here is my stack trace:

java.lang.RuntimeException Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=com.JankStudio.Mixtapes (has extras) } in com.RNFetchBlob.RNFetchBlobReq@444de0d0
LoadedApk.java:846 android.app.LoadedApk$ReceiverDispatcher$Args.run
Handler.java:615 android.os.Handler.handleCallback
Handler.java:92 android.os.Handler.dispatchMessage
Looper.java:155 android.os.Looper.loop
ActivityThread.java:5520 android.app.ActivityThread.main
Method.java:-2 java.lang.reflect.Method.invokeNative
Method.java:511 java.lang.reflect.Method.invoke
ZygoteInit.java:1029 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
ZygoteInit.java:796 com.android.internal.os.ZygoteInit.main
NativeStart.java:-2 dalvik.system.NativeStart.main

Caused by: java.lang.RuntimeException Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
CallbackImpl.java:28 com.facebook.react.bridge.CallbackImpl.invoke
RNFetchBlobReq.java:678 com.RNFetchBlob.RNFetchBlobReq.onReceive
LoadedApk.java:832 android.app.LoadedApk$ReceiverDispatcher$Args.run
Handler.java:615 android.os.Handler.handleCallback
Handler.java:92 android.os.Handler.dispatchMessage
Looper.java:155 android.os.Looper.loop
ActivityThread.java:5520 android.app.ActivityThread.main
Method.java:-2 java.lang.reflect.Method.invokeNative
Method.java:511 java.lang.reflect.Method.invoke
ZygoteInit.java:1029 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
ZygoteInit.java:796 com.android.internal.os.ZygoteInit.main
NativeStart.java:-2 dalvik.system.NativeStart.main

"react": "16.4.1",
"react-native": "0.56.0",

Issue occurs on android. I have implemented downloading based on the guide.

@codesinghanoop
Copy link

@jankrah12 did you get this resolved ?

@mark-plukkido
Copy link

I have created a PR which should resolve this issue: #314

Can you help me test it and verify it's working properly?

@Dimon70007
Copy link

Dimon70007 commented May 23, 2019

have reproduced this crash when trying to download large mp4 file with size more then 4Gb

@uraniumreza
Copy link

Yo @mark-plukkido, I'm facing this issue; can you please push the maintainers of this package to merge your PR;

pway123 pushed a commit to pway123/rn-fetch-blob that referenced this issue Sep 5, 2019
Traviskn added a commit that referenced this issue Sep 26, 2019
Fixing #236 which did not expect null from DownloadManager.query()
@namvoeh
Copy link

namvoeh commented Nov 11, 2019

My app got this issue even the rn-fetch-blob lib version is 0.11.2

@Sevellion
Copy link

any fix for this? 0.12.0 still happen

@emil-keyvalue
Copy link

My crashlytics log shows that for me it only crashes on Oppo phones. Even in dev mode app crashes without logging anything. I have noticed that Oppo uses a different download manger than most android devices and the error is only thrown when I try to download the second time.

@linhpa
Copy link

linhpa commented Dec 4, 2020

My crashlytics log shows that for me it only crashes on Oppo phones. Even in dev mode app crashes without logging anything. I have noticed that Oppo uses a different download manger than most android devices and the error is only thrown when I try to download the second time.

did you find any workaround for this? i'm facing the same issue

@emil-keyvalue
Copy link

My crashlytics log shows that for me it only crashes on Oppo phones. Even in dev mode app crashes without logging anything. I have noticed that Oppo uses a different download manger than most android devices and the error is only thrown when I try to download the second time.

did you find any workaround for this? i'm facing the same issue

Ok I had to put a bandage fix around it. I stopped the user from downloading the file if they've already done it and I just show a success message. It seems to have done the trick although we've noticed a rare crash then and again

@NanduKkd
Copy link

NanduKkd commented Jan 2, 2021

I'm still facing the issue. Any updates?

@emkkur
Copy link

emkkur commented Jan 2, 2021

I'm still facing the issue. Any updates?

Yet to check with the new update. I think they've pushed a fix

@sandy0096
Copy link

Yup, can confirm, still crashing second time on download.

@widianapw
Copy link

Hi, I'm still facing the issue. Any updates?

@alimustofa
Copy link

i solved this issue with adding a unique postfix on the filename to prevent duplication

cguino pushed a commit to BeApp/rn-fetch-blob that referenced this issue Jul 5, 2023
* Additional parameter for androiddownloads to enforce the downloaded file being added to the downloads collection

resolves joltup#247
resolves joltup#248
resolves joltup#245
resolves joltup#244
resolves joltup#236

Merge branch 'develop'
cguino pushed a commit to BeApp/rn-fetch-blob that referenced this issue Jul 5, 2023
* Additional parameter for androiddownloads to enforce the downloaded file being added to the downloads collection

resolves joltup#247
resolves joltup#248
resolves joltup#245
resolves joltup#244
resolves joltup#236

Merge branch 'develop'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests