react-native: [0.62.2] Using base64 strings for an Image URI crashes app
Description
I’m using base64 strings as image sources throughout my app. After upgrading react-native from 0.61.5 to 0.62.2, my app crashes immediately upon loading any image with the source as {"uri": 'base64encodedstring'}
. There are no logs prior to the app crashing. My app uses data:image/jpeg;base64
encoded strings.
React Native version:
System: OS: macOS 10.15.4 CPU: (4) x64 Intel® Core™ i5-5250U CPU @ 1.60GHz Memory: 101.43 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.13.7 - ~/.nvm/versions/node/v13.11.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.8.4 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 27, 28, 29 Build Tools: 28.0.3, 29.0.2 System Images: android-26 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6241897 Xcode: 11.4/11E146 - /usr/bin/xcodebuild Languages: Java: 1.8.0_232 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 npmGlobalPackages: react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Use
{"uri": 'base64encodedstring'}
as an Image source inside of a component
Expected Results
Image loads properly
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 27
- Comments: 19 (2 by maintainers)
Commits related to this issue
- Fix Flipper iOs crash on base64 image uri https://github.com/facebook/react-native/issues/28583 — committed to status-im/status-mobile by Ferossgp 4 years ago
- Fix Flipper iOs crash on base64 image uri https://github.com/facebook/react-native/issues/28583 Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com> — committed to status-im/status-mobile by Ferossgp 4 years ago
Edit: For anyone else that comes across this just change the version of Flipper in the podfile to
as this is what the pr did
Along with the flipper update I also had to update,
After updating versions in the pod file run
Cheers!
the real contributor !