-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
🐛 Bug Report
Motivations
Because I wanted to share a deficiency that might be difficult to reproduce, involving a network error with okhttp3 library, I would rather label this as a "crash report" than a "bug report". But I will do my best to provide you with the maximum amount of information to help you fix it.
Environment
I am using react-native-unimodules
latest @0.7.0
. The application using it has been deployed since mid-December, and we have had no issues with the FileSystem unimodule up until now.
But the crash report directly incriminates expo-file-system native java module.
Device information
Samsung Galaxy S8 (SM-G9500) with Android 9, battery level 53%.
Report information
The error was thrown in the downloadAsync
function.
- Sentry report
- Responsible code: expo/modules/filesystem/FileSystemModule.java#L502
Diagnostic
Looks like the onError
callback expects thrown errors to have getMessage()
method returning a string, but in some rare occurrences the message might be null
.
Suggestion
Wrap the e.getMessage()
with String.valueOf
for null safety sake.