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

Failed to display file source for resharper analysis: Copying the source file from the workspace to the build folder on the Jenkins master failed.

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Windows Server 2008 R2, Jenkins 1.651.3, Warnings plugin 4.56, Subversion Plug-in 2.4.4

      We use default Jenkins Configuration.

      Standard ASP.NET MVC web project with MSBuild task, Resharper InspectCode and Postbuild warnings pluging with parser for Resharper Inspect Code. All information is showed inside of "Resharper InspectCode Warnings". Until trying to view file content with proble line everything is worked. After clicking on file name - exception is thrown.All other tools (like Warnings MSBuild console parser) shows file content correctly.

      Mapped svn folder - trunk. Trunk structure:
      BuildTools
      Common
      Documents
      WebProject

      Only WebProject is build and published.

      Error Message:
      Content of file pdf.js

      01 Copying the source file 'WebProject/Plugins/pdfjs/build/pdf.js' from the workspace to the build folder 'f4904279.tmp' on the Jenkins master failed.
      02 Seems that the path is relative, however an absolute path is required when copying the sources.
      03 Is the file 'pdf.js' contained more than once in your workspace?
      04 Is the file 'WebProject/Plugins/pdfjs/build/pdf.js' a valid filename?
      05 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/WebProject/Plugins/pdfjs/build/pdf.js'
      06 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/WebProject/Plugins/pdfjs/build/pdf.js'
      07 java.io.IOException: Failed to copy WebProject/Plugins/pdfjs/build/pdf.js to C:\Program Files (x86)\Jenkins\jobs\Trunk-Complete\builds\2\workspace-files\f4904279.tmp
      08 at hudson.FilePath.copyTo(FilePath.java:1990)
      09 at hudson.plugins.analysis.util.Files.copyFilesWithAnnotationsToBuildFolder(Files.java:80)
      10 at hudson.plugins.analysis.core.HealthAwareRecorder.copyFilesWithAnnotationsToBuildFolder(HealthAwareRecorder.java:333)
      11 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:89)
      12 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:280)
      13 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      14 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      15 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      16 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      17 at hudson.model.Build$BuildExecution.post2(Build.java:185)
      18 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      19 at hudson.model.Run.execute(Run.java:1763)
      20 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      21 at hudson.model.ResourceController.execute(ResourceController.java:98)
      22 at hudson.model.Executor.run(Executor.java:410)
      23 Caused by: java.io.FileNotFoundException: WebProject\Plugins\pdfjs\build\pdf.js (The system cannot find the path specified)
      24 at java.io.FileInputStream.open(Native Method)
      25 at java.io.FileInputStream.<init>(Unknown Source)
      26 at hudson.FilePath$41.invoke(FilePath.java:2016)
      27 at hudson.FilePath$41.invoke(FilePath.java:2011)
      28 at hudson.FilePath.act(FilePath.java:990)
      29 at hudson.FilePath.act(FilePath.java:968)
      30 at hudson.FilePath.copyTo(FilePath.java:2011)
      31 at hudson.FilePath.copyTo(FilePath.java:1985)
      32 ... 14 more

          [JENKINS-36132] Failed to display file source for resharper analysis: Copying the source file from the workspace to the build folder on the Jenkins master failed.

          Yauhen Filipskikh created issue -

          Ulli Hafner added a comment - - edited

          It would help if you can answer the questions that are asked in the trace above...

          Ulli Hafner added a comment - - edited It would help if you can answer the questions that are asked in the trace above...

          03 Is the file 'pdf.js' contained more than once in your workspace?
          No
          04 Is the file 'WebProject/Plugins/pdfjs/build/pdf.js' a valid filename?
          yes
          05 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/Plugins/pdfjs/build/pdf.js'
          not applyable - master
          06 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/Plugins/pdfjs/build/pdf.js'
          it looses somehow one folder level from svn, so file is available but WebProject was lost inside of message

          Yauhen Filipskikh added a comment - 03 Is the file 'pdf.js' contained more than once in your workspace? No 04 Is the file 'WebProject/Plugins/pdfjs/build/pdf.js' a valid filename? yes 05 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/ [job-name] /Plugins/pdfjs/build/pdf.js' not applyable - master 06 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/ [job-name] /workspace/Plugins/pdfjs/build/pdf.js' it looses somehow one folder level from svn, so file is available but WebProject was lost inside of message

          Dean Thrasher added a comment -

          I have this same issue when running builds on a Jenkins slave. I think the problem is that the plugin assumes that the .sln file is at the root of the working directory. In my case, it's actually two levels down.

          In other words, my solution file is here: $JENKINS_HOME/[job-name]/src/server/MySolution.sln

          But the plugin "skips" the "src/server/" part of the path when trying to resolve files. It simply combines the Jenkins working directory with the relative path from the sln file.

          Dean Thrasher added a comment - I have this same issue when running builds on a Jenkins slave. I think the problem is that the plugin assumes that the .sln file is at the root of the working directory. In my case, it's actually two levels down. In other words, my solution file is here: $JENKINS_HOME/ [job-name] /src/server/MySolution.sln But the plugin "skips" the "src/server/" part of the path when trying to resolve files. It simply combines the Jenkins working directory with the relative path from the sln file.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 172787 ] New: JNJira + In-Review [ 184776 ]

          Nicolas Nobelis added a comment - - edited

          Hello,

          We are facing the same issue on a Master since our migration to a more recent version of Jenkins (2.19.1).

          I think this is because they changed how workspaces are organized on the filesystem.

          In our old version :
          $JENKINS_HOME/jobs/[job-name]/workspace
          In the new version :
          $JENKINS_HOME/workspace/[job-name]

          I hope this hint helps.
          Best regards,

          Nicolas

          Nicolas Nobelis added a comment - - edited Hello, We are facing the same issue on a Master since our migration to a more recent version of Jenkins (2.19.1). I think this is because they changed how workspaces are organized on the filesystem. In our old version : $JENKINS_HOME/jobs/ [job-name] /workspace In the new version : $JENKINS_HOME/workspace/ [job-name] I hope this hint helps. Best regards, Nicolas

          Ulli Hafner added a comment - - edited

          This error occurs if the tool that generates the warnings does not print absolute URLs. The warnings plugin then tries to "guess" the right name. Actually I'm using Jenkins workspace object to resolve the files. So it should work with the new layout (I just need to adapt the logger message).

          A solution for the problem is not generic, so I need to check each of your issues separately.

          Did you all activate the option scan for files in the workspace?

          Ulli Hafner added a comment - - edited This error occurs if the tool that generates the warnings does not print absolute URLs. The warnings plugin then tries to "guess" the right name. Actually I'm using Jenkins workspace object to resolve the files. So it should work with the new layout (I just need to adapt the logger message). A solution for the problem is not generic, so I need to check each of your issues separately. Did you all activate the option scan for files in the workspace ?

          Dean Thrasher added a comment -

          It's been a while since I worked on that project, but I'm fairly certain that I had tried the "scan for files in the workspace" option. As I said in my earlier comment, I think the issue was that my solution (.sln) file was placed two subfolders below the workspace / Git root.

          Dean Thrasher added a comment - It's been a while since I worked on that project, but I'm fairly certain that I had tried the "scan for files in the workspace" option. As I said in my earlier comment, I think the issue was that my solution (.sln) file was placed two subfolders below the workspace / Git root.

          Where is this option located ?
          Is it in Job configuration or in the plugin one ?

          Nicolas Nobelis added a comment - Where is this option located ? Is it in Job configuration or in the plugin one ?
          Robert Smid made changes -
          Attachment New: LinkProblem.docx [ 35606 ]

            drulli Ulli Hafner
            yauhen Yauhen Filipskikh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: