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 creating bean with name 'sauceFourTunnelManager' due to NoSuchMethodError in Sauce Labs plugin for TeamCity agent. #23

Open
brzoza-daath opened this issue May 31, 2023 · 0 comments

Comments

@brzoza-daath
Copy link

brzoza-daath commented May 31, 2023

Hi SauceLabs Team

I'v been asked to raise an issue directly on the Plugin's Github page and mention that I spoke with Sauce Labs Support who also managed to reproduce the error.

The issue I'am experiencing is caused by a problem with the sauceplugin-agent-1.55.jar file, which is a plugin used by the TeamCity agent.

Specifically, it seems that there is an error with the sauceFourTunnelManager bean that is defined in the build-agent-plugin-saucePlugin.xml file.

The error message indicates that the creation of the sauceFourTunnelManager bean failed due to a nested exception: a java.lang.NoSuchMethodError that occurs when attempting to instantiate the bean via constructor. This error occurs because the code is unable to find a specific method, org.apache.commons.io.IOUtils.toString(java.net.URL, java.nio.charset.Charset), which is needed for the instantiation of the bean.

To reproduce the issue with the Sauce Labs plugin for TeamCity agent using a local installation of TeamCity 2022.10.3, you can follow these steps:

  1. Download and install the TeamCity 2022.10.3 version from the official website (https://www.jetbrains.com/teamcity/download/other.html).
  2. Follow the instructions provided in the TeamCity documentation to set up and start TeamCity server and default agent at the same time. You can find the documentation here:
    https://www.jetbrains.com/help/teamcity/install-teamcity-server-on-linux-or-macos.html
    https://www.jetbrains.com/help/teamcity/start-teamcity-server.html#Start+Server
  3. Ensure that you have the correct version of the Sauce Labs plugin installed. You can download the latest version from the Sauce Labs website (https://saucelabs.com/downloads/teamcity/release/com/saucelabs/teamcity/build/1.55/build-1.55.zip).
  4. Follow the instructions provided in the Sauce Lab documentation to set up a new build configuration that uses the Sauce Labs plugin. You can find the documentation here: https://docs.saucelabs.com/basics/integrations/teamcity/.
  5. Check the teamcity-agent.log to see if the error message
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sauceFourTunnelManager' defined in Byte array resource [plugin: teamcity-agent#sauceplugin-agent-1.55.jar!/META-INF/build-agent-plugin-saucePlugin.xml]: Bean instantiation via constructor failed; nested exception is java.lang.NoSuchMethodError: 'java.lang.String org.apache.commons.io.IOUtils.toString(java.net.URL, java.nio.charset.Charset)' is displayed.
    If the error message appears in the build logs, then you have successfully reproduced the issue. Note that there may be additional steps or configuration settings required depending on your specific setup and requirements.

You can find above error messages, in the teamcity-agent.log from my local environment.

Regards
Bartek

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

1 participant