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

          Mike Henderson created issue -

          If I remove security by allowing everyone to do anything the bug changes to showing a parsing error in the workspace mapping at the line where it flows over 2975 bytes.
          This error does not seem to effect the job itself and the entire workspace is synced just fine. I hope that helps to pinpoint the issue.

          Mike Henderson added a comment - If I remove security by allowing everyone to do anything the bug changes to showing a parsing error in the workspace mapping at the line where it flows over 2975 bytes. This error does not seem to effect the job itself and the entire workspace is synced just fine. I hope that helps to pinpoint the issue.

          Rob Petti added a comment -

          Can you post the parsing error?

          Rob Petti added a comment - Can you post the parsing error?
          Rob Petti made changes -
          Assignee New: Rob Petti [ rpetti ]

          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.
          Rob Petti made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]

          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.

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

              Created:
              Updated: