rubyforgood / casa

Volunteer management system for nonprofit CASA, which serves foster youth in counties across America.
https://casavolunteertracking.org/
MIT License
307 stars 473 forks source link

Bug: Uncaught exception for email preview #5396

Closed FireLemons closed 9 months ago

FireLemons commented 11 months ago

Environment: qa Message: Could not find an executable ["pdftk"] on your path. Stack: File: app/services/fdf_inputs_service.rb:20

  def write_to_file(flatten: true)
    file ||= Tempfile.new(basename)
    with_fdf_tempfile do |fdf|
      pdftk = PdfForms.new
      pdftk.fill_form_with_fdf(pdf_template_path, file.path, fdf.path, flatten: flatten)
    end
    file

File: app/services/fdf_inputs_service.rb:34

    Tempfile.open(basename) do |fdf|
      fdf.puts ERB.new(fdf_template).result(binding)
      fdf.rewind
      yield(fdf)
    end
  end

File: app/services/fdf_inputs_service.rb:31

  attr_reader :inputs, :pdf_template_path, :basename

  def with_fdf_tempfile
    Tempfile.open(basename) do |fdf|
      fdf.puts ERB.new(fdf_template).result(binding)
      fdf.rewind
      yield(fdf)

File: app/services/fdf_inputs_service.rb:19


  def write_to_file(flatten: true)
    file ||= Tempfile.new(basename)
    with_fdf_tempfile do |fdf|
      pdftk = PdfForms.new
      pdftk.fill_form_with_fdf(pdf_template_path, file.path, fdf.path, flatten: flatten)
    end

File: app/mailers/fund_request_mailer.rb:16

        inputs: @inputs,
        pdf_template_path: File.join(["data", "fund_request.pdf"]),
        basename: ["fund_request", "pdf"]
      ).write_to_file.read
      attachments.inline["fund-request-#{Date.today}-#{submitter_name}.pdf"] = pdf_attachment
    rescue => e
      Bugsnag.notify(e)

Controller: rails/mailers#preview App URL: https://casa-qa.herokuapp.com/rails/mailers/fund_request_mailer/send_request?part=text%2Fhtml

How to Replicate

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

mgrigoriev8109 commented 11 months ago

@FireLemons I can work on this one.

github-actions[bot] commented 10 months ago

This issue has been inactive for 240 hours (10.00 days) and will be unassigned after 120 more hours (5.00 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] commented 10 months ago

This issue has been inactive for 360 hours (15.00 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

fchagasjr commented 10 months ago

Can I be assigned to this?

github-actions[bot] commented 9 months ago

This issue has been inactive for 262 hours (10.92 days) and will be unassigned after 98 more hours (4.08 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time