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

Perforce Plugin causes config page to throw error if workspace mapping exceeds 2974 bytes

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • Windows 2003 R1 32 Bit / Jenkins 1.450 / Perforce 1.3.7

      I have a job that gathers a lot of different components from Perforce and we recently added a few new lines. After the job built once we attemt to go back into the config screen for the job and the settings come up but we get a "ERROR" just below the mapping that once you click on it it shows a 404 error and after that the user is logged out of Jenkins. If I delete the project mapping from the config.xml and reload from the disk the job is editable again until the next build. I have tried to use the clientspec feature but this also adds back in the <projectPath> key in the config.xml and again the error reoccurs after the first build. Right now the only work around is to modify the job file manually with a text editor. The jobs seem to build just fine. I have attached a job config file to show the issue. If I reduce the mapping down to 2974 bytes the error goes away and does not seem to return. My feeling is it is in the parser of the mapping, but that is a guess. For user login control we currently are using "Project-based Matrix Authorization Strategy" with "Jenkins's own user database".

          [JENKINS-12806] Perforce Plugin causes config page to throw error if workspace mapping exceeds 2974 bytes

          I get a "Invalid mapping:" followed by whichever line hits the 2975 bytes.
          If I shorten the mapping, the error goes away.
          Thanks for the sure fast follow up!

          Mike Henderson added a comment - I get a "Invalid mapping:" followed by whichever line hits the 2975 bytes. If I shorten the mapping, the error goes away. Thanks for the sure fast follow up!

          Rob Petti added a comment -

          I'm able to reproduce the problem, but clicking on the ERROR link doesn't seem to do anything for me.

          I suspect this is simply the form validation overflowing the maximum url length of either the server or the browser... I'll take a look to see if the form validation scripts will support HTTP POST requests instead of GET requests. That should solve the issue.

          In the meantime, I believe you can safely ignore this error.

          Rob Petti added a comment - I'm able to reproduce the problem, but clicking on the ERROR link doesn't seem to do anything for me. I suspect this is simply the form validation overflowing the maximum url length of either the server or the browser... I'll take a look to see if the form validation scripts will support HTTP POST requests instead of GET requests. That should solve the issue. In the meantime, I believe you can safely ignore this error.

          Is there any chance that this will be worked on? I know you considered it minor, but it really isn't for us. I have 6-10 jobs that I have to manipulate manually in the config.xml because the editor is broken with this bug.

          I can not safely ignore the error, the editor is unusable.

          Mike Henderson added a comment - Is there any chance that this will be worked on? I know you considered it minor, but it really isn't for us. I have 6-10 jobs that I have to manipulate manually in the config.xml because the editor is broken with this bug. I can not safely ignore the error, the editor is unusable.

          Rob Petti added a comment -

          The editor is still completely usable. It's just the form validation that doesn't work correctly.

          Rob Petti added a comment - The editor is still completely usable. It's just the form validation that doesn't work correctly.

          It acts differently in some browsers.

          Chrome fails completely and returns to the login screen. (This is my primary browser and the one I was basing my response on)

          Firefox seems to allow the changes but has this as an error below the map box: "HTTP/0.9 403 Forbidden Server: Winstone Servlet Engine v0.9.10 Content-Type: text/html;charset=UTF-8 Content-Length: 781 Connection: Close Date: Fri, 05 Oct 2012 16:50:01 GMT X-Powered-By: Servlet/2.5 (Winstone/0.9.10) Set-Cookie: JSESSIONID.a0ab2be0=af1fd378a0d73bbc661ac71ae7df2b3c; Path=/; HttpOnly Authentication required "

          IE 9 also shows the "ERROR Authentication required" below the map box.

          Other browsers (with combinations of plugins and updates unknown) have no luck with this as I have seen on my colleagues computers. So, I have been responsible for months manipulating these jobs by hand. Today when I retested it did seem to work in Firefox and IE9 but I have had troubles in the past with these as well. Firefox and IE never log the person out like Chrome does though.

          Mike Henderson added a comment - It acts differently in some browsers. Chrome fails completely and returns to the login screen. (This is my primary browser and the one I was basing my response on) Firefox seems to allow the changes but has this as an error below the map box: "HTTP/0.9 403 Forbidden Server: Winstone Servlet Engine v0.9.10 Content-Type: text/html;charset=UTF-8 Content-Length: 781 Connection: Close Date: Fri, 05 Oct 2012 16:50:01 GMT X-Powered-By: Servlet/2.5 (Winstone/0.9.10) Set-Cookie: JSESSIONID.a0ab2be0=af1fd378a0d73bbc661ac71ae7df2b3c; Path=/; HttpOnly Authentication required " IE 9 also shows the "ERROR Authentication required" below the map box. Other browsers (with combinations of plugins and updates unknown) have no luck with this as I have seen on my colleagues computers. So, I have been responsible for months manipulating these jobs by hand. Today when I retested it did seem to work in Firefox and IE9 but I have had troubles in the past with these as well. Firefox and IE never log the person out like Chrome does though.

          Rob Petti added a comment -

          So it's just Chrome that is unusable?

          Rob Petti added a comment - So it's just Chrome that is unusable?

          Rob Petti added a comment -

          Also, can you please verify that you do NOT get login-related problems when configuring jobs that have a shorter spec? I find it very odd that this would cause a logout.

          Rob Petti added a comment - Also, can you please verify that you do NOT get login-related problems when configuring jobs that have a shorter spec? I find it very odd that this would cause a logout.

          Like I stated, today I didn't have a failure in IE9 or Firefox but I have had problems with them in the past where the authentication error caused a failure to submit the changes and for them to take effect. Today I did not have that problem.

          Yes, it only affects the jobs with workspace sizes exceeding 2974 bytes. I have 40 others (or more) that all work fine.

          Thanks for your time.

          Mike Henderson added a comment - Like I stated, today I didn't have a failure in IE9 or Firefox but I have had problems with them in the past where the authentication error caused a failure to submit the changes and for them to take effect. Today I did not have that problem. Yes, it only affects the jobs with workspace sizes exceeding 2974 bytes. I have 40 others (or more) that all work fine. Thanks for your time.

          Rob Petti added a comment -

          Thanks. I didn't realize that this was actually a blocking issue on some browsers. I'll look into it, but I suspect we may just have to disable form validation on that field entirely.

          Rob Petti added a comment - Thanks. I didn't realize that this was actually a blocking issue on some browsers. I'll look into it, but I suspect we may just have to disable form validation on that field entirely.

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          http://jenkins-ci.org/commit/perforce-plugin/e94f71f9fee5494d400961a11e0cb5df46720536
          Log:
          JENKINS-12806 disabling form validation on the view map, since it causes issues with large maps

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/perforce-plugin/e94f71f9fee5494d400961a11e0cb5df46720536 Log: JENKINS-12806 disabling form validation on the view map, since it causes issues with large maps

            Unassigned Unassigned
            mikehend Mike Henderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: