jamf / mut

MIT License
133 stars 11 forks source link

Error 400! #2

Closed rspetman closed 6 years ago

rspetman commented 6 years ago

Can you explain what error 400! is please?

mike-levenick commented 6 years ago

Hello, the error codes which are displayed are HTTP error codes. HTTP error code 400 is "bad request" and is usually something to do with malformed XML being submitted, or trying to submit the wrong thing to the wrong place.

If you'd like, you can turn on advanced debugging under the settings menu at the top of the screen, then do the update run again, and then paste part of the contents of the log box here and I'll take a look.

rspetman commented 6 years ago

This is what I get

Full Response Data:

Status page

Bad Request

Unable to match mobile_device

You can get technical details here.
Please continue your visit at our home page.

mike-levenick commented 6 years ago

Interesting, can you please paste the whole top of the output, the part that gets generated like when you run the pre-flight check?

rspetman commented 6 years ago

CSV: /Users/rachel/Downloads/NSA Device Name.csv Found 65 rows in the CSV.

Example row from your CSV: SerialNumber: xxxxxxxxxxxxxxxxx, Device Name: xxxxxxxxxxxxx

================================================== Please review the above information. If everything looks good, press the submit button. Otherwise, please verify the dropdowns and your CSV file and run another pre-flight check.

rspetman commented 6 years ago

I've done this successfully over 15 times now, and suddenly two batches are failing. I confirmed the SN's are in jamf.

mike-levenick commented 6 years ago

I see. Can you re-create consistently, and is it always the same devices failing? Are other devices working successfully?

Are the devices showing up as managed and supervised in the JSS? Can you send other MDM commands to them such as inventory updates?

One other thing to try would be to do a "clear defaults" from the settings menu at the top, then close the app, restart it, set everything up, turn on advanced debugging, and run another update, and then paste the whole output if you don't mind (from Welcome to MUT! all the way down through some of the failures, for all the info spit out up at the top).

rspetman commented 6 years ago

Yes, we have two groups of iPads consistently failing. I can continue to successfully update others. They ARE managed and supervised in jamf. I'll try what you suggested and will post an update shortly.

rspetman commented 6 years ago

Clearing the defaults worked!! Thanks so much :)

mike-levenick commented 6 years ago

Excellent! Glad to hear it. That's very strange, not sure what the problem could have been. Just glad it's working!

itdir commented 5 years ago

Hi Mike,

I'm having this issue too, but clearing the stored settings (menu text has changed) and reopening the app didn't work. The CSV was exported from JSS, so the S/Ns came directly from there.

Any other suggestions?

Thanks! Brian

mike-levenick commented 5 years ago

@itdir What version of MUT are you using? Can you enable "advanced debugging" from the menu at the top, and then send over the full output (including the text from the pre-flight check at the top) ?

itdir commented 5 years ago

Hi Mike,

I was using Apple's Numbers.app to edit the CSV and I noticed that during export to CSV it was defaulting to UTF8. I changed the encoding to ASCII and it seems to be working fine now, so it seems to be a character encoding issue.

If you still want the MUT output, I'll send it, but it was just the standard 400 err output that the OP received, but I will post them if you think they'll be useful. As for version, I'm using v4.1, downloaded today.

If I can provide any additional info, I'll be happy to, but with new teachers arriving now, and classes resuming in 2 weeks, I'm not likely to be able to respond until next weekend.

By the way... THANK YOU for developing this app. I've been doing some of the API updates using PowerShell on a Windows VM. (Uggh!)

Cheers! Brian

mike-levenick commented 5 years ago

Brian,

Sounds good. I'll just consider it resolved then, no need for the output. 4.1 handles most formats well I thought, including UTF8 from excel, but I'll check into numbers.app and UTF8.

Obligatory XKCD

image

itdir commented 5 years ago

Ya, I ran 177 updates and only 8 failed, so I don't think it has anything to with the app. Again, thanks for the time and effort!

TryPad commented 5 years ago

Hello, could you please help me find a solution to my problem? I tried to update the Device Name thru the Serial Number, but I got the 400 error! "Device is not site-enabled for this user" Thanks! Cyrille

mike-levenick commented 5 years ago

@TryPad I'm guessing perhaps your user has site permissions, and perhaps you do not have permissions to send commands to ipads in the site where that one exists?

TryPad commented 5 years ago

Thanks for your quick answer! Associating Serial Number to Username or username to Static group is working... Would there be a special site permission for SN -> DN?

mike-levenick commented 5 years ago

MUT updates Mobile Device Names a bit differently than it updates any other field. In order to enforce the name change so that it sticks, MUT will actually generate an MDM command on the device to update the name.

I would check into whether or not you have permissions to send MDM commands to mobile devices. Not sure what all permissions are required--permissions in Jamf can be a bit weird sometimes.

I would say step 1 would be have a new user with full permissions made, see if that works. If it does, then try to figure out what permission you're missing. If that doesn't work, we're down a rabbit hole and there's no point in tinkering trying to find the right mix of permissions because it won't fix it anyways.

TryPad commented 5 years ago

Thanks Mike! I'll follow your smart instructions! Cyrille

TryPad commented 5 years ago

Hi Mike! I asked about the Jamf user used to run MUT... It has actually "full access to the organization"... Winter's coming, a deep rabbit hole too then ;-( Cyrille, ready for some more amazing magic from your part!

TryPad commented 5 years ago

Hi Mike! Since the user I logged in with to run MUT has full access to the organization, do you advise me to give up and go for a manual name modification? Thanks for your wise experience! Cyrille