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

No such file or directory @ apply2files #1073

Open
LuanGB opened this issue Sep 5, 2023 · 1 comment · May be fixed by #1074
Open

No such file or directory @ apply2files #1073

LuanGB opened this issue Sep 5, 2023 · 1 comment · May be fixed by #1074

Comments

@LuanGB
Copy link

LuanGB commented Sep 5, 2023

Issue description

After upgrading to 2.7.0 version, the pdf generation fails on non-dev/test environment with the following error:

No such file or directory @ apply2files - /tmp/wicked_header_pdf20230905-21-mm5ta8.html

backtrace:

vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:112 delete
vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:112 block in clean_temp_files
vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:112 each
vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:112 clean_temp_files
vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:85 pdf_from_url
vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:36 pdf_from_html_file
vendor/bundle/ruby/2.7.0/gems/wicked_pdf-2.7.0/lib/wicked_pdf.rb:44 pdf_from_string

The issue seems to be related with the #clean_temp_files method.

Expected or desired behavior

  • pdf generation succeeds
  • #clean_temp_files checks if file exists before trying to delete

System specifications

wicked_pdf gem version (output of cat Gemfile.lock | grep wicked_pdf): 2.7.0

wkhtmltopdf version (output of wkhtmltopdf --version): 0.12.6.1 (with patched qt)

whtmltopdf provider gem and version if one is used:

platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar): Alpine

@LuanGB LuanGB linked a pull request Sep 5, 2023 that will close this issue
@LuanGB
Copy link
Author

LuanGB commented Sep 5, 2023

@unixmonkey created a PR with a simple fix: #1074

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

Successfully merging a pull request may close this issue.

1 participant