software-mansion / software-mansion/react-native-svg
[android] SvgView is doing more checks than expected?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8k
- Forks
- 1.2k
- Avg merge
- 10d 9h
- Merged PRs (30d)
- 2
Description
Description
When providing a property of outlineColor to <Svg/> with values like transparent or #FFFFFF30, this crashes on android with a message saying: "java.lang.Double cannot be cast to java.lang.integer"
While this is indeed unsupported (for <Svg/>), this crash only happens on Android but is acceptable for iOS and Web
Which one is to be followed?
Steps to reproduce
Feel free to manipualte the snack example; Expo Go (SDK54) won't load the snack when it crashes
Snack or a link to a repository
https://snack.expo.dev/@hcmlroldan/svg-example
SVG version
15.15.1
React Native version
0.81.5
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo Go
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
Real device
Device model
No response
Acknowledgements
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Expo Snack and reproduce the crash on Android using Expo Go SDK 54, React Native 0.81.5, SVG 15.15.1, Hermes, and Fabric. Compare the handling of transparent and #FFFFFF30 outlineColor values on Android, iOS, and Web, then establish and verify the intended cross-platform behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100