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

'checkNetworkQualityConfigurations' function executes unexpectedly when 'checkNetworkQualityCatchAllConfiguration' should be used #46

Closed jonlonergan closed 1 year ago

jonlonergan commented 1 year ago

Before submitting a Setup Your Mac bug report, please review the open swiftDialog issues to help determine the source of the issue.

Describe the bug While using version 1.10.0-rc26, the network quality test feature is not functioning as expected. The checkNetworkQualityCatchAllConfiguration function does not seem to be used despite having the appropriate variables set. Instead, it falls back to checkNetworkQualityConfigurations.

To Reproduce

Expected behavior The welcome dialog should show one Network Quality estimate for the Catch-all configuration, and not show the three configuration time estimates. The Setup Your Mac dialog should also display the Catch-all Network Quality estimate.

Code/log output Note: this is just a snip-it, not a complete log...

2023-04-28 16:41:55 - WELCOME DIALOG: Starting networkqualityTest …
2023-04-28 16:41:56 - WELCOME DIALOG: Write 'welcomeJSON' to /var/tmp/welcomeJSONFile.HHd …
2023-04-28 16:41:56 - WELCOME DIALOG: Display Welcome dialog 'infobox' animation …
2023-04-28 16:41:56 - WELCOME DIALOG: Display 'Welcome' dialog …
2023-04-28 16:42:13 - # # # SETUP YOUR MAC VERBOSE DEBUG MODE: Line No. 2237 # # #
/Users/jlonergan/Desktop/Setup-Your-Mac-via-Dialog-1.10.0-rc26-reference.bash: line 174: 91069 Terminated: 15          welcomeDialogInfoboxAnimation "$myPID"
2023-04-28 16:42:13 - WELCOME DIALOG: Completed networkqualityTest …
2023-04-28 16:42:13 - WELCOME DIALOG: 562.47 (Mbps)
2023-04-28 16:42:13 - WELCOME DIALOG: Configuration One Estimated Seconds: 218
2023-04-28 16:42:13 - WELCOME DIALOG: Configuration One Estimate: 0h:3m:38s
2023-04-28 16:42:13 - WELCOME DIALOG: Configuration Two Estimated Seconds: 399
2023-04-28 16:42:13 - WELCOME DIALOG: Configuration Two Estimate: 0h:6m:39s
2023-04-28 16:42:13 - WELCOME DIALOG: Configuration Three Estimated Seconds: 654
2023-04-28 16:42:13 - WELCOME DIALOG: Configuration Three Estimate: 0h:10m:54s
2023-04-28 16:42:13 - WELCOME DIALOG: Network Quality Test: Started: 4/28/23, 4:41:56 PM, Ended: 4/28/23, 4:42:13 PM; Download: 562.47 Mbps, Responsiveness: 102
2023-04-28 16:42:17 - WELCOME DIALOG: jlonergan entered information and clicked Continue
execution error: Error: TypeError: undefined is not an object (evaluating 'JSON.parse(env)['Configuration']['selectedValue']') (-2700)
execution error: Error: TypeError: undefined is not an object (evaluating 'JSON.parse(env)['Department']['selectedValue']') (-2700)
execution error: Error: TypeError: undefined is not an object (evaluating 'JSON.parse(env)['Building']['selectedValue']') (-2700)
2023-04-28 16:42:17 - WELCOME DIALOG: • Computer Name: 
2023-04-28 16:42:17 - WELCOME DIALOG: • User Name: 
2023-04-28 16:42:17 - WELCOME DIALOG: • Asset Tag: 00000
2023-04-28 16:42:17 - WELCOME DIALOG: • Configuration: 
2023-04-28 16:42:17 - WELCOME DIALOG: • Department: 
2023-04-28 16:42:17 - WELCOME DIALOG: • Building: 
2023-04-28 16:42:17 - WELCOME DIALOG: • Room: 
2023-04-28 16:42:17 - # # # SETUP YOUR MAC VERBOSE DEBUG MODE: Line No. 775 # # #
2023-04-28 16:42:17 - WELCOME DIALOG: PolicyJSON Configuration: 
2023-04-28 16:42:17 - WELCOME DIALOG: jlonergan did NOT specify a new computer name

Screenshots Screenshot 2023-04-28 at 4 16 48 PM

Environment (please complete the following information):

Additional context Add any other context about the problem here.

dan-snelson commented 1 year ago

Thanks for reporting this use-case, @jonlonergan.

dan-snelson commented 1 year ago

@jonlonergan: Will you please test 1.10.0-rc27 and advise if the issue is resolved?

jonlonergan commented 1 year ago

Thank you Dan - will test 1.10.0-rc27 on Monday and report back.

jonlonergan commented 1 year ago

Hi @dan-snelson, the issue is resolved. Thank you! Best, Jon

dan-snelson commented 1 year ago

Thanks for the report and confirmation, @jonlonergan.