brysontyrrell / Update-App-Info

A script that will read all published App Store apps in the JSS and update their titles, versions and descriptions.
MIT License
7 stars 0 forks source link

Traceback Errors #5

Open TSPARR opened 6 years ago

TSPARR commented 6 years ago

I know this project is fairly dead, but was hoping to use it for a very specific use case to promote an app from Testing to Production. When running the script, I receive the following traceback error:

Traceback (most recent call last):
  File "/Users/tyler.sparr/Downloads/Update-App-Info-master/UpdateAppInfo.py", line 231, in <module>
    main()
  File "/Users/tyler.sparr/Downloads/Update-App-Info-master/UpdateAppInfo.py", line 214, in main
    applist = jss.get_mobile_device_apps()
  File "/Users/tyler.sparr/Downloads/Update-App-Info-master/UpdateAppInfo.py", line 63, in get_mobile_device_apps
    root = etree.fromstring(self.request(request))
  File "<string>", line 124, in XML
cElementTree.ParseError: not well-formed (invalid token): line 1, column 0

I believe this is because your script is expecting to receive XML and it is receiving JSON.

brysontyrrell commented 6 years ago

Interesting... can you describe this use case more? If this is still an actively used script I don't mind going back to fix it up.

What version of Jamf Pro are you running?

TSPARR commented 6 years ago

I'm running 9.99.0 and will likely be moving to 9.100.0 in the next week or so.

The use case is fairly straightforward. The client wants to control app updates, so every app has two records in the JSS. One which is scoped to the production group and the other scoped to a testing group. The testing group is set to have everything automatically update, while the production group is not. An hour after the defined automatic update window, we run an API script to grab current versions of the apps and compare it to the versions in the production group.

Right now, we have the capabilities to hit the "Force Update" button to "promote" the testing group's version to production, but have to manually edit the version. The description and icon are really secondary wants, but aren't 100% needed. I was just hoping to grab this script in an already working state without redoing the work.

The other idea we've toyed with is to turn on the Automatic Updates in each app set to 5 minutes ahead and then flip it back, but that seems like a lot of manual work as well.

Don't feel like you have to fix this up, I just wanted to open an issue to at least confirm my thoughts.