rn-fetch-blob icon indicating copy to clipboard operation
rn-fetch-blob copied to clipboard

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

Open jankrah12 opened this issue 6 years ago • 14 comments

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.

jankrah12 avatar Nov 16 '18 16:11 jankrah12

@jankrah12 did you get this resolved ?

codesinghanoop avatar Jan 14 '19 08:01 codesinghanoop

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

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

mark-plukkido avatar Mar 02 '19 19:03 mark-plukkido

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

Dimon70007 avatar May 23 '19 14:05 Dimon70007

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

uraniumreza avatar Jun 19 '19 12:06 uraniumreza

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

namvoeh avatar Nov 11 '19 08:11 namvoeh

any fix for this? 0.12.0 still happen

Sevellion avatar Jul 06 '20 09:07 Sevellion

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.

emil-keyvalue avatar Sep 09 '20 07:09 emil-keyvalue

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

linhpa avatar Dec 04 '20 04:12 linhpa

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

emil-keyvalue avatar Dec 07 '20 06:12 emil-keyvalue

I'm still facing the issue. Any updates?

NanduKkd avatar Jan 02 '21 11:01 NanduKkd

I'm still facing the issue. Any updates?

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

emkkur avatar Jan 02 '21 11:01 emkkur

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

sandy0096 avatar Jun 23 '22 08:06 sandy0096

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

widianapw avatar Apr 18 '23 06:04 widianapw

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

alimustofa avatar Jun 12 '23 02:06 alimustofa