Why is app_version sometimes empty in .ips crash reports from macOS Monterey? (is_first_party)

My macOS app reads the crashlog files directly and submits them to my server for analysis if the user allows it. Which means I get to see the original .ips files generated on Monterey.

Now, these files appear to contain two JSON-formated records, the first detailing the app's properties. Here's a reformatted example of that as reported for my own app:

{
	"app_name":"Find Any File",
	"timestamp":"2022-01-02 10:12:36.00 -0500",
	"app_version":"",
	"slice_uuid":"a15335de-4432-3b53-bcdf-381424a7a330",
	"build_version":"",
	"platform":1,
	"share_with_app_devs":0,
	"is_first_party":1,
	"bug_type":"309",
	"os_version":"macOS 12.1 (21C52)",
	"incident_id":"132818BA-3DBA-4B15-86CE-307BE961E7DC",
	"name":"Find Any File"
}

The problem for me here is that sometimes, like in this example, both the app_version and the build_version values are empty. That makes it difficult for me to figure out which version of my app caused the crash.

I have 11 .ips crash reports, and when I compare the ones with valid version information against those missing them, the only consistency I find is that the value for is_first_party is 0 whenever I get valid versions, and 1 whenever I get empty values.

Can anyone explain why this happens and how I can make this work in all cases?

Note: One other developer (P.N.L.) has confirmed my findings, seeing empty versions as well, occosionally, and also directly related to the is_first_party value.

(I've also asked this on SO,, but it's not a good fit there)

Answered by DTS Engineer in 700617022

This stuff is way more complicated than you might think )-: My best guess is that something is wonky with the Launch Services database record for your app on the user’s machine, and that’s prevented the crash reporter from getting the values it needs to populate app_version and build_version, while simultaneously confusing it about the whole is_first_party thing. However, there are other potential code paths that could result in similarly results.

Regardless, I’m pretty darned sure that this is not your fault. The fact that the crash reporter produces valid results in general means that your app is correctly packaged, so whatever’s causing this problem is an issue on the originating Mac.

In short, this problem is definitely bugworthy (-: Please post your bug number, just for the record.

Do you still get a valid Binary Images section in the crash report? If so, you could work around this by maintaining a table of Mach-O image UUIDs to app version numbers.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

The Stackoverflow link is https://stackoverflow.com/q/70584180

Accepted Answer

This stuff is way more complicated than you might think )-: My best guess is that something is wonky with the Launch Services database record for your app on the user’s machine, and that’s prevented the crash reporter from getting the values it needs to populate app_version and build_version, while simultaneously confusing it about the whole is_first_party thing. However, there are other potential code paths that could result in similarly results.

Regardless, I’m pretty darned sure that this is not your fault. The fact that the crash reporter produces valid results in general means that your app is correctly packaged, so whatever’s causing this problem is an issue on the originating Mac.

In short, this problem is definitely bugworthy (-: Please post your bug number, just for the record.

Do you still get a valid Binary Images section in the crash report? If so, you could work around this by maintaining a table of Mach-O image UUIDs to app version numbers.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Why is app_version sometimes empty in .ips crash reports from macOS Monterey? (is_first_party)
 
 
Q