Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58920

Jenkins Katalon integration: javascript fails to execute in Windows Server (execute Windows batch command)

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: batch-task-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.107.1
    • Similar Issues:

      Description

      Hi,

      I have a master - slave architecture, where the master is Linux Red Hat, and the slave is a Windows Server 2016.

      In the Windows server, I have installed Katalon 6.2.1.

      I made an integration test to run one simple script in the slave, but using Jenkins master. This is done by restricting in which node can the script be executed. As build step, I use "execute Windows batch command".

      My script needs to execute JavaScript. I could execute it successfully in the slave, using Katalon Studio, but when I executed it through Jenkins, this is the exception I got:

      -------------------------------------------------------------------------------------------------------

      2019-08-13 14:46:32.531 ERROR c.k.k.core.keyword.internal.KeywordMain  - ? Unable to execute JavaScript. (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to execute JavaScript.
       at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
       at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
       at com.kms.katalon.core.webui.keyword.builtin.ExecuteJavaScriptKeyword.executeJavascript(ExecuteJavascriptKeyword.groovy:42)
       at com.kms.katalon.core.webui.keyword.builtin.ExecuteJavaScriptKeyword.execute(ExecuteJavascriptKeyword.groovy:37)
       at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
       at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.executeJavaScript(WebUiBuiltInKeywords.groovy:3787)
       at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$executeJavaScript$2.call(Unknown Source)
       at create new client.run(create new client:25)
       at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
       at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
       at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
       at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
       at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
       at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
       at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
       at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
       at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
       at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
       at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
       at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
       at TempTestSuite1565700365710.run(TempTestSuite1565700365710.groovy:35)
      Caused by: org.openqa.selenium.JavascriptException: JavaScript error
      Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
      System info: host: ABCDEFG-01', ip: '00.11.22.197', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
      Driver info: com.kms.katalon.selenium.driver.CInternetExplorerDriver
      Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, se:ieOptions:

      {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: true, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: true, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:22216/, nativeEvents: true, requireWindowFocus: false}

      , setWindowRect: true}

      ----------------------------------------------------------------------------------------------------

      I just created a Jenkins slave node in a Windows desktop 2010, and executed there from the Jenkins master. It did successfully work.

      Reading in some posts that could be related to the SCP, Could you provide me with a workaround for this issue? It will be very helpful,

      As I don't really know how do you work out the priority, I left its value by default, but as you can imagine, this issue is major for my project.

      Thanks for your help and support.

       

       

        Attachments

          Activity

          spr2019 Y M created issue -
          spr2019 Y M made changes -
          Field Original Value New Value
          Description Hi,

          I have a master - slave architecture, where the master is Linux Red Hat, and the slave is a Windows Server 2016.

          In the Windows server, I have installed Katalon 6.2.1.

          I made an integration test to run one simple script in the slave, but using Jenkins master. This is done by restricting in which node can the script be executed. As build step, I use "execute Windows batch command".

          My script needs to execute JavaScript. I could execute it successfully in the slave, using Katalon Studio, but when I executed it through Jenkins, this is the exception I got:

          -------------------------------------------------------------------------------------------------------

          2019-08-13 14:46:32.531 ERROR c.k.k.core.keyword.internal.KeywordMain  - ? Unable to execute JavaScript. (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to execute JavaScript.
           at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
           at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
           at com.kms.katalon.core.webui.keyword.builtin.ExecuteJavaScriptKeyword.executeJavascript(ExecuteJavascriptKeyword.groovy:42)
           at com.kms.katalon.core.webui.keyword.builtin.ExecuteJavaScriptKeyword.execute(ExecuteJavascriptKeyword.groovy:37)
           at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
           at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.executeJavaScript(WebUiBuiltInKeywords.groovy:3787)
           at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$executeJavaScript$2.call(Unknown Source)
           at create new client.run(create new client:25)
           at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
           at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
           at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
           at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
           at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
           at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
           at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
           at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
           at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
           at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
           at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
           at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
           at TempTestSuite1565700365710.run(TempTestSuite1565700365710.groovy:35)
          Caused by: org.openqa.selenium.JavascriptException: JavaScript error
          Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
          System info: host: ABCDEFG-01', ip: '00.11.22.197', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
          Driver info: com.kms.katalon.selenium.driver.CInternetExplorerDriver
          Capabilities \{acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: true, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: true, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:22216/, nativeEvents: true, requireWindowFocus: false}, setWindowRect: true}

          ----------------------------------------------------------------------------------------------------

          I just created a Jenkins slave node in a Windows desktop 2010, and executed there from the Jenkins master. It did successfully work.

          Reading in some posts that could be related to the SCP, Could you provide me with a workaround for this issue? It will be very helpful,

          As I don't really know how do you work out the priority, I left its value by default, but as you can imagine, this issue is major for my project.

          Thanks for your help and support.

           

           
          Hi,

          I have a master - slave architecture, where the master is Linux Red Hat, and the slave is a Windows Server 2016.

          In the Windows server, I have installed Katalon 6.2.1.

          I made an integration test to run one simple script in the slave, but using Jenkins master. This is done by restricting in which node can the script be executed. As build step, I use "execute Windows batch command".

          My script needs to execute JavaScript. I could execute it successfully in the slave, using Katalon Studio, but when I executed it through Jenkins, this is the exception I got:

          -------------------------------------------------------------------------------------------------------

          2019-08-13 14:46:32.531 ERROR c.k.k.core.keyword.internal.KeywordMain  - ? Unable to execute JavaScript. (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to execute JavaScript.
            at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
            at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
            at com.kms.katalon.core.webui.keyword.builtin.ExecuteJavaScriptKeyword.executeJavascript(ExecuteJavascriptKeyword.groovy:42)
            at com.kms.katalon.core.webui.keyword.builtin.ExecuteJavaScriptKeyword.execute(ExecuteJavascriptKeyword.groovy:37)
            at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
            at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.executeJavaScript(WebUiBuiltInKeywords.groovy:3787)
            at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$executeJavaScript$2.call(Unknown Source)
            at create new client.run(create new client:25)
            at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
            at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
            at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
            at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
            at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
            at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
            at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
            at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
            at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
            at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
            at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
            at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
            at TempTestSuite1565700365710.run(TempTestSuite1565700365710.groovy:35)
           Caused by: org.openqa.selenium.JavascriptException: JavaScript error
           Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
           System info: host: ABCDEFG-01', ip: '00.11.22.197', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
           Driver info: com.kms.katalon.selenium.driver.CInternetExplorerDriver
           Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, se:ieOptions:

          {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: true, ie.browserCommandLineSwitches: , ie.ensureCleanSession: true, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: true, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:22216/, nativeEvents: true, requireWindowFocus: false}

          , setWindowRect: true}

          ----------------------------------------------------------------------------------------------------

          I just created a Jenkins slave node in a Windows desktop 2010, and executed there from the Jenkins master. It did successfully work.

          Reading in some posts that could be related to the SCP, Could you provide me with a workaround for this issue? It will be very helpful,

          As I don't really know how do you work out the priority, I left its value by default, but as you can imagine, this issue is major for my project.

          Thanks for your help and support.

           

           
          Hide
          spr2019 Y M added a comment -

          Apparently is a bug that impacts only Jenkins running as a service, not as a Java Web Start:

          https://forum.katalon.com/t/scripts-runs-on-windows-server-but-not-through-jenkins/31459/6

          Show
          spr2019 Y M added a comment - Apparently is a bug that impacts only Jenkins running as a service, not as a Java Web Start: https://forum.katalon.com/t/scripts-runs-on-windows-server-but-not-through-jenkins/31459/6

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              spr2019 Y M
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: