• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Jenkins 1.509.4
      Jenkins 1.532.1 RC1
      Firefox 17.0.10 ESR

      The error screens shown for invalid configurations after pressing 'Apply' don't work.

      Steps to reproduce:
      0. Install Jenkins Enterprise with Cloudbees Template Plugin 4.1
      1. Create a job template
      3. Clear the 'name' attribute's ID field
      4. Press 'Apply'

      Expected result: Error message shown
      Actual result: Huge, empty dialog with title 'Error' shown (error screen seems to appear, but is immediately removed)

          [JENKINS-20772] 'Apply' error screens don't work

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3136
          JENKINS-20772 Fix scrolling (Revision 9b947ae8a239023482b8dcdec97d37425c42be8c)

          Result = SUCCESS
          daniel-beck : 9b947ae8a239023482b8dcdec97d37425c42be8c
          Files :

          • core/src/main/resources/lib/form/apply/apply.js

          dogfood added a comment - Integrated in jenkins_main_trunk #3136 JENKINS-20772 Fix scrolling (Revision 9b947ae8a239023482b8dcdec97d37425c42be8c) Result = SUCCESS daniel-beck : 9b947ae8a239023482b8dcdec97d37425c42be8c Files : core/src/main/resources/lib/form/apply/apply.js

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/Descriptor.java
          http://jenkins-ci.org/commit/jenkins/5d192634bb968190cb75cb752ed97474c57dc938
          Log:
          JavaScript error when showing a FormException after Apply is clicked. Related to JENKINS-20772 but probably not the same.
          (cherry picked from commit 9f23c0bdb3a3ed6485e161ff5c57ebba64f88035)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Descriptor.java http://jenkins-ci.org/commit/jenkins/5d192634bb968190cb75cb752ed97474c57dc938 Log: JavaScript error when showing a FormException after Apply is clicked. Related to JENKINS-20772 but probably not the same. (cherry picked from commit 9f23c0bdb3a3ed6485e161ff5c57ebba64f88035)

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/resources/lib/form/apply/apply.js
          http://jenkins-ci.org/commit/jenkins/eec3d65cdf865bcd19edae15d0ca6e581553db78
          Log:
          [FIXED JENKINS-20772] Properly render response in case Apply results in an error page.
          (cherry picked from commit 0e8195c43d744b65e46ce5d66262e29fbdb9fb35)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/resources/lib/form/apply/apply.js http://jenkins-ci.org/commit/jenkins/eec3d65cdf865bcd19edae15d0ca6e581553db78 Log: [FIXED JENKINS-20772] Properly render response in case Apply results in an error page. (cherry picked from commit 0e8195c43d744b65e46ce5d66262e29fbdb9fb35)

          Code changed in jenkins
          User: Jesse Glick
          Path:
          http://jenkins-ci.org/commit/jenkins/de78db8d6ba0a4ca1b4b839ab9606cd151d446be
          Log:
          JENKINS-17401 JENKINS-20772 Noting.

          (cherry picked from commit c7dcb99290548f82b39846f4db431ab2ceb326ae)

          Conflicts:
          changelog.html

          Compare: https://github.com/jenkinsci/jenkins/compare/9144cec099bf...de78db8d6ba0

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: http://jenkins-ci.org/commit/jenkins/de78db8d6ba0a4ca1b4b839ab9606cd151d446be Log: JENKINS-17401 JENKINS-20772 Noting. (cherry picked from commit c7dcb99290548f82b39846f4db431ab2ceb326ae) Conflicts: changelog.html Compare: https://github.com/jenkinsci/jenkins/compare/9144cec099bf...de78db8d6ba0

          Daniel Beck added a comment -

          This wasn't backported completely to the 1.532.2 RC. My improvements are missing, so the error dialog cannot be scrolled and shows an entire Jenkins page with header, sidebar, and everything.

          Daniel Beck added a comment - This wasn't backported completely to the 1.532.2 RC. My improvements are missing, so the error dialog cannot be scrolled and shows an entire Jenkins page with header, sidebar, and everything.

          Jesse Glick added a comment -

          Right, but the most critical fix—showing something in the error dialog—was backported. I think we can live with that, unless the lack of scrolling is making it impossible to see error details. (See https://github.com/jglick/jenkins/compare/printStackTrace-JDK-6507809 for another angle on this.)

          Jesse Glick added a comment - Right, but the most critical fix—showing something in the error dialog—was backported. I think we can live with that, unless the lack of scrolling is making it impossible to see error details. (See https://github.com/jglick/jenkins/compare/printStackTrace-JDK-6507809 for another angle on this.)

          Daniel Beck added a comment -

          Exactly, scrolling is the problem here. Attached some screenshots. "unscrollable-framed" is how it's currently backported to 1.532.2-RC, "scrollable-plain" is how it was released in 1.546. Note the scroll bar It's basically useless on a ~19" screen with 1280x1024, and even the larger screen just adds more frames from servlet filters and winstone. You effectively only get the message of the first wrapped exception, which is probably much less useful than this example in many cases.

          Your inversion of stack traces looks really interesting as well and would make them much more accessible in general. For reference, program in comment to linked JDK issue (slightly modified to fit in one file) produces following output:

          $ java Throwable_printStackTrace
          Throwable_printStackTrace$LowLevelException
          	at Throwable_printStackTrace.e(Throwable_printStackTrace.java:31)
          	at Throwable_printStackTrace.d(Throwable_printStackTrace.java:28)
          	at Throwable_printStackTrace.c(Throwable_printStackTrace.java:22)
          Caused: Throwable_printStackTrace$MidLevelException
          	at Throwable_printStackTrace.c(Throwable_printStackTrace.java:24)
          	at Throwable_printStackTrace.b(Throwable_printStackTrace.java:18)
          	at Throwable_printStackTrace.a(Throwable_printStackTrace.java:12)
          Caused: Throwable_printStackTrace$HighLevelException
          	at Throwable_printStackTrace.a(Throwable_printStackTrace.java:14)
          	at Throwable_printStackTrace.main(Throwable_printStackTrace.java:5)
          

          Daniel Beck added a comment - Exactly, scrolling is the problem here. Attached some screenshots. "unscrollable-framed" is how it's currently backported to 1.532.2-RC, "scrollable-plain" is how it was released in 1.546. Note the scroll bar It's basically useless on a ~19" screen with 1280x1024, and even the larger screen just adds more frames from servlet filters and winstone. You effectively only get the message of the first wrapped exception, which is probably much less useful than this example in many cases. Your inversion of stack traces looks really interesting as well and would make them much more accessible in general. For reference, program in comment to linked JDK issue (slightly modified to fit in one file) produces following output: $ java Throwable_printStackTrace Throwable_printStackTrace$LowLevelException at Throwable_printStackTrace.e(Throwable_printStackTrace.java:31) at Throwable_printStackTrace.d(Throwable_printStackTrace.java:28) at Throwable_printStackTrace.c(Throwable_printStackTrace.java:22) Caused: Throwable_printStackTrace$MidLevelException at Throwable_printStackTrace.c(Throwable_printStackTrace.java:24) at Throwable_printStackTrace.b(Throwable_printStackTrace.java:18) at Throwable_printStackTrace.a(Throwable_printStackTrace.java:12) Caused: Throwable_printStackTrace$HighLevelException at Throwable_printStackTrace.a(Throwable_printStackTrace.java:14) at Throwable_printStackTrace.main(Throwable_printStackTrace.java:5)

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/resources/jenkins/model/Jenkins/oops.jelly
          core/src/main/resources/lib/form/apply/apply.js
          http://jenkins-ci.org/commit/jenkins/fb738ea6de6bbcc7480705d53995cd8ec88e6f40
          Log:
          JENKINS-20772 Only show error message in dialog

          This change removes the superfluous UI elements around the error
          message if possible. Otherwise, fall back to existing behavior
          of adding entire page to iframe.

          (cherry picked from commit b856cc2434b33ed7fec3492223e141747369bba3)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/jenkins/model/Jenkins/oops.jelly core/src/main/resources/lib/form/apply/apply.js http://jenkins-ci.org/commit/jenkins/fb738ea6de6bbcc7480705d53995cd8ec88e6f40 Log: JENKINS-20772 Only show error message in dialog This change removes the superfluous UI elements around the error message if possible. Otherwise, fall back to existing behavior of adding entire page to iframe. (cherry picked from commit b856cc2434b33ed7fec3492223e141747369bba3)

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/resources/lib/form/apply/apply.js
          http://jenkins-ci.org/commit/jenkins/7b9b7ac162d9ae5acbb313d08b69a8f71ab08804
          Log:
          JENKINS-20772 Fix scrolling

          (cherry picked from commit 9b947ae8a239023482b8dcdec97d37425c42be8c)

          Compare: https://github.com/jenkinsci/jenkins/compare/867a35523c2f...7b9b7ac162d9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/lib/form/apply/apply.js http://jenkins-ci.org/commit/jenkins/7b9b7ac162d9ae5acbb313d08b69a8f71ab08804 Log: JENKINS-20772 Fix scrolling (cherry picked from commit 9b947ae8a239023482b8dcdec97d37425c42be8c) Compare: https://github.com/jenkinsci/jenkins/compare/867a35523c2f...7b9b7ac162d9

          Code changed in jenkins
          User: Jesse Glick
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/9620057a58dc07b52752683a433e200f36d4317d
          Log:
          When a server error is caught by applyErrorMessage (“ERROR” link), do not render the whole oops.jelly page.
          Just pick out the <div id="error-description"> from JENKINS-20772.

          Compare: https://github.com/jenkinsci/jenkins/compare/7ddc6be48716...9620057a58dc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/9620057a58dc07b52752683a433e200f36d4317d Log: When a server error is caught by applyErrorMessage (“ERROR” link), do not render the whole oops.jelly page. Just pick out the <div id="error-description"> from JENKINS-20772 . Compare: https://github.com/jenkinsci/jenkins/compare/7ddc6be48716...9620057a58dc

            jglick Jesse Glick
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: