[Android][StyleSheet] Unitless string used as value causes app crash
See original GitHub issueDescription
Refs facebook/react-native-website#1834.
Currently when unitless string is used as property value (where number
or string
with unit can be used) Android application crashes, while on iOS value is converted to the number
and on the web invalid property is omitted app works correctly.
React Native version:
- Expo
37.0.0
- React Native
0.62.2
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Use unitless string as property value (where
number
orstring
with unit can be used).
Expected Results
Property with invalid value should be converted like on iOS or omitted like on the web. Also Android app should not crash.
As a feature request, it could be nice to convert that value to number
and print console warning in DEV
mode.
Snack, code example, screenshot, or link to a repository:
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
java - How to stop the app crashing when String is empty
We check the length of the String... when it's 0 then we do nothing. When the String > 0 your code is running....
Read more >Detect and diagnose crashes
There are many situations that can cause a crash in your app. Some reasons are obvious, like checking for a null value or...
Read more >Crash in background on iOS 15 EXC_CRASH (SIGKILL)
Hello, Since the first iOS 15 beta and even with all the next public releases, we have a very weird crash each time...
Read more >My App Crashed, Now What? - RayWenderlich.com
In this tutorial, you'll learn what makes your app crash and how to fix it ... You use the value as it is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m just a “re-reporter”, I can only confirm that
expo
example crashes on Android (in web player and on the device), when on iOS in both cases app is running. I don’t have physical Android device right now to test this out more, but before I reported that issue I got a confirmation that it also crashes Android withoutexpo
. I have updated the issue to make it more clear.🤖