setup-your-mac / Setup-Your-Mac

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
https://snelson.us/sym
MIT License
246 stars 54 forks source link

JSON Error when running #45

Closed SirDrSpiderpig closed 1 year ago

SirDrSpiderpig commented 1 year ago

Downloaded the 1.9.0 script from GitHub to test out. Followed the website guide to do a dry run to test it out. Welcome screen didn't come up and got the following error in the logs: -e 2023-04-28 09:45:20 - # # # SETUP YOUR MAC VERBOSE DEBUG MODE: Line No. 1980 # # # -e 2023-04-28 09:45:20 - WELCOME DIALOG: roiegat entered information and clicked Continue execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "JSON" (-2700) execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "JSON" (-2700) execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "JSON" (-2700) execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "JSON" (-2700) execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "JSON" (-2700)

Steps to reproduce: 1) Run curl command to get script 2) Run script as sudo

SirDrSpiderpig commented 1 year ago

Just saw the troubleshooting page and will try the fix....odd that's it on the downloadable version..or is that a test for us?

SirDrSpiderpig commented 1 year ago

So ran the troubleshooting steps and put it back in the code...even though its valid JSON its still getting that error.

SirDrSpiderpig commented 1 year ago

Aplogize for the comments...but looking at /var/tmp/welcomedialog.XXX it seems like its adding the words: quit:

to the end of the file that's causing it to fail he JSON validation....will look at the code and see if I can find what's adding that.

SirDrSpiderpig commented 1 year ago

was using sh to run it and noticed that test command was using bash. Bash worked fine.