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.

[iOS][Rendering] Having a `height` property in a custom element causes errors

See original GitHub issue

Platform

What platform is your issue or question related to? (Delete other platforms).

  • iOS

Author or host

Host

Version of SDK

2.4.6

Details

A custom element with a property named “height” results in a parsing error:

Error Domain=ACRParseErrorDomain Code=3 "(null)"

“width”, “w”, “h” are all OK. But not “height”.

This actually took me a long time to figure out and I even filed a different bug (#5300) thinking it had a different cause.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jscalocommented, Jan 22, 2021

OK makes sense (and I already switched to ‘w’ and ‘h’). Closing.

0reactions
jwoo-msftcommented, Jan 22, 2021

@jscalo hey, so I debugged it with the payload. you should treat the height property as a reserved keyword. The reason is that we treat all elements including customs types as derived ones from BaseCardElement, and the BaseCardElement has the height property, and its type is an enum when deserialized, and our parser expects the value to be in the string; that’s the reason for the parser failure. Valid json values are “stretch” and “auto”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom elements are not "cleaned up ...
Hey guys, it appears that custom-elements don't get cleaned up fully when a parent application removes them from the DOM.
Read more >
Element type is invalid: expected a string (for built-in ...
Error : Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Read more >
How To Fix Cumulative Layout Shift (CLS) Issues
The Cumulative Layout Shift metric is causing trouble to a lot of sites, so let's have a look at ways of addressing any...
Read more >
4 reasons your z-index isn't working (and how to fix it)
Z-index is a CSS property that allows you to position elements in layers on top of one another. It's super useful, and honestly...
Read more >
Shadow DOM v1 - Self-Contained Web Components
The first is that the custom element creates its own shadow DOM when an instance of <fancy-tabs> is created. That's done in the...
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