MobileNativeFoundation / XCLogParser

Tool to parse Xcode and xcodebuild logs stored in the xcactivitylog format
Apache License 2.0
1.75k stars 125 forks source link

Failed create json report Xcode 15.3 #203

Closed Tayphoon closed 7 months ago

Tayphoon commented 8 months ago

Xclog parser failure create json report with error:

"com.apple.dt.ActivityLogSectionAttachment.TaskMetrics"], [type: int, value: 1], [type: int, value: 0]] Error: The line *{"wcStartTime":73149 doesn't seem like a valid SLF line

Report is huge and i can not send real report, but i think it could be reproduced in sample project. I think something changed in activity log format.

Steps to reproduce:

Build using xcodebuild: xcodebuild -workspace MyProject.xcworkspace -scheme MyScheme -configuration Debug -destination 'generic/platform=iOS' -resultBundlePath 'resultbundle.result' clean build Run parse: xclogparser parse --project MyProject --reporter html --rootOutput Builds/reports As a result xclogparser create 19741 files in report directory which has 1.3Gb size

Context:

MacOS: Sonoma 14.1.2 Device: MacbookPro M1 Xcode: 15.3 XCLogParser installation: 0.2.38 (Homebrew)

hoangatuan commented 8 months ago

I'm facing similar issue. Here is the xcactivitylog file and LogStoreManifest.plist build_logs.zip

hoangatuan commented 8 months ago

Xcode 15.3 uses logFormatVersion version 11, and it breaks the logic parsing of XCLogParser

rabc commented 8 months ago

The issue is that there is a new type IDEActivityLogSectionAttachment and one of the properties is a JSON with a new token *. This JSON is the same BuildOperationTaskMetrics object from here.

I have a working version with a fix, but I have no idea how those metrics could fit in the BuildStep. Anyone has idea of what is the meaning of each property in BuildOperationTaskMetrics?

hbanzon commented 8 months ago

Hi @rabc would you happen to have your working version in a branch so that I can see if it fixes my issue too? I am seeing similar issues when updating to Xcode 15.3.

rabc commented 7 months ago

@hbanzon PR created. Although I am not sure if people are still looking at this repo, since there is a PR opened since January 😅