armin7298
armin7298

Reputation: 11

Pdf report issue on mobSF

I just installed mobSF to make a static analyze report but when i click on pdf output gives me this error :

{
pdf_error: "Cannot Generate PDF",
err_details: "wkhtmltopdf reported an error: Exit with code 1 due to network error: ProtocolUnknownError "
}

The Error in terminal is this :

[ERROR] 30/Jul/2020 07:04:16 - Error Generating PDF Report
Traceback (most recent call last):
  File "/Users/arminmo/Desktop/Mobile-Security-Framework-MobSF-master/StaticAnalyzer/views/shared_func.py", line 190, in pdf
    pdf_dat = pdfkit.from_string(html, False, options=options)
  File "/Users/arminmo/Desktop/Mobile-Security-Framework-MobSF-master/venv/lib/python3.7/site-packages/pdfkit/api.py", line 72, in from_string
    return r.to_pdf(output_path)
  File "/Users/arminmo/Desktop/Mobile-Security-Framework-MobSF-master/venv/lib/python3.7/site-packages/pdfkit/pdfkit.py", line 156, in to_pdf
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: ProtocolUnknownError

[ERROR] 30/Jul/2020 07:04:16 - Internal Server Error: /PDF/

My Os is mac os mojave

Can you explain how to solve this problem with wkhtmltopdf and mobsf?

Upvotes: 1

Views: 2267

Answers (1)

KavinduWije
KavinduWije

Reputation: 42359

  • Download & Install wkhtmltopdf as per the wiki instructions
  • Add the folder that contains wkhtmltopdf binary to environment variable PATH.

Upvotes: 2

Related Questions