question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android][StyleSheet] Unitless string used as value causes app crash

See original GitHub issue

Description

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.

  1. Use unitless string as property value (where number or string 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:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Simekcommented, Apr 16, 2020

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 without expo. I have updated the issue to make it more clear.

0reactions
Simekcommented, Jul 18, 2020

🤖

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found