XCTestHTMLReport icon indicating copy to clipboard operation
XCTestHTMLReport copied to clipboard

XCHTML Error on Xcode 12 test result bundles

Open triztian opened this issue 5 years ago • 6 comments

Using version 1.6.1 I'm getting the following error when trying to produce a report from a test result bundle using Xcode 12

Error: Failed to find action_TestSummaries.plist

Happy to provide any more details.

triztian avatar Oct 13 '20 19:10 triztian

We are facing the same problem here. I could say that it is an urgent matter

mime29 avatar Oct 15 '20 01:10 mime29

Version 2.0.0 seems to be able to create the report out of Xcode 12 result bundles, if you're using the bash based installation outlined in the readme, i.e.:

bash <(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh) 

It seems that that script defaults to 1.6.1, however you can specify the version by adding it to the end so to install 2.0.0 do the following:

bash <(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh) "2.0.0"

After using that version I no longer see the error.

triztian avatar Oct 15 '20 02:10 triztian

thank you @triztian. I use the version 2.0.0 and gone the error of action_TestSummaries.plist. But another error occurs when I run xchtmlreport -r report.xcresult.

2020-10-15 11:42:20.357 xchtmlreport[12106:131884] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9'

To solve the error, I read the issues and tried to use brew install --HEAD. https://github.com/TitouanVanBelle/XCTestHTMLReport/issues/166

but brew install --HEAD is not available due to the below issue.

https://github.com/TitouanVanBelle/XCTestHTMLReport/issues/182

What I should do?

SatoTakeshiX avatar Oct 16 '20 04:10 SatoTakeshiX

I found the workaround to this problem. brew install --HEAD --build-from-source works fine for me.

curl -O https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb
brew install --HEAD --build-from-source ./xchtmlreport.rb

Related page https://github.com/TitouanVanBelle/XCTestHTMLReport/issues/182#issuecomment-709771775

SatoTakeshiX avatar Oct 16 '20 08:10 SatoTakeshiX

In my case for Xcode 12 and iOS 14.4, when I run fewer Integration tests, then there is no such error xchtmlreport[12106:131884] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9'

But in case I run the whole test suite with 50 tests, then the above error comes. and the plan fails to generate the report

samarth220194 avatar Mar 01 '21 13:03 samarth220194

I think this issue is solved. Can someone confirm is this issue still persist in latest develop?

Brew installation has been fixed but there is no new release yet because I haven't got confirmation this is really solved.

To install latest develop with Mint:

mint install XCTestHTMLReport/XCTestHTMLReport@develop

Install latest from develop branch with Homebrew:

$ wget https://raw.githubusercontent.com/XCTestHTMLReport/XCTestHTMLReport/develop/xchtmlreport.rb
$ brew install --HEAD --build-from-source xchtmlreport.rb

For more options see the README please.

nacho4d avatar Sep 28 '21 14:09 nacho4d