OWASP/threat-dragon-desktop

Export JSON as PDF function fails on Arch Linux

zakrush opened this issue · 8 comments

Describe the bug
Hello.
I can't export thread model to PDF.
I use ArchLinux and ApImage.

What happend
When I were tried export JSON thread modet to PDF it's nothing happend for long time.
I saw only this:

./OWASP-Threat-Dragon-1.3.1.AppImage pdf my-first-demonstrate-model.json --verbose
17:10:43.522 › Calling Threat Dragon from command line
17:10:44.580 › App loaded with logging verbosity level: info
17:10:44.942 › Threat Dragon loaded
^C

Environment

  • Version: 1.3.1
  • Platform: Desktop (AppImage)
  • OS: Linux (arch)

To Reproduce
Give commant:
./OWASP-Threat-Dragon-1.3.1.AppImage pdf my-first-demonstrate-model.json --verbose

Any additional context, screenshots, etc
my-first-demonstrate-model.json into attachment.(rename this from txt to json)
my-first-demonstrate-model.txt

Hello @zakrush - thanks for raising this bug. It has shown a gap in our release testing - I test out the command line interface on Linux by installing using the .deb package, but do not test the command line when I am running the AppImage.

Will try and see what is breaking and get back to you on this ...

Hello @zakrush
Are you able to generate pdf reports OK from within the tool, using the graphical front end rather than the command line?

I have tried this on my Trisquel Linux box and it works as expected - I can generate pdf from the command line using the command line ./OWASP-Threat-Dragon-1.3.1.AppImage pdf new-model.json. There must be some incompatibility with Arch Linux and AppImage, and it would be good to find this and fix it - I hope you do not mind helping to track it down

Thanks again for reporting this

Hello @jgadsden

I'm sorry for long response. I had the holidays.

Are you able to generate pdf reports OK from within the tool, using the graphical front end rather than the command line?
Yes, I cat to generate pdf reports from frontend of application.

I hope you do not mind helping to track it down
Yes. I help you. What should I do for debug and help you?

Hello @zakrush thanks for offering to help out. You can print pdf from the GUI but not the command line ... so could you run the command line with debug verbosity? This is the command :

./OWASP-Threat-Dragon-1.3.1.AppImage pdf my-first-demonstrate-model.json -vvv

(the number of v increases log level)

I have attached a successful pdf print log from MacOS
pdf-debug.txt

Hello @jgadsden
I see that I stopped on
Shell -> appLoaded at location.url /threatmodel/export/bmV3LW1vZGVsX2NsZWFyLmpzb24= step.

I have attached my log:
threadDragonPDF.log

Hello @zakrush - many thanks for the log file. Could you run the same command but try with specifying the full path for the file 'new-model_clear.json' (for example my path was '/Users/jon.gadsden/good-model.json')

Thanks for helping the debug :-)

Hello @jgadsden thank you for helping.
Yes, full path solved the problem.
I should have guessed the full path myself.

Log is here:
dragon.log

Hello @zakrush - very good news that you can now get a pdf. This has shown a problem with the documentation that I will fix ... thanks again for hunting this down.

I have added a new FAQ at https://github.com/OWASP/threat-dragon-desktop/wiki/FAQs#is-there-a-command-line-interface-for-threat-dragon and highlighted that the path to the file needs to be included.

Is that OK with you, and we can close this issue?