LLVM Profile Error: Runtime and instrumentation version mismatch : expected 4, but get 5

While running the unit tests of our iOS project, we encounter the error I mentioned below. We tried with different iOS versions in XCode 13.4.1 and 14 versions, but the result did not change. Because of this error, Coverage.profdata file cannot be created and we cannot obtain coverage data. Has anyone ever encountered such an error or does anyone know how to solve it? We would be glad if you help.

Test Suite 'All tests' passed at 2022-10-07 11:25:19.487.
     Executed 2110 tests, with 0 failures (0 unexpected) in 7.292 (10.705) seconds
LLVM Profile Error: Runtime and instrumentation version mismatch : expected 4, but get 5
Failed to merge raw profiles in directory /Users/*** /Build/Intermediates.noindex/CodeCoverage/ProfileData/7FFCA33C-01FF-46BE-923D-A1A0CCF11A16 to destination /Users/*** /Build/Intermediates.noindex/CodeCoverage/ProfileData/7FFCA33C-01FF-46BE-923D-A1A0CCF11A16/Coverage.profdata: Aggregation tool '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata' failed with exit code 1: warning: /Users/*** /Build/Intermediates.noindex/CodeCoverage/ProfileData/7FFCA33C-01FF-46BE-923D-A1A0CCF11A16/B5268FD3-2A23-4CA3-BE5F-AEFA9869C8ED-14839.profraw: failed to uncompress data (zlib) error: no profile can be merged
  • Hi, I am facing similar issue. Please help me with the resolution

Add a Comment

Replies

i am facing the same issue with my unit tests. did you find any solution