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

Android: App crashes when getExternalFilesDir() returns null #61

Closed
poison opened this issue Jun 4, 2018 · 1 comment · Fixed by #62
Closed

Android: App crashes when getExternalFilesDir() returns null #61

poison opened this issue Jun 4, 2018 · 1 comment · Fixed by #62

Comments

@poison
Copy link

poison commented Jun 4, 2018

Hi,

I noticed that sometimes getExternalFilesDir() returns null, and then the app crashes.

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@216 com.RNFetchBlob.RNFetchBlob.getConstants@84 com.facebook.react.bridge.JavaModuleWrapper.getConstants@140 android.os.Handler.handleCallback@751 android.os.Handler.dispatchMessage@95 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage@31

I can reproduce it when I'm on Android 4.3 or below, but in production (we have an app with +/- 1 million installs) we hit this error on all kind of Android versions.

Best,
Nicolas

@poison
Copy link
Author

poison commented Jun 5, 2018

A small update, the patch is rolled out to +/-5 % of our userbase (47k devices) and I didn't had the crash anymore. It would be great to see this one upstream so I don't need to point to my featurebranch on npm.

Best,
Nicolas

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

Successfully merging a pull request may close this issue.

1 participant