Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors swallowed in synchronous render (2018) #1164

Closed
AlJohri opened this issue Nov 3, 2018 · 3 comments · Fixed by #1181
Closed

Errors swallowed in synchronous render (2018) #1164

AlJohri opened this issue Nov 3, 2018 · 3 comments · Fixed by #1181
Labels

Comments

@AlJohri
Copy link

AlJohri commented Nov 3, 2018

hi @fdintino, just raising the priority of this bug since it seems fairly serious. in some conditions, when there is a template syntax error, the synchronous version of env.render simply returns null instead of throwing the error. there are several issues describing this such as:

It appears the bug has something to do with async as the callback version of this function seems to pass down the error object.

@carljm requested a failing a test that showcases this bug which can be found here: #689 thanks to @nicolasartman

@oleics did some initial debugging back in 2016 #678 (comment) and found that there is a line var forceAsync = true; which could be contributing although this code has changed quite a bit since then.

This bug makes it very hard to write templates with nunjucks and it would be great to resolve this soon.

@fdintino fdintino added the bug label Dec 17, 2018
@fdintino
Copy link
Collaborator

Agreed this is serious. I got bit by this myself recently. I'll prioritize finding a fix.

@rdmurphy
Copy link
Contributor

rdmurphy commented Jan 4, 2019

We're hitting this too, and it's led to a lot of baffling debugging sessions and burnt time.

@AlJohri
Copy link
Author

AlJohri commented Jan 7, 2019

Thanks @fdintino!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants