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

Unable to run an audit starting with the 07/14/2023 portable release #154

Closed
jcrain23 opened this issue Aug 22, 2023 · 10 comments
Closed

Unable to run an audit starting with the 07/14/2023 portable release #154

jcrain23 opened this issue Aug 22, 2023 · 10 comments

Comments

@jcrain23
Copy link

Hello,
I've been able to use PurpleHats with any release after 07/04.

I execute "Node Index" and it just stops. I found this in "errors.txt":
{"timestamp":"2023-08-22 11:50:11","level":"error","message":"uncaughtException: Unexpected end of JSON input\nSyntaxError: Unexpected end of JSON input\n at JSON.parse ()\n at getUserDataTxt (file:///C:/Users/Jackc/Desktop/Purple0822/purple-hats/utils.js:68:27)\n at file:///C:/Users/Jackc/Desktop/Purple0822/purple-hats/constants/questions.js:12:18\n at ModuleJob.run (node:internal/modules/esm/module_job:193:25)\n at async Promise.all (index 0)\n at async ESMLoader.import (node:internal/modules/esm/loader:530:24)\n at async loadESM (node:internal/process/esm_loader:91:5)\n at async handleMainPromise (node:internal/modules/run_main:65:12)"}

Can you help? I'd like to take advantage of the latest updates. I'm on Windows10

@jcrain23 jcrain23 changed the title Unable to run an audit starting with the 07/14/2023 portabale release Unable to run an audit starting with the 07/14/2023 portable release Aug 22, 2023
@younglim
Copy link
Collaborator

Hi @jcrain23

Thanks for your feedback. We have resolved the node index in v0.9.13.

@jcrain23
Copy link
Author

Thank you!!! I'm downloading the latest release, cool to see we'll be able to specify the path for results. I do miss the old excel export, but I'm making due. :-)

@jcrain23
Copy link
Author

@younglim Different issue with the latest release. I'll debug on my end to see if I can figure anything out, but I'm not a coder. {"timestamp":"2023-08-24 09:23:35","level":"error","message":"uncaughtException: Unexpected end of JSON input\nSyntaxError: Unexpected end of JSON input\n at JSON.parse ()\n at getUserDataTxt (file:///C:/Users/Jackc/Desktop/Purple_0824/purple-hats/utils.js:74:27)\n at file:///C:/Users/Jackc/Desktop/Purple_0824/purple-hats/constants/questions.js:12:18\n at ModuleJob.run (node:internal/modules/esm/module_job:193:25)\n at async Promise.all (index 0)\n at async ESMLoader.import (node:internal/modules/esm/loader:530:24)\n at async loadESM (node:internal/process/esm_loader:91:5)\n at async handleMainPromise (node:internal/modules/run_main:65:12)"}

@younglim
Copy link
Collaborator

Hi @jcrain23,

Would you try to remove userData.txt by running the following command?
rm "$env:APPDATA\Purple HATS\userData.txt"

Then retry node index again.

@jcrain23
Copy link
Author

@younglim Figured it out.userData.txt is being created empty. After putting in {} and saving userData.txt it runs fine.

@jcrain23
Copy link
Author

@younglim I spoke to soon. While I was able to get up to the point if it asking me the URL of the website to test, it would execute.
image

@jcrain23
Copy link
Author

@younglim Ah! Missing folders in the download zip
image

@younglim
Copy link
Collaborator

The Chromium and other browsers have been removed since v0.9.13 to reduce download size.

Run the command similar to the mentioned in your PowerShell output, or simple the following to install Chromium:
npx playwright install chromium

Hope this helps!

@younglim
Copy link
Collaborator

@younglim Figured it out.userData.txt is being created empty. After putting in {} and saving userData.txt it runs fine.

You would minimally the following within userData.txt
{"name":"USERNAME","email":"[email protected]"}

@jcrain23
Copy link
Author

Thanks @younglim, installing Chromium did the trick. I'm up and running! Have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants