error: Couldn't IRGen expression, no additional error

Paweł Zemsta picture Paweł Zemsta · Sep 20, 2018 · Viewed 9.6k times · Source

I can not print debug information in my UI TESTS. Configuration: Xcode 10 and SWIFT 4.2.

When I try to print something in console I can only see an error:

"error: Couldn't IRGen expression, no additional error" 

I didn't have any problem in earlier versions of Xcode (8,9 etc), only in Xcode 10. I can not print anything, when I put breakpoint and try to print for example app po XCUIApplication() or something like that.

In the earlier version of Xcode when I write in console:

"po XCUIApplication.debugDescription()"I saw the structure of my application.

We found that the problem appears when an external framework is added to the UI Tests Target. We've created an example project with RxSwift.framework included which can be use to reproduce our issue:

https://drive.google.com/file/d/1BlByFVNaOdDqT4ED9Jwyi1kJ99PTRQen/view?usp=sharing

Regards.

Answer

MichaelV picture MichaelV · Oct 5, 2018

I had same issue with Carthage. However while looking more closely at console I've spotted that Carthage instead of building RxSwift just downloaded pre-built binaries,

*** Downloading RxSwift.framework binary at "Zürich"

that in turn contribute to IRGen error. So forcing Carthage to build framework instead of downloading binary worked.

carthage update --platform iOS --no-use-binaries