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

NodeJS Plugin - Unresolvable nodeJS installer for version in Windows i386

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • nodejs-plugin
    • Jenkins ver. 2.32.3
      NodeJS Plugin ver. 1.1.2

      Using the "Install automatically" feature of the plugin in a x86 Windows environment triggers the error:

      FATAL: Unresolvable nodeJS installer for version=7.7.2, cpu=i386, platform=WINDOWS
       java.lang.IllegalArgumentException: Unresolvable nodeJS installer for version=7.7.2, cpu=i386, platform=WINDOWS
       at jenkins.plugins.nodejs.tools.pathresolvers.LatestInstallerPathResolver.resolvePathFor(LatestInstallerPathResolver.java:63)
       at jenkins.plugins.nodejs.tools.NodeJSInstaller.getInstallable(NodeJSInstaller.java:110)
       at jenkins.plugins.nodejs.tools.NodeJSInstaller.performInstallation(NodeJSInstaller.java:125)
       at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
       at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
       at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
       at jenkins.plugins.nodejs.tools.NodeJSInstallation.forNode(NodeJSInstallation.java:94)
       at jenkins.plugins.nodejs.NodeJSBuildWrapper.setUp(NodeJSBuildWrapper.java:110)
       at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:145)
       at hudson.model.Build$BuildExecution.doRun(Build.java:156)
       at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
       at hudson.model.Run.execute(Run.java:1728)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:98)
       at hudson.model.Executor.run(Executor.java:404)
      

      In the plugin code, more specifically in the "LatestInstallerPathResolver.java" file:

      switch (cpu) \{
       case i386:
       if (NodeJSVersion.parseVersion(version).compareTo(new NodeJSVersion(4, 0, 0)) >= 0) \{
       throw new IllegalArgumentException("Unresolvable nodeJS installer for version=" + version + ", cpu=" + cpu.name() + ", platform=" + platform.name());
       }
       arch = "x86";
       break;
      

      Reading the code, if the NodeJS version is greater then 4.0.0, the plugin throws a error, so x86 users only can use Node on versions 0.X.X.

          [JENKINS-42775] NodeJS Plugin - Unresolvable nodeJS installer for version in Windows i386

          Just to inform, on the https://nodejs.org/dist/ repository, x86 version has a msi installer on version 0.6.1 and above.

          The x64 version of the code is correct, only on version 4.0.0 the installer began to be available.

          Filip dos Santos added a comment - Just to inform, on the https://nodejs.org/dist/  repository, x86 version has a msi installer on version 0.6.1 and above. The x64 version of the code is correct, only on version 4.0.0 the installer began to be available.

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/main/java/jenkins/plugins/nodejs/tools/pathresolvers/LatestInstallerPathResolver.java
          src/test/resources/jenkins/plugins/nodejs/tools/expectedURLs.txt
          http://jenkins-ci.org/commit/nodejs-plugin/d692ef316f133fd22238565514b024b1941db158
          Log:
          [FIXED JENKINS-42775] Fix check for 32 bit installer

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/jenkins/plugins/nodejs/tools/pathresolvers/LatestInstallerPathResolver.java src/test/resources/jenkins/plugins/nodejs/tools/expectedURLs.txt http://jenkins-ci.org/commit/nodejs-plugin/d692ef316f133fd22238565514b024b1941db158 Log: [FIXED JENKINS-42775] Fix check for 32 bit installer

          Jared Beach added a comment -

          Didn't mean to duplicate the issue. New to jenkins and JIRA

          Jared Beach added a comment - Didn't mean to duplicate the issue. New to jenkins and JIRA

            nfalco Nikolas Falco
            filipduarte Filip dos Santos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: