java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson6840666181877118834.js" (in directory "C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace"): CreateProcess error=193, %1 is not a valid Win32 application

Jenkins JIRA | Jesse Sanders | 3 years ago
  1. 0

    Using the instructions provided, I setup the plugin locally and point it to my existing installation of NodeJs (since it is a windows machine). I then setup my job to use an execute script to get my node version, which works. When I add a execute nodejs script to my build with this in it: var sys = require('sys'); sys.puts('build number:' + process.env['BUILD_NUMBER']); sys.puts('current directory: ' + process.cwd()); I get this error when I run the job: Building in workspace C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace [workspace] $ sh -xe C:\Windows\TEMP\hudson3559847244933178029.sh + node --version v0.10.26 [workspace] $ C:\Windows\TEMP\hudson6840666181877118834.js %1 is not a valid Win32 application FATAL: command execution failed java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson6840666181877118834.js" (in directory "C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace"): CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:773) at jenkins.plugins.nodejs.tools.DecoratedLauncher.launch(DecoratedLauncher.java:49) at jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper$2.launch(NpmPackagesBuildWrapper.java:88) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$ProcStarter.join(Launcher.java:360) at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:84) at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:42) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565) at hudson.model.Run.execute(Run.java:1670) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 19 more Build step 'Execute NodeJS script' marked build as failure Finished: FAILURE

    Jenkins JIRA | 3 years ago | Jesse Sanders
    java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson6840666181877118834.js" (in directory "C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace"): CreateProcess error=193, %1 is not a valid Win32 application
  2. 0

    [JENKINS-21953] NodeJs plugin doesn't work on windows based Jenkins machine - Jenkins JIRA

    jenkins-ci.org | 5 months ago
    java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson6840666181877118834.js" (in directory "C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace"): CreateProcess error=193, %1 is not a valid Win32 application
  3. 0

    Using the instructions provided, I setup the plugin locally and point it to my existing installation of NodeJs (since it is a windows machine). I then setup my job to use an execute script to get my node version, which works. When I add a execute nodejs script to my build with this in it: var sys = require('sys'); sys.puts('build number:' + process.env['BUILD_NUMBER']); sys.puts('current directory: ' + process.cwd()); I get this error when I run the job: Building in workspace C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace [workspace] $ sh -xe C:\Windows\TEMP\hudson3559847244933178029.sh + node --version v0.10.26 [workspace] $ C:\Windows\TEMP\hudson6840666181877118834.js %1 is not a valid Win32 application FATAL: command execution failed java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson6840666181877118834.js" (in directory "C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace"): CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:773) at jenkins.plugins.nodejs.tools.DecoratedLauncher.launch(DecoratedLauncher.java:49) at jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper$2.launch(NpmPackagesBuildWrapper.java:88) at hudson.Launcher$ProcStarter.start(Launcher.java:353) at hudson.Launcher$ProcStarter.join(Launcher.java:360) at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:84) at jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:42) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565) at hudson.model.Run.execute(Run.java:1670) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 19 more Build step 'Execute NodeJS script' marked build as failure Finished: FAILURE

    Jenkins JIRA | 3 years ago | Jesse Sanders
    java.io.IOException: Cannot run program "C:\Windows\TEMP\hudson6840666181877118834.js" (in directory "C:\Program Files (x86)\Jenkins\jobs\NodeJs\workspace"): CreateProcess error=193, %1 is not a valid Win32 application
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jenkins & NodeJS plugin - Permission Denied error

    Stack Overflow | 2 years ago | Dualcyclone
    java.io.IOException: Cannot run program "/tmp/hudson1009495610900642950.js" (in directory "/var/lib/jenkins/jobs/Test Project/workspace"): error=13, Permission denied
  6. 0

    Jenkins And NodeJS Plugin - Permission Denied Error=13

    Stack Overflow | 3 years ago | SamTheGoodOne
    java.io.IOException: Cannot run program "/home/sam/Apps/apache-tomcat-8.0.5/temp /hudson5090518537487301688.js" (in directory "/home/sam/.jenkins/jobs/WhiteSwan /workspace"): error=13, Permission denied

  1. eti22 1 times, last 1 month ago
  2. asdasd 24 times, last 3 months ago
  3. rexgreenza 8 times, last 3 months ago
  4. Benj-AD 1 times, last 4 months ago
  5. Akshay 4 times, last 6 months ago
95 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    CreateProcess error=193, %1 is not a valid Win32 application

    at java.lang.ProcessImpl.create()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.ProcessImpl.create(Native Method)
    2. java.lang.ProcessImpl.<init>(Unknown Source)
    3. java.lang.ProcessImpl.start(Unknown Source)
    4. java.lang.ProcessBuilder.start(Unknown Source)
    4 frames
  3. Hudson
    Launcher$LocalLauncher.launch
    1. hudson.Proc$LocalProc.<init>(Proc.java:244)
    2. hudson.Proc$LocalProc.<init>(Proc.java:216)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
    3 frames
  4. jenkins.plugins.nodejs
    NpmPackagesBuildWrapper$2.launch
    1. jenkins.plugins.nodejs.tools.DecoratedLauncher.launch(DecoratedLauncher.java:49)
    2. jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper$2.launch(NpmPackagesBuildWrapper.java:88)
    2 frames
  5. Hudson
    Launcher$ProcStarter.join
    1. hudson.Launcher$ProcStarter.start(Launcher.java:353)
    2. hudson.Launcher$ProcStarter.join(Launcher.java:360)
    2 frames
  6. jenkins.plugins.nodejs
    NodeJsCommandInterpreter.perform
    1. jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:84)
    2. jenkins.plugins.nodejs.NodeJsCommandInterpreter.perform(NodeJsCommandInterpreter.java:42)
    2 frames
  7. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784)
    3. hudson.model.Build$BuildExecution.build(Build.java:199)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
    6. hudson.model.Run.execute(Run.java:1670)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    8. hudson.model.ResourceController.execute(ResourceController.java:88)
    9. hudson.model.Executor.run(Executor.java:231)
    9 frames