You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "Srikanthkldia (via GitHub)" <gi...@apache.org> on 2024/11/13 12:04:59 UTC

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

Srikanthkldia opened a new issue, #6380:
URL: https://github.com/apache/jmeter/issues/6380

   ### 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "Srikanthkldia (via GitHub)" <gi...@apache.org>.
Srikanthkldia commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3033073513

   Hi Robert,
   
   Thanks for the update,
   
   Regards,
   Srikanth KL
   
   On Thu, Jul 3, 2025 at 10:59 AM Robert Bourgault du Coudray <
   ***@***.***> wrote:
   
   > *rbourga* left a comment (apache/jmeter#6380)
   > <https://github.com/apache/jmeter/issues/6380#issuecomment-3030818311>
   >
   > This issue has been fixed in version 4.13.0.2. However, for existing
   > scripts created prior to 4.13.0.2, you'll have to manually *comment out*
   > (or delete) all "WDS.sampleResult.sampleStart()" and
   > "WDS.sampleResult.sampleEnd()" lines in the WebDriver Samplers.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/jmeter/issues/6380#issuecomment-3030818311>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/BM43EWHKAUSVDTEXTTDAGN33GS5ULAVCNFSM6AAAAABRWKKSIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMZQHAYTQMZRGE>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "Salvo-svg (via GitHub)" <gi...@apache.org>.
Salvo-svg commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3036093643

   HI,
   the errors:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "Salvo-svg (via GitHub)" <gi...@apache.org>.
Salvo-svg commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3036165638

   Hi Srikanthkldia,
   
   I faced the same problem of Robert, and tried your workaround but it doesn't work.
   
   So I tried starting from scratch installation:
   - Install JMETER : apache-jmeter-5.6.3 on Windows pc
   - Installed WebDriver Sampler 4.13.0.2 from Plugin manager
   -Create a new project adding  a WebDriver sampler with following script with Groovy as "Script language":
           WDS.sampleResult.sampleStart()
           WDS.log.info("This is an info message");
           WDS.sampleResult.sampleEnd()
   
   Run and I still have the same problems:
   2025-07-04 14:35:59,378 ERROR o.a.j.s.SampleResult: sampleStart called twice
   --2025-07-04 14:35:59,456 ERROR o.a.j.s.SampleResult: sampleEnd called twice
   
   [webDriverlog.zip](https://github.com/user-attachments/files/21058262/webDriverlog.zip)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "rbourga (via GitHub)" <gi...@apache.org>.
rbourga commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3036310967

   Hi Salvo,
   I am not sure what you are doing.
   When I add a new WebDriver Sampler with 4.13.0.2, the two "WDS>sampleResult..." lines are automatically commented out and the sampler works fine:
   
   // WDS.sampleResult.sampleStart()
   WDS.browser.get('http://jmeter-plugins.org')
   // WDS.sampleResult.sampleEnd()
   
   Have you removed the comments?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "Srikanthkldia (via GitHub)" <gi...@apache.org>.
Srikanthkldia commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-2476749750

   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "rbourga (via GitHub)" <gi...@apache.org>.
rbourga commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3030818311

   This issue has been fixed in version 4.13.0.2. However, for existing scripts created prior to 4.13.0.2, you'll have to manually **comment out** (or delete) all "WDS.sampleResult.sampleStart()" and "WDS.sampleResult.sampleEnd()" lines in the WebDriver Samplers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "Salvo-svg (via GitHub)" <gi...@apache.org>.
Salvo-svg commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3036564896

   Yes I removed. In the example I described above was wrong.
   The correct one is:
   
   - WDS.sampleResult.sampleStart()
   - WDS.browser.get('http://jmeter-plugins.org/')
   -  WDS.sampleResult.sampleEnd()


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Web Driver related error stating "ERROR o.a.j.s.SampleResult:sampleStart called twice" when it is used only 1 time in the sampler [jmeter]

Posted by "rbourga (via GitHub)" <gi...@apache.org>.
rbourga commented on issue #6380:
URL: https://github.com/apache/jmeter/issues/6380#issuecomment-3037472565

   Yes, as said before, if you keep the WDS.sampleResult lines, it will fail. In 14.13.0.2, you need to remove these lines in your script as the plugin will now automatically timestamp the sampler for you without you having to call the timestamp functions.
   If you keep the timestamp functions in your script, it will conflict with the automatic timestamp and fail.
   The reasons we left the timestamp functions is for backwards compatibility, in case you want to run your script with an older version of the plugin.
   Hope this helps.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org