grokability / jamf2snipe

Import and sync assets from a JAMFPro instance to Snipe-IT asset management.
MIT License
113 stars 55 forks source link

iOS Devices seem to break sync #65

Closed robcraigfl closed 2 years ago

robcraigfl commented 3 years ago

If I have any iOS devices listed in Jamf under "Device" it seems to break the sync with the error:

Check to make sure there's actually a result

    if jsonresponse['total'] == 1:
        return jsonresponse

I have one device in Jamf, iPhone8,1 and there is an Asset Model created with that model name: iPhone8,1.

Any ideas why it breaks and errors out? thanks,

ParadoxGuitarist commented 2 years ago

Sorry it's taking a while to get to this.

There's been a bunch of changes to the Devel branch. Can you clone that one, run it with debug turned on and submit any logs/errors?

ParadoxGuitarist commented 2 years ago

Acutally it's in main now, so if you have issues still, be sure to re-open the issue and include some of the logs when you run with --debug (there will be a lot)

robcraigfl commented 2 years ago

Hi Brian, I think this issue is with personally enrolled iOS devices. Jamf does not collect the serial number of the device if it's a personally enrolled. Is there a way for the script to skip this part so it does not fail?

INFO:root:Processing entry 192 out of 205 - JAMFID: 9 - NAME: iPhone Traceback (most recent call last): File "/home/runner/work/jamf2snipe/jamf2snipe/jamf2snipe", line 703, in snipe = search_snipe_asset(jamf['general']['serial_number']) File "/home/runner/work/jamf2snipe/jamf2snipe/jamf2snipe", line 373, in search_snipe_asset if jsonresponse['total'] == 1: KeyError: 'total' Error: Process completed with exit code 1.

Regards,

On Thu, 10 Feb 2022 at 09:42, Brian Monroe @.***> wrote:

Acutally it's in main now, so if you have issues still, be sure to re-open the issue and include some of the logs when you run with --debug (there will be a lot)

— Reply to this email directly, view it on GitHub https://github.com/ParadoxGuitarist/jamf2snipe/issues/65#issuecomment-1034641863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS3Q5LOLAMZVM3VZRNHDQ5LU2N27BANCNFSM5BESIXZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

--

FutureLearn Limited is a company incorporated in England and Wales with registered number 8324083 whose registered address is 71 Queen Victoria Street London EC4V 4BE United Kingdom.

Confidentiality: This e-mail and its attachments may contain confidential, privileged, proprietary, or otherwise private information. If they have come to you in error you must not copy, disseminate, distribute or show them to anyone; please notify the sender immediately and delete the original. Although FutureLearn has taken reasonable precautions to ensure no viruses are present in this email, it cannot accept responsibility for any loss or damage arising from the use of this email or attachments.

ParadoxGuitarist commented 2 years ago

I think this is a duplicate of #58 I might be mistaken but I think sn might be a required field?