jamfcpr icon indicating copy to clipboard operation
jamfcpr copied to clipboard

"Save only" mode does not work

Open entusdictus opened this issue 11 months ago • 5 comments

There are multiple issues with "Save only" mode in jamfcpr. First issue to reproduce:

  • open jamfcpr and directly select "Save only" from options.
  • choose "List" to list the packages
  • result: an error appears (Unable to retrieve data from the JCDS on https://YOURINSTANCE.jamfcloud.com. Status code: 401). This error points to the second instance that should not even be queried when using "Save only" mode. The server connection works btw, but this misleading error is thrown.
  • expected result: only the primary server is queried

Second issue to reproduce:

  • open jamfcpr, select one servers as source and a second as destination
  • select one or more packages to replicate
  • select "Save only" from options and click "Save" to start package download
  • result: an error is thrown (No packages that need updating were selected to replicate.)
  • expected result: package download starts.

entusdictus avatar Mar 15 '24 06:03 entusdictus

Thanks for the details. Issue has been addressed in jamfcpr_5.0.0-b2

BIG-RAT avatar Mar 16 '24 01:03 BIG-RAT

This issue is fixed, but a new one arrived:

Unable to locate the destination: /Users/enti/Library/Containers/jamf.ie.jamfcpr/Data/Downloads/jamfcpr Verify the folder exists and/or the appropriate share is mounted.

This happens when I select "Save only" and then "List".

entusdictus avatar Mar 18 '24 07:03 entusdictus

Nice catch. Folder isn't created if you run Save Only before ever copying packages from one distro to another. Fixed in latest beta

BIG-RAT avatar Mar 18 '24 13:03 BIG-RAT

Confirmed, fixed from my end but a new one arrived (I'm sorry, really... 😁)

Steps to reproduce:

  • open jamfcpr, select "save only". Servers were already predefined from previous tries
  • hit "list"
  • result: an error is thrown (sorry, I didn't copy it...). wording was something like "unable to query source"

I fixed it by disabling "save only", hit "list" once to query both source and destination, selected "save only" again and now listing works even after re-launching the app and for other sources.

20240318_143123 -------------------------------------------------------
20240318_143123 -   jamf CPR Version: 5.0.0-b3 Build: 20240318.125643
20240318_143123 -------------------------------------------------------
20240318_143123 searching the keychain for JPMA-YOURINSTANCE.jamfcloud.com
20240318_143123 searching the keychain for JPMA-YOURINSTANCEdev.jamfcloud.com
20240318_143126 [ViewController.reset]
20240318_143126 [ViewController.reloadFileList] source: https://YOURINSTANCE.jamfcloud.com
20240318_143126 [ViewController.reloadFileList] display packages from source JCDS
20240318_143126 [ViewController.reloadFileList] call packageTableView.reloadData()
20240318_143126 searching the keychain for JPMA-YOURINSTANCE.jamfcloud.com
20240318_143126 searching the keychain for JPMA-YOURINSTANCEdev.jamfcloud.com
20240318_143126 [VewController.list_Button] cleared current package list
20240318_143126 [VewController.list_Button] get token for https://YOURINSTANCE.jamfcloud.com
20240318_143126 [VewController.list_Button] Generate token for  source Jamf Pro...
20240318_143126 [JamfPro.getToken] Source is using username / password for authenication
20240318_143126 [JamfPro.getToken] Attempting to retrieve token from https://YOURINSTANCE.jamfcloud.com/api/v1/auth/token
20240318_143126 [ViewController.reset]
20240318_143126 [ViewController.reloadFileList] source: https://YOURINSTANCE.jamfcloud.com
20240318_143126 [ViewController.reloadFileList] display packages from source JCDS
20240318_143126 [ViewController.reloadFileList] call packageTableView.reloadData()
20240318_143229 [JamfPro.getToken] token response error from https://YOURINSTANCE.jamfcloud.com. Verify url and port
20240318_143300 searching the keychain for JPMA-YOURINSTANCE.jamfcloud.com
20240318_143300 [ViewController.reset]
20240318_143300 [ViewController.reloadFileList] source: https://YOURINSTANCE.jamfcloud.com
20240318_143300 [ViewController.reloadFileList] display packages from source JCDS
20240318_143300 [ViewController.reloadFileList] call packageTableView.reloadData()
20240318_143300 searching the keychain for JPMA-YOURINSTANCE.jamfcloud.com
20240318_143300 searching the keychain for JPMA-YOURINSTANCEdev.jamfcloud.com
20240318_143300 [VewController.list_Button] cleared current package list
20240318_143300 [VewController.list_Button] get token for https://YOURINSTANCE.jamfcloud.com
20240318_143300 [VewController.list_Button] Generate token for  source Jamf Pro...
20240318_143300 [JamfPro.getToken] Source is using username / password for authenication
20240318_143300 [JamfPro.getToken] Attempting to retrieve token from https://YOURINSTANCE.jamfcloud.com/api/v1/auth/token
20240318_143300 [ViewController.reset]
20240318_143300 [ViewController.reloadFileList] source: https://YOURINSTANCE.jamfcloud.com
20240318_143300 [ViewController.reloadFileList] display packages from source JCDS
20240318_143300 [ViewController.reloadFileList] call packageTableView.reloadData()
20240318_143522 [JamfPro.getToken] token response error from https://YOURINSTANCE.jamfcloud.com. Verify url and port
20240318_143524 [ViewController.reset]
20240318_143524 [ViewController.reloadFileList] source: https://YOURINSTANCE.jamfcloud.com
20240318_143524 [ViewController.reloadFileList] display packages from source JCDS
20240318_143524 [ViewController.reloadFileList] call packageTableView.reloadData()
20240318_143524 searching the keychain for JPMA-YOURINSTANCE.jamfcloud.com
20240318_143524 searching the keychain for JPMA-YOURINSTANCEdev.jamfcloud.com
20240318_143524 [VewController.list_Button] cleared current package list
20240318_143524 [VewController.list_Button] get token for https://YOURINSTANCE.jamfcloud.com
20240318_143524 [VewController.list_Button] Generate token for  source Jamf Pro...
20240318_143524 [JamfPro.getToken] Source is using username / password for authenication
20240318_143524 [JamfPro.getToken] Attempting to retrieve token from https://YOURINSTANCE.jamfcloud.com/api/v1/auth/token
20240318_143524 [ViewController.reset]
20240318_143524 [ViewController.reloadFileList] source: https://YOURINSTANCE.jamfcloud.com
20240318_143524 [ViewController.reloadFileList] display packages from source JCDS
20240318_143524 [ViewController.reloadFileList] call packageTableView.reloadData()
20240318_143525 [JamfPro.getToken] new token created for https://YOURINSTANCE.jamfcloud.com
20240318_143525 [JamfPro.getToken] Source will be renewed: false
20240318_143525 [ApiAction.action] Token retrieved from https://YOURINSTANCE.jamfcloud.com/uapi/v1/jamf-pro-version.
20240318_143525 [JamfPro.getVersion] Source Jamf Pro Version: 11.3.2-t1710427376
20240318_143525 [JamfPro.getVersion] https://YOURINSTANCE.jamfcloud.com set to use OAuth
20240318_143525 [VewController.list_Button] Querying source JCDS...
20240318_143525 [VewController.list_Button] found 38 packages on the source distribution point.
20240318_143525 [VewController.list_Button] Querying source Jamf Pro Server...
20240318_143525 [ApiAction.getPackages] enter
20240318_143525 [ApiAction.getPackages] Getting packages
20240318_143525 [ApiAction.getPackages] URL: https://YOURINSTANCE.jamfcloud.com/JSSResource/packages
20240318_143525 [ApiAction.getPackages] Getting all endpoints from: https://YOURINSTANCE.jamfcloud.com/JSSResource/packages
20240318_143525 [ApiAction.getPackages] endpointJSON: ["packages": <__NSArrayI 0x14680b250>(
{
    id = 398;
    name = "Adobe Creative Cloud 6.0.0.pkg";
},
.......
)
])

entusdictus avatar Mar 18 '24 13:03 entusdictus

All good - sounds like I need to get a clean profile to do more testing on. I had have random issues with the account info looking like it's there but when I try to run it's giving a similar message to the one you saw. Change something or just tab through the server/username/password fields and it works fine.

BIG-RAT avatar Mar 18 '24 14:03 BIG-RAT