BIG-RAT / jamfcpr

Replicate packages between Jamf Pro Servers
Apache License 2.0
76 stars 3 forks source link

Fails to save server #23

Closed sbryant82 closed 5 months ago

sbryant82 commented 5 months ago

After updating to 4.1.1, currently saved server info is viewable but getting errors that it's not all filled out properly. attempted to delete them all and rebuild them. After clicking the Connect button, it spins and then does nothing.

Looking at the log file, it is reaching out and getting a token but still not saving the server and allowing the app to move forward.

20240226_093923 ------------------------------------------------------- 20240226_093923 - jamf CPR Version: 4.1.1 Build: 20240226.102031 20240226_093923 ------------------------------------------------------- 20240226_093923 searching the keychain for JPMA- 20240226_093923 searching the keychain for JPMA- 20240226_093931 searching the keychain for JPMA-.jamfcloud.com 20240226_093931 searching the keychain for JPMA-.jamfcloud.com 20240226_093938 searching the keychain for JPMA-.jamfcloud.com 20240226_093939 [JamfPro.getToken] Source is using API client / secret for authenication 20240226_093939 [JamfPro.getToken] Attempting to retrieve token from https://.jamfcloud.com/api/oauth/token 20240226_093940 [JamfPro.getToken] new token created for https://.jamfcloud.com 20240226_093940 [JamfPro.getToken] Source will be renewed: false 20240226_093941 [ApiAction.action] Token retrieved from https://.jamfcloud.com/uapi/v1/jamf-pro-version. 20240226_093941 [JamfPro.getVersion] Source Jamf Pro Version: 11.2.1-t1707143529 20240226_093941 [JamfPro.getVersion] https://.jamfcloud.com set to use OAuth 20240226_093941 searching the keychain for jamfcpr-apiClient-.jamfcloud.com 20240226_093942 [classic] Retrieved information from https://.jamfcloud.com/JSSResource/distributionpoints.

BIG-RAT commented 5 months ago

If you click the edit (pencil) button and re-enter the info are you able to connect? Does it happen when username / password also?

sbryant82 commented 5 months ago

Using the pencil or username/password does any change. the app is unusable to me at this time.

armandosiliezar commented 5 months ago

I'm having the same issue. I enter a new source, hit connect, it spins for a second, and then just sit there, not saving it or moving on.

BIG-RAT commented 5 months ago

Haven't been able to replicate the issue as I try different configurations. Any change I could a look at your preference file: ~/Library/Group Containers/group.PS2F6S478M.jamfie.SharedJPMA/Library/Preferences/group.PS2F6S478M.jamfie.SharedJPMA.plist

Mask the values related to your environment to something like:

<dict>
    <key>created</key>
    <date>2024-02-26T20:27:12Z</date>
    <key>serverDict</key>
    <dict/>
    <key>serversDict</key>
    <dict>
        <key>SOURCE.jamfcloud.com</key>
        <dict>
            <key>account</key>
            <string>sourceUser</string>
            <key>date</key>
            <date>2024-02-26T20:27:50Z</date>
            <key>server</key>
            <string>https://source.jamfcloud.com</string>
            <key>useApiClient</key>
            <integer>0</integer>
        </dict>
    </dict>
</dict>
</plist>

you may or may not have the useApiClient key. Feel free to hit me (lnh_slack) up on MacAdmins slack.

sbryant82 commented 5 months ago

![Uploading plist view.png…]() Looking at it in xcode, that plist on my end only has the created date and a blank dict.

sbryant82 commented 5 months ago

removing that plist and attempting to add in the server yields the same results.

armandosiliezar commented 5 months ago

Same here.

Screenshot 2024-02-26 at 3 47 19 PM
BIG-RAT commented 5 months ago

Wonder if you might be able to run a script to query and list files currently on your JCDS. list files Don't care what files it finds as long as it lists the files for you.

Response should contain something like:

.
.

HTTP response: 200
response time: 2 seconds

Mon Feb 26 16:55:52 EST 2024
package plist
[ {
  "fileName" : "fake_20240214_190726.pkg",
  "length" : 1048576,
  "md5" : "b6d81b360a5672d80c27430f39153e2c",
  "region" : "us-east-1",
  "sha3" : 
.
.
Memnoch-The-Red commented 5 months ago

I am having the same issue. Enter source info and it spins like it is connecting and nothing.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>created</key>
    <date>2024-01-18T17:04:48Z</date>
    <key>serversDict</key>
    <dict/>
</dict>
</plist>
Memnoch-The-Red commented 5 months ago

List files did work for me:

TTP response: 200
response time: 2 seconds

Mon Feb 26 16:43:04 CST 2024
package plist
[ {
  "fileName" : "fake.pkg",
  "length" : 3149,
  "md5" : "xxxxxxxxxxxxxx123456789",
  "region" : "us-east-1",
  "sha3" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
armandosiliezar commented 5 months ago

I can list the files with the script.

`HTTP response: 200 response time: 1 seconds

Mon Feb 26 20:03:36 EST 2024 package plist [ { "fileName" : "package.pkg", "length" : 11727436, "md5" : "dc6a2b846af9189a145686a7f68984799", "region" : "us-east-1", "sha3" : "677ebe53557e9e47b287459e975151c8ed985b13dc2186c5b8565f58c4e6ec20b161cb761f8249a22a5f8f9f487b2e2efa6c2abf1e4ad05f3fa06b88cdb955da" }, `

BIG-RAT commented 5 months ago

🤞 Believe I found the issue. See if v4.1.2 resolves this one.

armandosiliezar commented 5 months ago

Yes. i was able to save Source and then move on to destination, only issue i saw now was it prompted me to enter destination twice even though it seem to have saved it the first time. I just hit cancel on the second prompt and it worked just fine.

sbryant82 commented 5 months ago

Yes, thank you. This seems to be working again as expected. Was able to create a new source and destination and replicate files again.

Shawn Bryant Computer Configuration Administrator I Information Technology - Customer Support

(866) 447-2869

[signature_859457657] Liberty University | Training Champions for Christ since 1971

From: Leslie Helou @.> Date: Monday, February 26, 2024 at 9:02 PM To: BIG-RAT/jamfcpr @.> Cc: Bryant, Shawn M (IT Endpoint Device Management) @.>, Author @.> Subject: [External] Re: [BIG-RAT/jamfcpr] Fails to save server (Issue #23) You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification


[ EXTERNAL EMAIL: Do not click any links or open attachments unless you know the sender and trust the content. ]


🤞 Believe I found the issue. See if v4.1.2 resolves this one.

— Reply to this email directly, view it on GitHubhttps://github.com/BIG-RAT/jamfcpr/issues/23#issuecomment-1965655668, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6CYN4NOXRRKOFBQBKJTM2LYVU5CHAVCNFSM6AAAAABD2KVLFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGY2TKNRWHA. You are receiving this because you authored the thread.Message ID: @.***>

Memnoch-The-Red commented 5 months ago

Agree. 4.1.2 fixed my issue, as well.