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

When OAuth session expires, an ugly NPE is shown in Jenkins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • google-login-plugin
    • Tested with both:
      - Jenkins ver. 1.642.1 & google-login-plugin 1.1
      - Jenkins ver. 1.644 & google-login 1.2.1

      When you use google-login to authenticate in Jenkins, and you spend some time without doing anything, the OAuth session expires and an ugly NullPointerException error is show in Jenkins.
      (See screenshot)

      The error is caused by:
      return OAuthSession.getCurrent().doFinishLogin(request);
      when "OAuthSession.getCurrent()" is null.

      Could you please manage this event and show a graceful message for the expiration and also asking the user to log in again?

      When this error happens, it is also anoying that you have to press back in the browser (and depending where you were, that may end up with another error, if you were in a page that requires authorization), and then click on the login link in the upper right, so if the situation is controlled, it would offer a faster way for the user to log in again.

      Thanks!

            recampbell Ryan Campbell
            gsanchezu Guillermo Sanchez Urien
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: