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

REGRESSION: NPE when checking permissions - UserImpl.getPermission

    XMLWordPrintable

    Details

    • Epic Link:
    • Sprint:
      iapetus
    • Similar Issues:

      Description

      Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity when logged in:

      Results in the following:
      https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea

      The /activity screen is also a bit slow to load as well.

      Caused by: java.lang.NullPointerException
      	at org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:388)
      	at org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
      	at hudson.model.User.impersonate(User.java:317)
      	at io.jenkins.blueocean.service.embedded.rest.UserImpl.getPermission(UserImpl.java:100)
      	at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
      

      Only when logged in.

      where the NPE happens:
      https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/UserImpl.java#L100
      Which is odd, not sure why ti has to impersonate, I am logged in as me... In any case - it only started with this PR: https://github.com/jenkinsci/blueocean-plugin/pull/808/files

      In github oauth plugin:
      https://github.com/jenkinsci/github-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java#L388

      (do not know what is null... but it seems new).

      I wondered if this may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD - but I don't think so:

      at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
      	at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
      	at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
      	at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
      	at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
      	at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
      

        Attachments

          Activity

          michaelneale Michael Neale created issue -
          michaelneale Michael Neale made changes -
          Field Original Value New Value
          Epic Link JENKINS-35759 [ 171771 ]
          michaelneale Michael Neale made changes -
          Sprint iapetus [ 216 ]
          michaelneale Michael Neale made changes -
          Assignee Vivek Pandey [ vivek ]
          michaelneale Michael Neale made changes -
          Description Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity


          Results in the following:
          https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea


          This may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD I think?

          {code}
          at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
          {code}

          The /activity screen is also a bit slow to load as well.

          Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity


          Results in the following:
          https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea


          This may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD I think?

          {code}
          at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
          {code}

          The /activity screen is also a bit slow to load as well.

          And so on:

          {code}
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:388)
          at org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
          at hudson.model.User.impersonate(User.java:317)
          at io.jenkins.blueocean.service.embedded.rest.UserImpl.getPermission(UserImpl.java:100)
          at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
          {code}

          Only when logged in.


          michaelneale Michael Neale made changes -
          Summary Unable to list activity or branches for blueocean pipeline Unable to list activity or branches for blueocean pipeline - exception when on UserImpl.getPermission
          michaelneale Michael Neale made changes -
          Summary Unable to list activity or branches for blueocean pipeline - exception when on UserImpl.getPermission REGRESSION: Unable to list activity or branches for blueocean pipeline - exception when on UserImpl.getPermission
          michaelneale Michael Neale made changes -
          Description Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity


          Results in the following:
          https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea


          This may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD I think?

          {code}
          at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
          {code}

          The /activity screen is also a bit slow to load as well.

          And so on:

          {code}
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:388)
          at org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
          at hudson.model.User.impersonate(User.java:317)
          at io.jenkins.blueocean.service.embedded.rest.UserImpl.getPermission(UserImpl.java:100)
          at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
          {code}

          Only when logged in.


          Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity when logged in:


          Results in the following:
          https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea



          The /activity screen is also a bit slow to load as well.

          {code}
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:388)
          at org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
          at hudson.model.User.impersonate(User.java:317)
          at io.jenkins.blueocean.service.embedded.rest.UserImpl.getPermission(UserImpl.java:100)
          at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
          {code}

          Only when logged in.

          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/UserImpl.java#L100 is where the NPE happens
          In github oauth plugin:

          https://github.com/jenkinsci/github-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java#L388

          (do not know what is null... but it seems new).



          I wondered if this may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD - but I don't think so:

          {code}
          at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
          {code}
          michaelneale Michael Neale made changes -
          Priority Critical [ 2 ] Blocker [ 1 ]
          michaelneale Michael Neale made changes -
          Summary REGRESSION: Unable to list activity or branches for blueocean pipeline - exception when on UserImpl.getPermission REGRESSION: NPE when loading branches for blueocean pipeline - UserImpl.getPermission
          michaelneale Michael Neale made changes -
          Description Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity when logged in:


          Results in the following:
          https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea



          The /activity screen is also a bit slow to load as well.

          {code}
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:388)
          at org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
          at hudson.model.User.impersonate(User.java:317)
          at io.jenkins.blueocean.service.embedded.rest.UserImpl.getPermission(UserImpl.java:100)
          at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
          {code}

          Only when logged in.

          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/UserImpl.java#L100 is where the NPE happens
          In github oauth plugin:

          https://github.com/jenkinsci/github-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java#L388

          (do not know what is null... but it seems new).



          I wondered if this may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD - but I don't think so:

          {code}
          at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
          {code}
          Attempting to load: https://ci.blueocean.io/blue/organizations/jenkins/blueocean/activity when logged in:


          Results in the following:
          https://gist.github.com/michaelneale/6c26c9dd8597a1c9a69abb39db92e5ea



          The /activity screen is also a bit slow to load as well.

          {code}
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:388)
          at org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
          at hudson.model.User.impersonate(User.java:317)
          at io.jenkins.blueocean.service.embedded.rest.UserImpl.getPermission(UserImpl.java:100)
          at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
          {code}

          Only when logged in.

          where the NPE happens:
          https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/UserImpl.java#L100
          Which is odd, not sure why ti has to impersonate, I am logged in as me... In any case - it only started with this PR: https://github.com/jenkinsci/blueocean-plugin/pull/808/files


          In github oauth plugin:
          https://github.com/jenkinsci/github-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java#L388

          (do not know what is null... but it seems new).



          I wondered if this may be a variant of the https://issues.jenkins-ci.org/browse/JENKINS-40088 WSOD - but I don't think so:

          {code}
          at io.jenkins.blueocean.commons.stapler.export.Property.safeGetValue(Property.java:152)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:127)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
          at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:280)
          at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
          {code}
          michaelneale Michael Neale made changes -
          Summary REGRESSION: NPE when loading branches for blueocean pipeline - UserImpl.getPermission REGRESSION: NPE when checking permissions - UserImpl.getPermission
          vivek Vivek Pandey made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          vivek Vivek Pandey made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          vivek Vivek Pandey made changes -
          Status In Review [ 10005 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          jbriden Jenn Briden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              michaelneale Michael Neale
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: