react-native-fetch-blob icon indicating copy to clipboard operation
react-native-fetch-blob copied to clipboard

'java.io.File java.io.File.getParentFile()' error in android

Open nes123 opened this issue 8 years ago • 14 comments

Exception com.facebook.react.common.JavascriptException: Java exception in 'NativeModules' java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File java.io.File.getParentFile()' on a null object reference, stack: com.RNFetchBlob.RNFetchBlobFS.getSystemfolders

any ideas what can it be ?

nes123 avatar Nov 27 '17 14:11 nes123

Same issue here, but only seen on one device so far on android 6.0.1. RN 0.49.3 and RN fetch blob 0.10.8

jslok avatar Nov 28 '17 04:11 jslok

+1

gbdxl avatar Dec 05 '17 06:12 gbdxl

https://github.com/wkh237/react-native-fetch-blob/pull/557

chrusart avatar Dec 05 '17 12:12 chrusart

I have the same issue

manishoo avatar Dec 24 '17 05:12 manishoo

Same issue here

juanamd avatar Dec 25 '17 15:12 juanamd

Same issue. Happens a lot on many different devices. Here's a stack trace:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File java.io.File.getParentFile()' on a null object reference, stack:
com.RNFetchBlob.RNFetchBlobFS.getSystemfolders@216
com.RNFetchBlob.RNFetchBlob.getConstants@84
com.facebook.react.bridge.JavaModuleWrapper.getConstants@140
android.os.Handler.handleCallback@815
android.os.Handler.dispatchMessage@104
com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage@31

mannol avatar Jan 09 '18 19:01 mannol

+1

josenaves avatar Jan 11 '18 23:01 josenaves

+1

saubcy avatar Jan 14 '18 06:01 saubcy

@mannol which devices it happens ? For me, I saw it on a LGV520.

josenaves avatar Jan 19 '18 23:01 josenaves

@josenaves Well, I see it happening on at least 10 devices in production. What's interesting is that crashlytics reports that the crash happens when app is about 81% in focus, which could mean that the crash happens when the activity is being destroyed... Race condition while accessing the context maybe?

mannol avatar Jan 19 '18 23:01 mannol

It looks like @chrusart created a PR with the fix 🎉

https://github.com/wkh237/react-native-fetch-blob/pull/619#issuecomment-357925638

kelset avatar Feb 06 '18 11:02 kelset

@kelset #636 have this fix too and few other improvements and bugfixes, in production for 3 weeks now and fixed crashes didn't occur yet, no new ones appeared.

chrusart avatar Feb 07 '18 13:02 chrusart

+1

ZionChang avatar Mar 14 '18 05:03 ZionChang

@chrusart It seems like this repo is no longer maintained. Could you open a PR there? https://github.com/wkh237/react-native-fetch-blob/pull/636#issuecomment-375953433

SuhairZain avatar Apr 20 '18 06:04 SuhairZain