Closed birwin93 closed 2 years ago
Seems like the is not valid xcativitylog file
is due to issues when unzipping the log. Setup some breakpoints and it looks like gzip library is throwing an error correlating to
// Z_STREAM_ERROR The stream structure was inconsistent (for example if next_in or next_out was NULL).
Hi! Yes, Xcode can take a while to dump the log into the file. So if you read the file before Xcode finishes, you get that error. What we do is to wait a few seconds before reading it, and if we got the error, we retry a few more times.
The issue still reproduces on Xcode 12.1. Output logs from Xcode's Build command are parseable, but from xcodebuild -archive
isn't. Archive's logs are smaller than those were build with Xcode (1 MB vs 13 MB). I validate logs withgzip -t ...
I'm having the same issue on Xcode 12.4 in large projects but smaller projects work fine.
Even when both use xcodebuild
.
I've switched to using Xcode directly to build instead of xcodebuild
and that works. I do need to wait a few seconds after the build is finished before running xclogparser.
Looks like there were some previous posts but none of the existing suggestions seem to work for.
Versions
Xcode 11.5
Problem
Running the following command leads to no xcactivitlylog being generated
Running the following command generates a xcactivitlylog but running
xclogparser parse
throws an error sayingis not a valid xcactivitylog file
. This just add-resultBundlePath
What's even weirder, is if I rerun the second command, it then produces a valid xcactivitylog. I've been able to repro that behavior twice now.
Is there something I should be doing here? I've also confirmed that waiting a few minutes to run
xclogparser
doesn't fix the problem