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

ERROR: Could not send email as a part of the post-build publishers.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • email-ext-plugin
    • None

      Version: 2.63

       Win10 X86

      Jenkin version: 2.121.2

       

      Sending email for trigger: Always
      ERROR: Could not send email as a part of the post-build publishers.
      java.lang.NullPointerException
      at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.createSession(ExtendedEmailPublisherDescriptor.java:244)
      at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:726)
      at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:451)
      at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:441)
      at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:349)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:196)
      at hudson.model.Run.execute(Run.java:1845)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Some error occured trying to send the email...check the Jenkins log
      Finished: SUCCESS

          [JENKINS-54363] ERROR: Could not send email as a part of the post-build publishers.

          Alex Earl added a comment -

          What version of email-ext?

          Alex Earl added a comment - What version of email-ext?

          anand acharya added a comment -

          Hi

          I also got similar issue just few days back for email extension plugin 2.66.

          Please resolve this issue asap.

          Email was triggered for: Unstable (Test Failures)
          Sending email for trigger: Unstable (Test Failures)
          ERROR: Could not send email as a part of the post-build publishers.
          java.lang.NullPointerException
          at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.createSession(ExtendedEmailPublisherDescriptor.java:244)
          at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:726)
          at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:451)
          at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:441)
          at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:349)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1098)
          at hudson.model.Run.execute(Run.java:1863)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:429)

          anand acharya added a comment - Hi I also got similar issue just few days back for email extension plugin 2.66. Please resolve this issue asap. Email was triggered for: Unstable (Test Failures) Sending email for trigger: Unstable (Test Failures) ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.createSession(ExtendedEmailPublisherDescriptor.java:244) at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:726) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:451) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:441) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:349) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1098) at hudson.model.Run.execute(Run.java:1863) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)

          Alex Earl added a comment -

          That corresponds to this line of code: https://github.com/jenkinsci/email-ext-plugin/blob/email-ext-2.66/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java#L244

          I can add some checking in there to make sure things aren't null.

          Alex Earl added a comment - That corresponds to this line of code: https://github.com/jenkinsci/email-ext-plugin/blob/email-ext-2.66/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java#L244 I can add some checking in there to make sure things aren't null.

          anand acharya added a comment -

          Hi Alex,

          Can you please confirm when this issue will be resolved?

          Is there any current workaround in Jenkins to trigger emails post build?

          Thanks & Regards,

          Anand Acharya

          anand acharya added a comment - Hi Alex, Can you please confirm when this issue will be resolved? Is there any current workaround in Jenkins to trigger emails post build? Thanks & Regards, Anand Acharya

          anand acharya added a comment -

          slide_o_mix - please confirm when the next version of the email extension plugin will be available with the fix of this issue?

          anand acharya added a comment - slide_o_mix - please confirm when the next version of the email extension plugin will be available with the fix of this issue?

          Alex Earl added a comment -

          I'm still trying to replicate it so that I can make sure the fix is good.

          Alex Earl added a comment - I'm still trying to replicate it so that I can make sure the fix is good.

          anand acharya added a comment -

          slide_o_mix , issue is resolved. I added my email id in the Jenkins mail configuration and now the email extension plugin is triggering emails after build.

          It seems we need to configure at least one email account in the jenkins mail configuration. If email is not present then null pointer exception is thrown.

          anand acharya added a comment - slide_o_mix , issue is resolved. I added my email id in the Jenkins mail configuration and now the email extension plugin is triggering emails after build. It seems we need to configure at least one email account in the jenkins mail configuration. If email is not present then null pointer exception is thrown.

          Alex Earl added a comment -

          Alex Earl added a comment - Fixed in https://github.com/jenkinsci/email-ext-plugin/commit/5b7032bba59c32a8d8260983a852496e51312806

            slide_o_mix Alex Earl
            echo557 Huang Echo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: