{"action":"created","issue":{"url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku/issues/34","repository_url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku","labels_url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku/issues/34/comments","events_url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku/issues/34/events","html_url":"https://github.com/rposborne/wkhtmltopdf-heroku/issues/34","id":183591272,"number":34,"title":"\"PDF could not be generated\" error when running on a heroku worker via delayed_job","user":{"login":"agbodike","id":6569567,"avatar_url":"https://avatars.githubusercontent.com/u/6569567?v=3","gravatar_id":"","url":"https://api.github.com/users/agbodike","html_url":"https://github.com/agbodike","followers_url":"https://api.github.com/users/agbodike/followers","following_url":"https://api.github.com/users/agbodike/following{/other_user}","gists_url":"https://api.github.com/users/agbodike/gists{/gist_id}","starred_url":"https://api.github.com/users/agbodike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agbodike/subscriptions","organizations_url":"https://api.github.com/users/agbodike/orgs","repos_url":"https://api.github.com/users/agbodike/repos","events_url":"https://api.github.com/users/agbodike/events{/privacy}","received_events_url":"https://api.github.com/users/agbodike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-18T05:04:09Z","updated_at":"2016-10-18T05:08:01Z","closed_at":null,"body":"I have a problem that is specific to heroku workers using delayed job.\r\n\r\nI'm able to generate PDFs for download with no problem using the existing configuration, but when generating the PDF on a heroku worker I'm getting the following errors:\r\n\r\nbelow are partial stack traces from two different methods being used with delayed jobs\r\n\r\n```\r\n Failed to execute:\r\n [\"/app/vendor/bundle/ruby/2.3.0/gems/wkhtmltopdf-heroku-2.12.3.0/bin/wkhtmltopdf-linux-amd64\", \"-q\", \"file:////tmp/wicked_pdf20161017-3-1inanjm.html\", \"/tmp/wicked_pdf_generated_file20161017-3-1ezw2jg.pdf\"]+\r\n Error: PDF could not be generated!\r\n  Command Error:\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:91:in `rescue in pdf_from_url'\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:94:in `pdf_from_url'\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:49:in `pdf_from_html_file'\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:60:in `pdf_from_string'\r\n /app/lib/modules/operate_pdf.rb:26:in `block in generate'\r\n /app/lib/modules/operate_pdf.rb:25:in `open'\r\n /app/lib/modules/operate_pdf.rb:25:in `generate'\r\n /app/lib/modules/operate_pdf.rb:39:in `generate_for_participants'\r\n /app/lib/modules/operate_pdf.rb:32:in `generate_and_send_mail_for_participants'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/performable_method.rb:30:in `perform'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:94:in `block in invoke_job'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:91:in `invoke_job'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/worker.rb:204:in `block (2 levels) in run'\r\n /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'\r\n /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:101:in `timeout'\r\n /app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.0.6/lib/delayed/worker.rb:204:in `block in run'\r\n /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'\r\n\r\n...\r\n```\r\n\r\n```\r\n Failed to execute:\r\n [\"/app/vendor/bundle/ruby/2.3.0/gems/wkhtmltopdf-heroku-2.12.3.0/bin/wkhtmltopdf-linux-amd64\", \"-q\", \"file:////tmp/wicked_pdf20161018-3-1uefq57.html\", \"/tmp/wicked_pdf_generated_file20161018-3-1745hbp.pdf\"]+\r\n Error: PDF could not be generated!\r\n  Command Error:\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:91:in `rescue in pdf_from_url'\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:94:in `pdf_from_url'\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:49:in `pdf_from_html_file'\r\n /app/vendor/bundle/ruby/2.3.0/gems/wicked_pdf-1.1.0/lib/wicked_pdf.rb:60:in `pdf_from_string'\r\n /app/lib/modules/operate_pdf.rb:46:in `block in generate_for_ats'\r\n /app/lib/modules/operate_pdf.rb:45:in `open'\r\n /app/lib/modules/operate_pdf.rb:45:in `generate_for_ats'\r\n /app/app/models/icims_workflow.rb:29:in `complete'\r\n /app/app/models/participant.rb:196:in `block in notify_ats_completed'\r\n /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.16/lib/active_record/relation/delegation.rb:46:in `each'\r\n /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.16/lib/active_record/relation/delegation.rb:46:in `each'\r\n\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku/issues/comments/254407951","html_url":"https://github.com/rposborne/wkhtmltopdf-heroku/issues/34#issuecomment-254407951","issue_url":"https://api.github.com/repos/rposborne/wkhtmltopdf-heroku/issues/34","id":254407951,"user":{"login":"agbodike","id":6569567,"avatar_url":"https://avatars.githubusercontent.com/u/6569567?v=3","gravatar_id":"","url":"https://api.github.com/users/agbodike","html_url":"https://github.com/agbodike","followers_url":"https://api.github.com/users/agbodike/followers","following_url":"https://api.github.com/users/agbodike/following{/other_user}","gists_url":"https://api.github.com/users/agbodike/gists{/gist_id}","starred_url":"https://api.github.com/users/agbodike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agbodike/subscriptions","organizations_url":"https://api.github.com/users/agbodike/orgs","repos_url":"https://api.github.com/users/agbodike/repos","events_url":"https://api.github.com/users/agbodike/events{/privacy}","received_events_url":"https://api.github.com/users/agbodike/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T05:08:01Z","updated_at":"2016-10-18T05:08:01Z","body":"Also raised in mileszs/wicked_pdf#584"}}
{"actor":{"display_login":"agbodike"}}