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.

Render Error Reporting

See original GitHub issue

First, can I say thanks for this package, it’s way better than any pdf generator I’ve used before.

I’ve come up against a problem and I was hoping for some pointers.

I’m using version 2.0.0-beta.5, which has proved to be very helpful with the new features, especially minPresenceAhead.

I’ve just come up against this message at the render stage:

TypeError: Cannot read property ‘height’ of undefined at setNodeHeight (resolveDimensions.js:72) at resolveDimensions.js:85 at tap (tap.js:26) at _dispatchable.js:38 at _curry2.js:19 at f1 (_curry1.js:16) at _pipe.js:3 at _pipe.js:3 at _pipe.js:3 at _arity.js:10 at resolveDimensions.js:176

What I would really like here is a bit more information in the error, for example some info about which node is causing a problem.

In the meantime, could you give me any pointers about what kind of mistake on my part could have caused this? I’ve been using the package constantly for the last 3 weeks and this is the first time I’ve encountered this message.

I’m going to try to find the error but it’s a massive document and a long job to wade through it.

Thanks!

Tom

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

8reactions
richcsmithcommented, May 22, 2020

Thank you for your reply, and apologies for the late response—I’m still working through this and haven’t figured out a solution. As it turns out, image rendering wasn’t the source of the issue. This is the error I’m seeing at render time (similar to you):

TypeError: Cannot read property 'height' of undefined
    at setNodeHeight (react-pdf.browser.es.js?e5f2:6186)
    at eval (react-pdf.browser.es.js?e5f2:6197)
    at tap (tap.js?863b:26)
    at eval (_dispatchable.js?da3b:38)
    at eval (_curry2.js?8c6c:19)
    at f1 (_curry1.js?a797:16)
    at eval (_pipe.js?a8f3:3)
    at eval (_pipe.js?a8f3:3)
    at eval (_pipe.js?a8f3:3)
    at eval (_arity.js?833a:10)

I understand that this issue is to ask for more descriptive error messages, but what I’m asking you is what exactly was the issue in your code that caused this error in the first place?

Edit: I actually just figured it out about 5 minutes after I posted this. I was conditionally rendering components using a double ampersand (&&), which breaks something in the Yoga renderer.

In case anyone else runs into this issue, here’s what worked for me when rendering components:

// Do this
return displayComponent ? <View /> : null;

// Don't do this
return displayComponent && <View />;
1reaction
idl3commented, Jun 25, 2021

I can confirm that the above suggestion to use a ternary operation to null instead of && solved my issue with TypeError: Cannot read property 'height' of undefined as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rrRenderingError - Reporting Services Error - Microsoft Learn
A message that indicates that the number of columns exceeds the maximum possible columns per sheet is typically caused when the number of ......
Read more >
React Error Handling And Reporting With Error Boundary And ...
Having seen how React handles two types of errors, (rendering error, and event handler error), let's now write an error boundary component.
Read more >
#Error Rendering Error in Reporting Services - YouTube
Walking through a Rendering Error where the customer got # Error in a field.
Read more >
Strategies for Error-handling at Render time - Page Templates
The simplest strategy for handling errors, apart from not handling them, is to use a literal string. For example, tal:on-error="string:Server Error" indicates ...
Read more >
Fix export issues in Premiere Pro - Adobe Support
... cause an "Error while compiling" error message when rendering or ... Check if your System Compatibility Report is throwing any errors.
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