Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error : [!] xchtmlreport binary not installed! #2

Open
pradyhk opened this issue Sep 1, 2019 · 13 comments
Open

error : [!] xchtmlreport binary not installed! #2

pradyhk opened this issue Sep 1, 2019 · 13 comments

Comments

@pradyhk
Copy link

pradyhk commented Sep 1, 2019

After adding gem 'fastlane-plugin-xchtmlreport' in plugin file and running below commands succesfully,
brew install https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb
and
fastlane add_plugin xchtmlreport

I am getting this error : [!] xchtmlreport binary not installed! https://github.com/TitouanVanBelle/XCTestHTMLReport

@lawicko
Copy link

lawicko commented Sep 19, 2019

@pradyhk I had similar problem, for me the brew install was failing (it's hard to see because it prints quintylion lines before it finishes). Anyway, it turned out I had to install xcode-select before the installation succeeded.

Btw. this tool doesn't currently work with Xcode 11 (XCTestHTMLReport/XCTestHTMLReport#137)

@jordan-romeroporter-earnin

@lawicko so that issue you linked has been resolved/merged, but I'm still getting this same problem. Are you using a CI/CD service - if so, how'd you install the Xcode command line tools?

@lawicko
Copy link

lawicko commented Nov 14, 2019

@jordan-romeroporter-earnin The issue I linked has nothing to do with this issue, I just put it there for people to know that it was broken.
Anyway, please make sure your brew install succeeds, I don't know what exactly is failing for you, but I'm sure you can figure it out if you examine the output of the brew install command.
Just to be sure that it works correctly, I have updated my xchtmlreport to 2.0 with this:

brew unlink xchtmlreport
brew install --HEAD https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb

and then run it - I use fastlane with the plugin, so I didn't have to change anything else. It now works correctly with Xcode 11.

@jordan-romeroporter-earnin
Copy link

@lawicko OK I was using the cURL - perhaps that's the issue? I am also using the fastlane with the plugin, which is why this is confusing

UPDATE: Doesn't seem like changing it to brew install helped either. The installation is successful but I'm still getting that same response. Using Xcode 11.1, incase that matters.
Here's what I'm running below:

   scan(scheme:SCHEME, 
        only_testing: values[:only_testing],
        include_simulator_logs: false, 
        result_bundle:true)
   xchtmlreport
  end ```

@lawicko
Copy link

lawicko commented Nov 14, 2019

@jordan-romeroporter-earnin in this case I don't think I have the answer for you. To me it looks like you did everything similar to how I did it. What does it say when you do xchtmlreport in your shell?

@jordan-romeroporter-earnin
Copy link

@lawicko here's what it says: /bin/bash: xchtmlreport: command not found So maybe I'm in the incorrect directory? BTW this is in circleCI

@jordan-romeroporter-earnin
Copy link

OK So something I noticed is that even when I don't get that anymore, this doesn't save it in the fastlane directory like it said .. Here's what I got in the fastlane directory after running that command I mentioned above:

Uploading /Users/distiller/project/fastlane/Appfile (230 B): DONE
Uploading /Users/distiller/project/fastlane/Fastfile (17 kB): DONE
Uploading /Users/distiller/project/fastlane/Pluginfile (117 B): DONE
Uploading /Users/distiller/project/fastlane/README.md (4.4 kB): DONE
Uploading /Users/distiller/project/fastlane/report.xml (5.9 kB): DONE

As you can see, it doesn't even have a /test-results directory ...what is going on

@pigeon56
Copy link

pigeon56 commented Apr 29, 2020

Hi @pradyhk and @jordan-romeroporter-earnin , were you able to get xchtmlreport working properly on CircleCI? When I ruin my tests via Fastlane locally, everything works as expected and the report is generated. However, when I run the tests on Circle and try to display the .html report in the artifacts tab, I'm getting a failure after run_tests at the xchtmlreport step.

I'm getting the same failure that you reported earlier: [!] xchtmlreport binary not installed! https://github.com/TitouanVanBelle/XCTestHTMLReport I've been troubleshooting for a few days now, and I keep getting this error.

I even tried adding a direct path to the xchtmlreport binary as the documentation says can be done, but it didn't help. (Unless the binary is not at /usr/local/bin/xchtmlreport on the build machine?)

Was the test report being generated for you as expected when you ran the tests locally? Or did you only see the issue on Circle CI?

Edit: This happens whether the tests pass or fail. I've seen other posts about issues that occur only when tests fail, but this happens either way.

Edit 2: I wasn't installing XCHTMLReport on the build machine. (That'll do it!) I added the following to my CircleCI config file as part of my build steps:

    run:
      name: Install XCHTMLReport
      command: brew install https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/develop/xchtmlreport.rb

@vaijeyanthi-qa
Copy link

@ChiWhiteSox56 Even after adding the commands, I'm facing the same issue. Is there anything I need to do differently?

@nezhyborets
Copy link

nezhyborets commented Feb 1, 2022

XCHTMLReport is by default install at /usr/local/bin/xchtmlreport. Should it be somewhere else you can pass the path to the binary to the plugin

I'm not sure why doc says that default location is /usr/local/bin/xchtmlreport, because when I try to install XCTestHTMLReport with Mint, it installs to /Users/gemini/.mint/bin/xchtmlreport

Thus default behaviour doesn't meet my needs, probably I need to use binary_path or somehow manually put an alias into /usr/local/bin/xchtmlreport

Maybe if I'd use Home-brew to install XCTestHTMLReport, it would've ended up in default location.

@H2wk
Copy link

H2wk commented May 3, 2022

@nezhyborets did you fix this? I am facing similar issues ... (Different installation method & other environment variables outside of my control)

Thinking about raising a Issue around this as the installation path is hard coded as opposed to relying on the terminal to link this properly.

@nezhyborets
Copy link

I used binary_path to explicitly indicate path to where xchtmlreport installed

@simondelphia
Copy link

simondelphia commented May 19, 2022

I had the same issue.

Maybe if I'd use Home-brew to install XCTestHTMLReport, it would've ended up in default location.

I used Homebrew and it installed it in /opt/homebrew/opt/xchtmlreport EDIT: actually that's an alias for /opt/homebrew/Cellar/xchtmlreport/2.2.1 but that shouldn't matter…

But at least that is better than in /Users/<username>/…

But I changed it to use the opt/… path for binary_path and still got the same failure.

EDIT: I think the issue was just that I wasn't specifying the full path (i.e. need /bin/xchtmlreport at the end too.

On our CI the location was actually different for some reason, so I just updated my Fastfile to lookup the location:

brew_path = sh("brew --prefix xchtmlreport").gsub("\n", "")
binary_path = File.join(brew_path, "bin", "xchtmlreport")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants