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

Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler #6380

Open
Srikanthkldia opened this issue Nov 13, 2024 · 1 comment

Comments

@Srikanthkldia
Copy link

Expected behavior

We expect the script to run without the error

Actual behavior

We are creating the selenium like script in JMeter and we are using web driver sampler
We have used only 1 time the sampleStart and sampleEnd methods in the sampler and on replay we notice the error stating sampleStart called twice is misleading.

Version of various Technology stack related to JMeter used in the exercise :

  1. JMETER :: apache-jmeter-5.6.3
  2. Chrome Driver :: chromedriver-131.0.6778.69(r1368529)
  3. JMeter Plugin Manager :: jmeter-plugins-manager-1.10

Error stack trace:
ERROR o.a.j.s.SampleResult:sampleStart called twice
java.lang.Throwable: Invalid call sequence
at org.apache.jmeter.samplers.SampleResult.sampleStart(SampleResult.java:1186) [ApacheJMeter_core.jar:5.6.3]
at org.apache.jmeter.samplers.SampleResult$sampleStart.call(Unknown Source) [ApacheJMeter_core.jar:?]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)[groovy-3.0.20.jar:3.0.20]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)[groovy-3.0.20.jar:3.0.20]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)[groovy-3.0.20.jar:3.0.20]
at Script1.run(Script1.groovy:4)[Script:?]

Steps to reproduce the problem

Version of various Technology stack related to JMeter used in the excercise :

  1. JMETER :: apache-jmeter-5.6.3
  2. Chrome Driver :: chromedriver-131.0.6778.69(r1368529)
  3. JMeter Plugin Manager :: jmeter-plugins-manager-1.10

Steps:

  1. Add the chrome driver config element
  2. Provide the path of the chrome driver in the Path section of the chrome driver config element
  3. Add the Web driver sampler
  4. Created the selenium like request to launch the URL enclosed between WDS.SampleResult.sampleStart() and WDS.SampleResult.sampleEnd()
  5. Clicked the Run button

Expected output:
Script should launch the Url and should not throw error sampleStart called twice

Actual output:
Script execution launched the Url but also displayed below error in the logs:
Error stack trace:
ERROR o.a.j.s.SampleResult:sampleStart called twice
java.lang.Throwable: Invalid call sequence
at org.apache.jmeter.samplers.SampleResult.sampleStart(SampleResult.java:1186) [ApacheJMeter_core.jar:5.6.3]
at org.apache.jmeter.samplers.SampleResult$sampleStart.call(Unknown Source) [ApacheJMeter_core.jar:?]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)[groovy-3.0.20.jar:3.0.20]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)[groovy-3.0.20.jar:3.0.20]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)[groovy-3.0.20.jar:3.0.20]
at Script1.run(Script1.groovy:4)[Script:?]

JMeter Version

5.6.3

Java Version

JDK17

OS Version

Microsoft Windows

@Srikanthkldia
Copy link
Author

Note :
Today we downgraded the version of selenium webdriver from 4.13.0.2 to 4.13.0.0 version and tested the scenario and found issue was not occuring so it appears like issue is introduced after 4.13.0.0 version

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

No branches or pull requests

1 participant