MobileNativeFoundation / XCLogParser

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

Error parsing Xcode 14 log #169

Closed fzwo closed 2 years ago

fzwo commented 2 years ago

When trying to dump or parse an xcactivitylog file generated by Xcode 14, I get the following error:

Error: Error parsing the log: Unexpected className found parsing DocumentLocation DVTMemberDocumentLocation

akaDuality commented 2 years ago

Example of tokens for IDEDiagnosticActivityLogMessage with DVTMemberDocumentLocation

  ▿ 1 : [type: classNameRef, className: "IDEDiagnosticActivityLogMessage"]
    - classNameRef : "IDEDiagnosticActivityLogMessage"
  ▿ 2 : [type: string, value: "View is clipping its content [13]"]
    - string : "View is clipping its content [13]"
  - 14 : [type: nil]
  ▿ 3 : [type: int, value: 676402564]
    - int : 676402564
  ▿ 4 : [type: int, value: 18446744073709551615]
    - int : 18446744073709551615
  ▿ 5 : [type: int, value: 0]
    - int : 0
  - 18 : [type: nil]
  ▿ 6 : [type: int, value: 0]
    - int : 0
  ▿ 7 : [type: string, value: "com.apple.dt.IDE.diagnostic"]
    - string : "com.apple.dt.IDE.diagnostic"
  ▿ 8 : [type: className, name: "DVTMemberDocumentLocation"]
    - className : "DVTMemberDocumentLocation"
  ▿ 9 : [type: classNameRef, className: "DVTMemberDocumentLocation"]
    - classNameRef : "DVTMemberDocumentLocation"
  ▿ 10 : [type: string, value: "file:///Users/rubanov/Documents/Projects/CodeMetrics/UI/Details/Details/Details.storyboard"]
    - string : "file:///Users/rubanov/Documents/Projects/CodeMetrics/UI/Details/Details/Details.storyboard"
  ▿ 11 : [type: double, value: 0.0]
    - double : 0.0
  ▿ 12 : [type: string, value: "irs-zY-n9e"]
    - string : "irs-zY-n9e"
  ▿ 13 : [type: string, value: "Notice"]
    - string : "Notice"
  ▿ 14 : [type: list, count: 0]
    - list : 0
  ▿ 15 : [type: nil]
akaDuality commented 2 years ago

Sample file

akaDuality commented 2 years ago

Looks like DVTDocumentLocation contains 3 properties: two for DVTDocumentLocation and some 3rd one, irs-zY-n9e from the sample above

akaDuality commented 2 years ago

Draft pull request #170

ecamacho commented 2 years ago

Thanks @akaDuality for the PR. Can you upload again the Sample file? It is damaged and I have not been able to create a log that reproduces the issue