mike-goodwin / owasp-threat-dragon-desktop

An installable desktop variant of OWASP Threat Dragon
Apache License 2.0
594 stars 90 forks source link

Blank window on saving new model or saving demo model #79

Closed jgadsden closed 4 years ago

jgadsden commented 4 years ago

When the 'Create a New Model' selection is made, and then the details of the model filled in, then on Save the model is saved but the Threat Dragon window is blank. Recovery is by closing the model from the Electron menu. Tested on Windows, MacOS and Debian Linux TD version : core 0.61, desktop 0.6.3 also on TD version : core 0.7.0, desktop 1.0 Error message: [ [Error] Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded

meetinthemiddle-be commented 4 years ago

Seeing this issue as well on MacOSX. I can confirm that the workaround of closing the model(*), re-opening TD and then re-opening the saved JSON file works.

It's a minor annoyance and easily worked around, but may deter new users if this is their first contact with the tool. (a.k.a. : you never get a second chance to make a first impression ;-) ).

(*) "OWASP-Threat-Dragon" menu -> "Close Model" ; this kills the application alltogether, but I guess that's an Electron thing?

jgadsden commented 4 years ago

Hello @meetinthemiddle-be , selecting "OWASP-Threat-Dragon" menu -> "Close Model" should only close an existing open threat model and not the application itself. It works this way when I test it on my MacOS. Are you running from the version 1.0 .dmg install or from an npm install ?

jgadsden commented 4 years ago

This issue is also present when opening the demo model and then trying to save it

jgadsden commented 4 years ago

This is looking quite hard to fix with the existing behaviour:

  1. open a new TM
  2. do some changes
  3. save as a new file

and I suggest that we change to:

  1. Save a new file using template
  2. open the new TM
  3. do some changes
  4. save the file

this would fit in with my dev tools, which ask me to save anything new before editing