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

Plugin not working: NPE on getChannels() call

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • * RC server version: 6.1
      * Jenkins version: Jenkins 2.395 (runs from Docker image jenkins/jenkins:2.395-alpine)

      Attempting to set up integration with our corporate (self-hosted) RocketChat, but every attempt to send a message fails with the following exception:

      java.lang.NullPointerException
      	at jenkins.plugins.rocketchatnotifier.rocket.RocketChatClientImpl.getChannels(RocketChatClientImpl.java:98)
      	at jenkins.plugins.rocketchatnotifier.RocketClientImpl.<init>(RocketClientImpl.java:30)
      	at jenkins.plugins.rocketchatnotifier.workflow.RocketSendStep$RocketSendStepExecution.getRocketClient(RocketSendStep.java:306)
      	at jenkins.plugins.rocketchatnotifier.workflow.RocketSendStep$RocketSendStepExecution.run(RocketSendStep.java:273)
      	at jenkins.plugins.rocketchatnotifier.workflow.RocketSendStep$RocketSendStepExecution.run(RocketSendStep.java:220)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate2(ACL.java:451)
      	at hudson.security.ACL.impersonate(ACL.java:463)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.base/java.lang.Thread.run(Unknown Source) 

      The channel that I put into channel field is private (we don't have public channels in our company), so it is possible that this issue has to do with JENKINS-41436. I successfully tried posting to this channel with the same credentials using other integration solutions.

      Attempts to deliberately enter wrong credentials result into authentication errors, so the problem is not with connectivity. Not sure what exactly goes wrong, but it seems like the res variable contains something unexpected: either it is null itself, or the res.getMessage() returns null, which results an NPE being thrown from line 98 of RocketChatClientImpl.

       

            mreinhardt Martin Reinhardt
            myx_ostankin Vlad Nikiforov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: