-
Notifications
You must be signed in to change notification settings - Fork 24.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
[Android] Crash: FileReaderModule.readAsText java.lang.NullPointerException #45277
Labels
Resolution: Fixed
A PR that fixes this issue has been merged.
Comments
github-actions
bot
added
the
Type: Unsupported Version
Issues reported to a version of React Native that is no longer supported
label
Jul 4, 2024
|
JinYuSha0
changed the title
Crash: FileReaderModule.readAsText java.lang.NullPointerException
[Android] Crash: FileReaderModule.readAsText java.lang.NullPointerException
Jul 4, 2024
cortinico
added
Resolution: PR Submitted
A pull request with a fix has been provided.
and removed
Needs: Author Feedback
Type: Unsupported Version
Issues reported to a version of React Native that is no longer supported
labels
Jul 4, 2024
Yup that's a valid bugreport 👍 Thanks for the reproducer @JinYuSha0 A fix is forthcoming |
cortinico
added a commit
to cortinico/react-native
that referenced
this issue
Jul 4, 2024
Summary: Fixes facebook#45277 This fixes an NPE reported in OSS if you do this call in JavaScript: ``` const fr = new FileReader(); fr.readAsText({}); ``` Changelog: [Android] [Fixed] - Fix NPE in FileReaderModule Differential Revision: D59372620
cortinico
added
Resolution: Fixed
A PR that fixes this issue has been merged.
and removed
Resolution: PR Submitted
A pull request with a fix has been provided.
labels
Jul 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I see a lot of these crashes in Google Crashlytics:
Locate the following code:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/FileReaderModule.java#L47
The judgment of blob is not very good.
Steps to reproduce
React Native Version
0.70.1
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/JinYuSha0/FileReaderReproducer
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: