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

'Apply' error screens don't work

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • Jenkins 1.509.4
      Jenkins 1.532.1 RC1
      Firefox 17.0.10 ESR

    Description

      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)

      Attachments

        Issue Links

          Activity

            jglick 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.)

            jglick 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.)
            danielbeck 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)
            
            danielbeck 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_issue_link 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_issue_link 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_issue_link 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

            People

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

              Dates

                Created:
                Updated:
                Resolved: