jamf / JamfMigrator

A tool to migrate data granularly between Jamf Pro servers
MIT License
140 stars 10 forks source link

App Crashing in DELETE mode #11

Closed ckemp19 closed 6 years ago

ckemp19 commented 6 years ago

Was testing v. 2.2.6 with jamf pro 10.0, trying to clear out data from our Dev server in order to migrate back from Prod. Was removing everything except JSS users, JSS Groups, and LDAP servers. It did some deletions of buildings, but was kind of crashy - finally got it to remove the buildings, and it worked on deleting users; it appeared to work through them, but ultimately "users" turned red & they remain (4217 total). Trying to continue now & the app simply crashes, whether I try to select only a few items or let it try to delete everything.

This was on macOS 10.13.1; however, I downloaded the app on 10.12.6 as well but it also is just crashing almost immediately after start.

Attached are a couple of log files with it running in debug mode.

20171114_155512_migration.txt 20171114_155725_migration.txt

ckemp19 commented 6 years ago

Also the last Apple Crash report:

jamf-migrator-crash.txt

BIG-RAT commented 6 years ago

@willowhaus thanks for logs. I notice both times it crashed at the same point, after record id 8700. After that record I'm seeing odd results in the existing computer list: { computer = ""; id = 4933; }, { computer = ""; id = 4934; }, { computer = ""; id = 4935; }, { computer = ""; id = 4936; }, { computer = ""; id = 4937; }, { computer = ""; id = 4938; }, { computer = ""; id = 4939; }, { computer = ""; id = 4940; }, { computer = ""; id = 4941; } The results should be more like: { id = 1234; name = it-523341; } I'd be curious what computer id 4941 or 4940... looks like in the GUI. Regardless I'll look to build some checks to better handle unexpected data.

ckemp19 commented 6 years ago

Interesting - those were apparently blank records - computers were both listed as [No Name] with no data attached to them, but they showed up as records. I've deleted them both, I can try running it again & see what happens.

ckemp19 commented 6 years ago

eh, still blowing up. :/
20171114_175515_migration.txt

Here's the debug output too, if that helps.

jamf-migrator-debug.txt

BIG-RAT commented 6 years ago

How about if we delete all the blank records: { computer = ""; id = 4933; }, { computer = ""; id = 4934; }, { computer = ""; id = 4935; }, { computer = ""; id = 4936; }, { computer = ""; id = 4937; }, { computer = ""; id = 4938; }, { computer = ""; id = 4939; }

ckemp19 commented 6 years ago

Ok - that has it working again, it's deleting computerextensionattributes. Progress! :)

ckemp19 commented 6 years ago

Weird, those records - not really surprised that the db has some cruft in it, although I've not seen blank records like that before. i checked a few in our prod table & they just didn't exist. Curious.

BIG-RAT commented 6 years ago

Curious indeed. I've tried to replicate the behavior but can't get the computer tag to show up, it's always name and id. Another interesting record (contains a new line in the name) is this one: { id = 3270; name = "AMAH00410UYEUH\nJ5037049TBH8B"; } At any rate I've added some checks in the event the name tag is missing. Glad things started moving along and thanks for the updates.