-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Invalid path: /storage/emulated/0 #320
Comments
@machour Unfortunately I cannot reproduce it. It does not seem to affect many users so far. One user said he was able to solve the issue on his own by uninstalling then reinstalling my app several times but of course that is not really a good solution. |
of course it's not. Maybe surrounding the block with a try/catch could help. |
@machour you can go ahead and take care of it if you dont mind. |
Still new to git and never done a pr before. |
I could do it, but I can also help you out doing your first PR ever, and I think this would be even cooler for you and it would definitely make my day 😄
Basically you would do the following:
PS: I'm available on Twitter or Gitter if you need assistance. |
* Fix crash on `getFreeDiskStorage` from invalid filesystem path (react-native-device-info#320)
Ok!! Hope I did it right and thank you for the detailed instructions. Let me know if there's anything wrong with it. I shall be much more helpful on github from now on. |
This is so great, thank you for the pull request! 🎉 🎉 🕺 |
Summary
Current behavior
App crashes on start for some users. I'm seeing this error in Bugsnag:
com.facebook.react.common.JavascriptException Java exception in 'NativeModules'
java.lang.IllegalArgumentException: Invalid path: /storage/emulated/0, stack:
android.os.StatFs.doStat@46
android.os.StatFs.@39
com.learnium.RNDeviceInfo.RNDeviceModule.getFreeDiskStorage@137
com.learnium.RNDeviceInfo.RNDeviceModule.getConstants@224
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
Expected behavior
App should start normally. As far as I can tell, 0.14.x and the issue only started happening on 0.15.x.
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: