-
Notifications
You must be signed in to change notification settings - Fork 648
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
Adding wicked_pdf leads to fatal error on any render #876
Comments
When you say this is an SPA, do you mean that this is Rails running in API mode (no view rendering). If so, this thread has some tips for that. What version of Ruby and Rails are you running? |
No, it does have simplistic view rendering, in which we wrap react pages.
|
Can you try and point your Gemfile at the master branch and see if that helps? I very recently merged a Rails 6 comparatively PR, but haven’t released it yet. |
Gave it a go, unfortunately I get the same fatal FrozenError. While trying to research it, I did find someone else had this issue with the gem: https://stackoverflow.com/questions/55301110/frozen-error-when-trying-to-run-rails-application Perhaps a deprecation error failing somewhat silently: rails/rails#37088 (not released yet I think) |
Thanks for that extra context. The comment that this is being raised as the result of a SystemStackError seems like a decent explanation. This gem has some incompatibilities with other gems that try to do similar thing by either prepending or alias_method_chaining of Here are some threads that may help you determine what gem could be interfering, and some tips to work around this: Let me know how it goes. If you keep having trouble, I'm sure I can help you out (probably with a monkeypatch or something), just let me know. |
@unixmonkey I am also having this same issue. On my machine I get a |
I had the same when including |
@bo-oz I don't think Rails 5 compatibility has anything to do with your issue. I've tested with Rails 5 and the current version. I have seen incompatibility with other gems that also override If this is your issue, there are some suggestions in #650 that may help you track it down. |
Visiting the application root now results in the following error. 3: from actionview-6.0.2.2/lib/action_view/renderer/template_renderer.rb:59:in `block (2 levels) in render_template' 2: from actionview-6.0.2.2/lib/action_view/template.rb:182:in `render' 1: from actionview-6.0.2.2/lib/action_view/template.rb:188:in `rescue in render' actionview-6.0.2.2/lib/action_view/template.rb:355:in `handle_render_error': can't modify frozen fatal: #<fatal: exception reentered> (ActionView::Template::Error) Possibly related: mileszs/wicked_pdf#876
Hi Guys, any update on this? |
same for us 🤷🏿 it's because we override
if i comment it, it works. if i use my override, it's an infinity loop |
Hi there, I was facing this exact same problem on version 1.4.0. I've found out that when overriding the render method caused method(:render).super_method.call(options, *args, &block) Anyway, here we are using Rails 6.1 with Ruby 2.7 |
Issue description
Added wicked_pdf + wkhtmltopdf-binary to gemfile of existing spa project
Generated wicked initializer with default config
Startup application
Try to render any page (not ones that are invoking wicked pdf):
Expected or desired behavior
No error occuring?
System specifications
wicked_pdf gem version (output of
cat Gemfile.lock | grep wicked_pdf
):wkhtmltopdf version (output of
wkhtmltopdf --version
):whtmltopdf provider gem and version if one is used:
platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar):
Mac OS X Mojave 10.14.6
The text was updated successfully, but these errors were encountered: