Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threat dragon windows app doesn't install properly #267

Closed
huwjeffries opened this issue Sep 14, 2021 · 3 comments · Fixed by #263
Closed

Threat dragon windows app doesn't install properly #267

huwjeffries opened this issue Sep 14, 2021 · 3 comments · Fixed by #263
Assignees
Labels
bug Something isn't working

Comments

@huwjeffries
Copy link

Describe the bug
Threat dragon desktop does not appear to install all required dependencies on Windows

Expected behavior
After install I can click the + button (Get started by creating a completely new, empty threat model) to create a new model.

Environment

  • Version: 1.5.3
  • Platform: Desktop App
  • OS: Windows
  • Browser: chrome (although I'm using the desktop app).

To Reproduce
Download 1.5.3 exe of threat dragon from the release page:
https://github.com/OWASP/threat-dragon/releases/download/v1.5.3/OWASP-Threat-Dragon-Setup-1.5.3.exe
Run it and allow it to install.
Thread dragon opens automatically. Click the + button (Get started by creating a completely new, empty threat model).
It should open a new model, but in reality I get the error: [Error] Cannot find module '../../ThreatDragonModels/new-model/new-model.json' Require.

A directory listing of the installed files is as follows:

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 locales
d---- 22/08/2021 21:03 resources
d---- 22/08/2021 21:03 swiftshader
-a--- 22/08/2021 21:03 179639 chrome_100_percent.pak
-a--- 22/08/2021 21:03 319775 chrome_200_percent.pak
-a--- 22/08/2021 21:03 4481992 d3dcompiler_47.dll
-a--- 14/09/2021 16:39 0 directory.txt
-a--- 22/08/2021 21:03 2772480 ffmpeg.dll
-a--- 22/08/2021 21:03 10505952 icudtl.dat
-a--- 22/08/2021 21:03 379904 libEGL.dll
-a--- 22/08/2021 21:03 7863296 libGLESv2.dll
-a--- 22/08/2021 21:03 1080 LICENSE.electron.txt
-a--- 22/08/2021 21:03 4867184 LICENSES.chromium.html
-a--- 22/08/2021 21:03 111100928 OWASP-Threat-Dragon.exe
-a--- 22/08/2021 21:03 4803373 resources.pak
-a--- 22/08/2021 21:03 50599 snapshot_blob.bin
-a--- 22/08/2021 21:03 494058 Uninstall OWASP-Threat-Dragon.exe
-a--- 22/08/2021 21:03 170899 v8_context_snapshot.bin
-a--- 22/08/2021 21:03 106 vk_swiftshader_icd.json
-a--- 22/08/2021 21:03 4472832 vk_swiftshader.dll
-a--- 22/08/2021 21:03 623616 vulkan-1.dll

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\locales

Mode LastWriteTime Length Name


-a--- 22/08/2021 21:03 136957 am.pak
-a--- 22/08/2021 21:03 139253 ar.pak
-a--- 22/08/2021 21:03 149152 bg.pak
-a--- 22/08/2021 21:03 195947 bn.pak
-a--- 22/08/2021 21:03 96585 ca.pak
-a--- 22/08/2021 21:03 98511 cs.pak
-a--- 22/08/2021 21:03 89891 da.pak
-a--- 22/08/2021 21:03 96190 de.pak
-a--- 22/08/2021 21:03 166838 el.pak
-a--- 22/08/2021 21:03 80280 en-GB.pak
-a--- 22/08/2021 21:03 81063 en-US.pak
-a--- 22/08/2021 21:03 94235 es-419.pak
-a--- 22/08/2021 21:03 96744 es.pak
-a--- 22/08/2021 21:03 86125 et.pak
-a--- 22/08/2021 21:03 133802 fa.pak
-a--- 22/08/2021 21:03 88954 fi.pak
-a--- 22/08/2021 21:03 98025 fil.pak
-a--- 22/08/2021 21:03 104277 fr.pak
-a--- 22/08/2021 21:03 187286 gu.pak
-a--- 22/08/2021 21:03 116937 he.pak
-a--- 22/08/2021 21:03 192210 hi.pak
-a--- 22/08/2021 21:03 93919 hr.pak
-a--- 22/08/2021 21:03 100006 hu.pak
-a--- 22/08/2021 21:03 86674 id.pak
-a--- 22/08/2021 21:03 93958 it.pak
-a--- 22/08/2021 21:03 113548 ja.pak
-a--- 22/08/2021 21:03 215358 kn.pak
-a--- 22/08/2021 21:03 95815 ko.pak
-a--- 22/08/2021 21:03 102034 lt.pak
-a--- 22/08/2021 21:03 100735 lv.pak
-a--- 22/08/2021 21:03 226815 ml.pak
-a--- 22/08/2021 21:03 184438 mr.pak
-a--- 22/08/2021 21:03 88659 ms.pak
-a--- 22/08/2021 21:03 87348 nb.pak
-a--- 22/08/2021 21:03 91367 nl.pak
-a--- 22/08/2021 21:03 98745 pl.pak
-a--- 22/08/2021 21:03 93645 pt-BR.pak
-a--- 22/08/2021 21:03 94309 pt-PT.pak
-a--- 22/08/2021 21:03 96749 ro.pak
-a--- 22/08/2021 21:03 152481 ru.pak
-a--- 22/08/2021 21:03 99941 sk.pak
-a--- 22/08/2021 21:03 95506 sl.pak
-a--- 22/08/2021 21:03 143431 sr.pak
-a--- 22/08/2021 21:03 87436 sv.pak
-a--- 22/08/2021 21:03 88707 sw.pak
-a--- 22/08/2021 21:03 221307 ta.pak
-a--- 22/08/2021 21:03 205471 te.pak
-a--- 22/08/2021 21:03 178071 th.pak
-a--- 22/08/2021 21:03 91944 tr.pak
-a--- 22/08/2021 21:03 153087 uk.pak
-a--- 22/08/2021 21:03 108193 vi.pak
-a--- 22/08/2021 21:03 80895 zh-CN.pak
-a--- 22/08/2021 21:03 80963 zh-TW.pak

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 app.asar.unpacked
-a--- 22/08/2021 21:03 101 app-update.yml
-a--- 22/08/2021 21:03 38196388 app.asar
-a--- 22/08/2021 21:03 107520 elevate.exe

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 node_modules

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 pug-filters

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules\pug-filters

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 node_modules

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules\pug-filters\node_modules

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 uglify-js

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules\pug-filters\node_modules\uglify-js

Mode LastWriteTime Length Name


d---- 22/08/2021 21:03 bin
d---- 22/08/2021 21:03 lib
d---- 22/08/2021 21:03 tools
-a--- 22/08/2021 21:03 1348 LICENSE
-a--- 22/08/2021 21:03 947 package.json

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules\pug-filters\node_modules\uglify-js\bin

Mode LastWriteTime Length Name


-a--- 22/08/2021 21:03 1982 extract-props.js
-a--- 22/08/2021 21:03 21426 uglifyjs

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules\pug-filters\node_modules\uglify-js\lib

Mode LastWriteTime Length Name


-a--- 22/08/2021 21:03 34888 ast.js
-a--- 22/08/2021 21:03 179487 compress.js
-a--- 22/08/2021 21:03 22265 mozilla-ast.js
-a--- 22/08/2021 21:03 47999 output.js
-a--- 22/08/2021 21:03 57351 parse.js
-a--- 22/08/2021 21:03 8895 propmangle.js
-a--- 22/08/2021 21:03 23483 scope.js
-a--- 22/08/2021 21:03 3644 sourcemap.js
-a--- 22/08/2021 21:03 6938 transform.js
-a--- 22/08/2021 21:03 11096 utils.js

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar.unpacked\node_modules\pug-filters\node_modules\uglify-js\tools

Mode LastWriteTime Length Name


-a--- 22/08/2021 21:03 142838 domprops.json
-a--- 22/08/2021 21:03 688 exports.js
-a--- 22/08/2021 21:03 10194 node.js
-a--- 22/08/2021 21:03 1640 props.html

Directory: C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\swiftshader

Mode LastWriteTime Length Name


-a--- 22/08/2021 21:03 400384 libEGL.dll
-a--- 22/08/2021 21:03 3775488 libGLESv2.dll

File -> Toggle developer tools shows:

Electron Deprecation Warning The 'remote' module is deprecated and will be disabled by default in a future version of Electron. To ensure a smooth upgrade and silence this warning, specify {enableRemoteModule: true} in the WebPreferences for this window.
(anonymous) @ electron/js2c/renderer_init.js:83
C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697 [shell] Threat Dragon loaded! null
C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697 [welcome] Activated Welcome View undefined
C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697 Error: Cannot find module '../../ThreatDragonModels/new-model/new-model.json'
Require stack:

  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\welcome.js
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\index.js
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:797)
    at Function.o._resolveFilename (electron/js2c/renderer_init.js:43)
    at Module._load (internal/modules/cjs/loader.js:690)
    at Function.Module._load (electron/js2c/asar.js:769)
    at Module.require (internal/modules/cjs/loader.js:852)
    at require (internal/modules/cjs/helpers.js:74)
    at welcome.openNewModel (C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\welcome.js:50)
    at C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:17073
    at callback (C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:29123)
    at ChildScope.$eval (C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:19523) undefined
    (anonymous) @ C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697
    C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697 [app] [Error] Cannot find module '../../ThreatDragonModels/new-model/new-model.json'
    Require stack:
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\welcome.js
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\index.js
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\index.html Object
    (anonymous) @ C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697
    C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:15697 Error: Cannot find module '../../ThreatDragonModels/demo-threat-model/demo-threat-model.json'
    Require stack:
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\welcome.js
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\index.js
  • C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:797)
    at Function.o._resolveFilename (electron/js2c/renderer_init.js:43)
    at Module._load (internal/modules/cjs/loader.js:690)
    at Function.Module._load (electron/js2c/asar.js:769)
    at Module.require (internal/modules/cjs/loader.js:852)
    at require (internal/modules/cjs/helpers.js:74)
    at welcome.openNewModel (C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\app\welcome\welcome.js:50)
    at C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:17073
    at callback (C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:29123)
    at ChildScope.$eval (C:\Users\huw.jeffries\AppData\Local\Programs\threat-dragon-desktop\resources\app.asar\node_modules\angular\angular.js:19523) undefined

Any additional context, screenshots, etc

@huwjeffries huwjeffries added the bug Something isn't working label Sep 14, 2021
@jgadsden jgadsden self-assigned this Sep 14, 2021
@jgadsden
Copy link
Collaborator

Hello @huwjeffries - yes, sorry, this is a bug and we have bug report for it #262 . This bug was closed because we now have a fix in place - but have not yet released it.

The work around is to use 'New' from the pull down menu and that will give you your new model.

I will put a note to this effect on the release page. I should have done this before now, and it would have saved you some aggravation (apologies again)

Thanks for the bug report,
Jon

@jgadsden jgadsden linked a pull request Sep 14, 2021 that will close this issue
@jgadsden
Copy link
Collaborator

Hello @huwjeffries - we have a new version 1.5.5 out that should fix this bug; it works on my Windows machine.

Could you try this out please and confirm that it works for you? Thanks, Jon

@huwjeffries
Copy link
Author

@jgadsden - Version 1.5.5 seems to work well. Thanks very much for your quick response and release.

jgadsden added a commit that referenced this issue Sep 21, 2021
bugfix: sort out globstars for cross-platform, fixes #267
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants