reportportal / plugin-saucelabs

Saucelabs integration for ReportPortal
Apache License 2.0
4 stars 2 forks source link

Report Portal 5.7.0 integration with SauceLabs 5.1.0/5.7.1 plugin is failing #15

Closed amsachin closed 2 years ago

amsachin commented 2 years ago

Hello team,

I have deployed Report Portal 5.7.0 version using Docker. When I tried to Integrate SauceLabs 5.1.0 plugin with Report Portal 5.7.0 version, ran into an issue. On entering the correct user ID and password, the below error is occurring

Caused by: java.lang.AbstractMethodError: Receiver class com.epam.reportportal.saucelabs.SaucelabsExtension does not define or inherit an implementation of the resolved method 'abstract com.epam.reportportal.extension.PluginCommand getIntegrationCommand(java.lang.String)' of interface com.epam.reportportal.extension.ReportPortalExtensionPoint.
    at com.epam.ta.reportportal.core.integration.util.BasicIntegrationServiceImpl.getIntegrationCommand(BasicIntegrationServiceImpl.java:110)
    at com.epam.ta.reportportal.core.integration.util.BasicIntegrationServiceImpl.checkConnection(BasicIntegrationServiceImpl.java:100)
    at com.epam.ta.reportportal.core.integration.impl.CreateIntegrationHandlerImpl.createGlobalIntegration(CreateIntegrationHandlerImpl.java:97)
    at com.epam.ta.reportportal.ws.controller.IntegrationController.createGlobalIntegration(IntegrationController.java:113)

So looking at the latest MR code change around getIntegrationCommand , I concluded that the 5.7.0 Report portal is not compatible with 5.1.0 plugin, so I built the new plugin jar by cloning and checking out the latest master code by running ./gradlew clean build -P version=5.7.1 command.

With the 5.7.1 plugin, the earlier error java.lang.AbstractMethodError on getIntegrationCommand() got resolved, however, I am running into a Null pointer error with textEncryptor object (BasicTextEncryptor seems to be autowired with Spring). Could you please look into the below reportportal/service-api:5.7.0 logs and suggest.

java.lang.NullPointerException: null
    at com.epam.reportportal.saucelabs.RestClient.buildSauceClient(RestClient.java:49)
    at com.epam.reportportal.saucelabs.TestConnectionCommand.executeCommand(TestConnectionCommand.java:40)
    at com.epam.reportportal.saucelabs.TestConnectionCommand.executeCommand(TestConnectionCommand.java:30)
    at com.epam.ta.reportportal.core.integration.util.BasicIntegrationServiceImpl.checkConnection(BasicIntegrationServiceImpl.java:102)
    at com.epam.ta.reportportal.core.integration.impl.CreateIntegrationHandlerImpl.createGlobalIntegration(CreateIntegrationHandlerImpl.java:97)

Report Portal - Sauce plugin - Integration error

VolhaKarenko commented 2 years ago

Hi @amsachin, for Report Portal versions 5.7.0 and later, please use SauceLabs plugin 5.7.0, it could be downloaded here: https://github.com/reportportal/plugin-saucelabs/packages/895592 The file name is "plugin-saucelabs-5.7.0-all.jar.md5"

amsachin commented 2 years ago

Thank you @DzmitryHumianiuk & @VolhaKarenko for solving the issue. The new plugin worked great, able to see the Saucelabs results in ReportPortal now. I have one small request, as per Report portal documentation, the plugins are available in https://search.maven.org/artifact/com.epam.reportportal/plugin-saucelabs but the 5.7.0 plugin is not available here. Could you please update the documentation or upload the artifact the maven.org. Thanks

VolhaKarenko commented 2 years ago

@amsachin thank you for highlighting this! All artifacts should be uploaded to maven, we will fix it soon

nowakoo commented 1 year ago

@VolhaKarenko @DzmitryHumianiuk I have the very same issue: I'm trying to integrate Report Portal with Saucelabs. I installed the latest version of the plugin, inserted Username, Access token and chosen the data center and I'm get the following error:

An error ocurred while connecting to server: Unclassified error [null]

This error message tells me nothing, as well as entry in network traffic that I attached: Could you please help with the integration? I am using Report Portal v. 5.7.2 and I tried Saucelabs plugin v. 5.7.1 and 5.7.0 (both showed the same error) - plugin-saucelabs-5.7.0-all.jar and plugin-saucelabs-5.7.1.jar from github (https://github.com/reportportal/plugin-saucelabs/packages/895592?version=5.7.1)

VolhaKarenko commented 1 year ago

Hi @nowakoo, I checked the integration on Report Portal 5.7.2 and plugin version 5.7.1, and the connection is successful in my case. Could you please share the API logs with the error?

nowakoo commented 1 year ago

Hello @VolhaKarenko. Could you please tell how to get API logs?

VolhaKarenko commented 1 year ago

@nowakoo it depends on the deployment method. For Docker: https://docs.docker.com/engine/reference/commandline/logs/ for Kubernetes: https://kubernetes.io/docs/reference/kubectl/cheatsheet/#interacting-with-running-pods

nowakoo commented 1 year ago

@VolhaKarenko thank you! I will provide API logs as soon as possible.

nowakoo commented 1 year ago

@VolhaKarenko here is the error from API logs:

java.lang.NullPointerException: null
    at com.epam.reportportal.saucelabs.RestClient.buildSauceClient(RestClient.java:49)
    at com.epam.reportportal.saucelabs.TestConnectionCommand.executeCommand(TestConnectionCommand.java:40)
    at com.epam.reportportal.saucelabs.TestConnectionCommand.executeCommand(TestConnectionCommand.java:30)
    at com.epam.ta.reportportal.core.integration.util.BasicIntegrationServiceImpl.checkConnection(BasicIntegrationServiceImpl.java:102)
    at com.epam.ta.reportportal.core.integration.impl.CreateIntegrationHandlerImpl.createGlobalIntegration(CreateIntegrationHandlerImpl.java:97)
    at com.epam.ta.reportportal.ws.controller.IntegrationController.createGlobalIntegration(IntegrationController.java:113)
    at com.epam.ta.reportportal.ws.controller.IntegrationController$$FastClassBySpringCGLIB$$255e9ef9.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:99)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
    at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
    at com.epam.ta.reportportal.ws.controller.IntegrationController$$EnhancerBySpringCGLIB$$e53de5a5.createGlobalIntegration(<generated>)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.multipart.support.MultipartFilter.doFilterInternal(MultipartFilter.java:125)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:180)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.base/java.lang.Thread.run(Thread.java:829)
VolhaKarenko commented 1 year ago

@nowakoo thanks! the team needs some time for investigations, I'll keep you updated

nowakoo commented 1 year ago

Thanks a lot @VolhaKarenko ! Looking forward for the update :)

nowakoo commented 1 year ago

Hi @VolhaKarenko! Any update on the issue?

VolhaKarenko commented 1 year ago

Hi @nowakoo! I'm sorry for not getting back to you sooner, but the team is currently busy with other tasks. Regarding the issue, unfortunately, we don't have any ideas yet. The problem seems to be in the absence of the value for the "Data center" field, but the field is mandatory and you mentioned that you had specified this value. Just in case, could you please check that this value in Saucelabs is the same as you select on Report Portal side? I would also suggest trying to regenerate the access token in Saucelabs

nowakoo commented 1 year ago

Hi @VolhaKarenko ! No problem. I checked the data center as you advised and it seems to be correct: obraz obraz I also regenerated the access token and still negative result

nowakoo commented 1 year ago

reportportal.log @VolhaKarenko I also attached full API log from the moment when error appeared.

nowakoo commented 1 year ago

Hi @VolhaKarenko! Do you have any other ideas how I can fix this issue?

nowakoo commented 1 year ago

Hi @VolhaKarenko. Any update on the issue? I still cannot integrate ReportPortal instance with SauceLabs

VolhaKarenko commented 1 year ago

Hi @nowakoo, unfortunately no updates so far @APiankouski do you have any ideas?

nowakoo commented 1 year ago

Hi @VolhaKarenko Sorry for bothering you, but I still don't have access to SauceLabs data using the plugin and it would be really beneficial for me if I could have Report Portal integrated with Saucelabs.

DzmitryHumianiuk commented 1 year ago

@nowakoo i've just tried it on my end, with the latest version (RP: 5.7.3 and SausePlugin 5.7.1) and it works for me.

The NullPointerException on your end might be referring to either missing access to SauseLabs API or issues with upload of the plugin.

Please verify 2 things:

  1. uninstall plugin. Restart service-api. install plugin again.
  2. do the ping command from the container of service-apito the SauceLabs base api:
Data Center API Base URL
US https://api.us-west-1.saucelabs.com/
Europe https://api.eu-central-1.saucelabs.com/
APAC Southeast https://api.apac-southeast-1.saucelabs.com/
nowakoo commented 1 year ago

Thank you @DzmitryHumianiuk @VolhaKarenko! I needed to restart service-api container and now it works :)

DzmitryHumianiuk commented 1 year ago

@nowakoo image