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.

Crashes app when container element has display set to none with error width and height must be > 0

See original GitHub issue

Setting display: 'none' style on the container element crashes the app, for example:

<View style={{display: 'none'}}>
  <Svg width={100} height={100}>
    ...
  </Svg>
</View>

Shows a red screen with the error message: width and height must be > 0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:7

github_iconTop GitHub Comments

2reactions
cbsorrilhacommented, May 22, 2018

+1 here.

We “solved” this using conditional rendering instead of display:none .

0reactions
msandcommented, Dec 9, 2018

This seems to work fine now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crashes app when container element has display set to none ...
Setting display : 'none' style on the container element crashes the ... Shows a red screen with the error message: width and height...
Read more >
width and height must be > 0 in activity - Stack Overflow
This bug incorrectly sets the drawable bounds to 0 (or negative in the case of an inset drawable). I've seen this cause a...
Read more >
"NO_CRASH_STACK + 0" Crash (only on testflight)
When I built an app for Testflight with Xcode 13.1 (App Store version), it crashes on launch when installed from TestFlight, as everyone ......
Read more >
Android crash: "Width and height must be > 0"
My Android app keeps crashing on startup, and I can't make it work. I have set all views' width and height to something...
Read more >
Known Issues for Hybrid Web Container - Sybase Infocenter - SAP
Learn about known issues and apply workarounds for Hybrid Web Container (HWC) ... App is deployed from the Hybrid App Designer, the simulator...
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