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

Tried proxying hudson.plugins.emailext.ExtendedEmailPublisherDescriptor to support a circular dependency, but it is not an interface.

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      When using a Pre-send Script, jenkins reports the following stacktrace:

      Oct 31, 2019 4:02:38 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
      WARNING: Failed to instantiate Key[type=hudson.plugins.emailext.ExtendedEmailPublisherDescriptor, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Tried proxying hudson.plugins.emailext.ExtendedEmailPublisherDescriptor to support a circular dependency, but it is not an interface.
      
      1 error
      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
      at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
      at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
      ...
      

      Steps to reproduce:

      1. git clone https://github.com/jenkinsci/email-ext-plugin.git
      2. cd email-ext-plugin/
      3. git checkout email-ext-2.68
      4. mvn hpi:run
      5. navigate via http://localhost:8080 to Manage Jenkins > Configure System
      6. enter "// " (without quotes) into the Default Pre-send Script text field.
      7. restart jenkins

        Attachments

          Activity

          Hide
          maxdanilov Maxim Danilov added a comment - - edited

          Hi Alex Earl,

           

          Here's how you can reproduce the issue with a clean Jenkins setup using Docker (cross-platform): 

          docker run --name jenkins-test -p 30000:8080 --detach jenkins/jenkins:2.222.3-alpine

          • Jenkins container starts in the background
          • Check its logs for initial admin password (docker logs jenkins-test -f)
          • Go to http://localhost:30000 and login with initial admin password
          • Click on "Install suggested plugins" (this also installs the email-ext plugin 2.69)
          • Create the admin user with any data, click "Save and Continue"
          • Keep Jenkins URL as http://localhost:30000/,  click "Save and Finish" -> "Start Using Jenkins"
          • Click on "Manage Jenkins" -> "Configure System"
          • Type "// test" in the field "Default Pre-Send Script" and click "Save" <- this is what introduces the warning!

           
          Now it's the tricky part, usually, after the first restart there's no warning

          docker stop jenkins-test

          • Wait for JVM to shut down and container to stop

          docker start jenkins-test

          • Check the logs, there's probably no errors this time, then you'll need to restart again

          Shut down again:

          docker stop jenkins-test

          • Wait for JVM to shut down and container to stop

          docker start jenkins-test

          • Check the container logs, now there's a stack trace:
             
            2020-05-16 21:55:35.075+0000 [id=28] WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=hudson.plugins.emailext.ExtendedEmailPublisherDescriptor, annotation=[none]]; skipping this component
            
            com.google.inject.ProvisionException: Unable to provision, see the following errors:
            
            1) Tried proxying hudson.plugins.emailext.ExtendedEmailPublisherDescriptor to support a circular dependency, but it is not an interface.
            
            1 error
            
            at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
            at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
            at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:440)
            
          Show
          maxdanilov Maxim Danilov added a comment - - edited Hi Alex Earl ,   Here's how you can reproduce the issue with a clean Jenkins setup using Docker (cross-platform):  docker run --name jenkins-test -p 30000:8080 --detach jenkins/jenkins:2.222.3-alpine Jenkins container starts in the background Check its logs for initial admin password ( docker logs jenkins-test -f ) Go to http://localhost:30000 and login with initial admin password Click on "Install suggested plugins" (this also installs the email-ext plugin 2.69) Create the admin user with any data, click "Save and Continue" Keep Jenkins URL as http://localhost:30000/ ,  click "Save and Finish" -> "Start Using Jenkins" Click on "Manage Jenkins" -> "Configure System" Type "// test" in the field "Default Pre-Send Script" and click "Save" <- this is what introduces the warning!   Now it's the tricky part, usually, after the first restart there's no warning docker stop jenkins-test Wait for JVM to shut down and container to stop docker start jenkins-test Check the logs, there's probably no errors this time, then you'll need to restart again Shut down again: docker stop jenkins-test Wait for JVM to shut down and container to stop docker start jenkins-test Check the container logs, now there's a stack trace:   2020-05-16 21:55:35.075+0000 [id=28] WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=hudson.plugins.emailext.ExtendedEmailPublisherDescriptor, annotation=[none]]; skipping this component com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) Tried proxying hudson.plugins.emailext.ExtendedEmailPublisherDescriptor to support a circular dependency, but it is not an interface. 1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:440)
          Hide
          slide_o_mix Alex Earl added a comment -

          Just to clarify, this fails starting at 2.68?

          Show
          slide_o_mix Alex Earl added a comment - Just to clarify, this fails starting at 2.68?
          Hide
          svoelkel Stefan Völkel added a comment - - edited

          Just to clarify, this fails starting at 2.68?

          I doubt it, since we discovered this when upgrading from a rather old 1.x Jenkins installation. I'll try to figure out what the old version was exactly.

          The old version was: 2.39.3. I'll try to find the version where it breaks ...

          Version Works
          2.39.3 yes
          2.41.2 yes
          2.43 no, Error injecting constructor, java.lang.VerifyError: Expecting a stackmap frame at branch target 18
          2.45 no, Error injecting constructor, java.lang.VerifyError: Expecting a stackmap frame at branch target 18
          2.50 no, Error injecting constructor, java.lang.VerifyError: Expecting a stackmap frame at branch target 18
          2.58 no, com.google.inject.ProvisionException: Guice provision errors:
          2.68 no
          Show
          svoelkel Stefan Völkel added a comment - - edited Just to clarify, this fails starting at 2.68? I doubt it, since we discovered this when upgrading from a rather old 1.x Jenkins installation. I'll try to figure out what the old version was exactly. The old version was: 2.39.3. I'll try to find the version where it breaks ... Version Works 2.39.3 yes 2.41.2 yes 2.43 no, Error injecting constructor, java.lang.VerifyError: Expecting a stackmap frame at branch target 18 2.45 no, Error injecting constructor, java.lang.VerifyError: Expecting a stackmap frame at branch target 18 2.50 no, Error injecting constructor, java.lang.VerifyError: Expecting a stackmap frame at branch target 18 2.58 no, com.google.inject.ProvisionException: Guice provision errors: 2.68 no
          Hide
          slide_o_mix Alex Earl added a comment -

          Looking into this now. I am able to reproduce it so I should be able to make some progress.

          Show
          slide_o_mix Alex Earl added a comment - Looking into this now. I am able to reproduce it so I should be able to make some progress.
          Hide
          slide_o_mix Alex Earl added a comment -
          Show
          slide_o_mix Alex Earl added a comment - Will be in 2.72, see https://github.com/jenkinsci/email-ext-plugin/pull/210

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              svoelkel Stefan Völkel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: