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

Bitbucket plugin unable to parse a Pull Request JSON Object

    Details

    • Similar Issues:

      Description

      I have created this issue after reading JENKINS-28877 and JENKINS-29096. Please, pay attention to the JSON provided as body for the CURL request to test its way of works.

      I have configured a Webhook in Bitbucket Server 13.1 to be triggered by Approved event. I have received a HTTP 500 error, and get the same response with the next CURL code. Here is the error from Bitbucket UI:

      net.sf.json.JSONException: JSONObject["user"] not found.
      	at net.sf.json.JSONObject.getString(JSONObject.java:2040)
      	at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPostServicePayload(BitbucketPayloadProcessor.java:128)
      	at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPayload(BitbucketPayloadProcessor.java:37)
      	at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:54)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      	at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
      	at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:243)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
      	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
      	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:92)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:42)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:530)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused: javax.servlet.ServletException
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:784)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
      	at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:243)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
      	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
      	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:92)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:42)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:530)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      I have captured the request and repeated here as a CURL:

      curl -X POST \
        http://URL/bitbucket-hook/ \
        -H 'Cache-Control: no-cache' \
        -H 'Content-Type: application/json; charset=utf-8' \
        -H 'Postman-Token: 3d72a314-48e1-45ff-832a-950d43a7435d' \
        -H 'X-Event-Key: pr:reviewer:approved' \
        -H 'X-Request-Id: 0d6f5c89-f29b-4c8a-9fc4-a6fd1846bafb' \
        -d '{"eventKey":"pr:reviewer:approved","date":"2018-10-08T14:29:51+0200","actor":{"name":"authorUserReplaced","emailAddress":"authorReplaced","id":13761,"displayName":"authorReplaced","active":true,"slug":"authorUserReplaced","type":"NORMAL"},"pullRequest":{"id":2,"version":5,"title":"test edited online with Bitbucket","description":"abaöldflj","state":"OPEN","open":true,"closed":false,"createdDate":1538055333000,"updatedDate":1538999909000,"fromRef":{"id":"refs/heads/feature/checkitagain","displayId":"feature/checkitagain","latestCommit":"d5b55683288bc89c23609f3087a02b6daf7eef06","repository":{"slug":"bitbucket-test","id":1960,"name":"bitbucket-test","scmId":"git","state":"AVAILABLE","statusMessage":"Available","forkable":true,"project":{"key":"DVSPRT","id":346,"name":"Development Support","description":"","public":false,"type":"NORMAL"},"public":false}},"toRef":{"id":"refs/heads/master","displayId":"master","latestCommit":"ad359c8a9ba1eaf0bd2adec3aa37492c63966afb","repository":{"slug":"bitbucket-test","id":1960,"name":"bitbucket-test","scmId":"git","state":"AVAILABLE","statusMessage":"Available","forkable":true,"project":{"key":"DVSPRT","id":346,"name":"Development Support","description":"","public":false,"type":"NORMAL"},"public":false}},"locked":false,"author":{"user":{"name":"otherUserReplaced","emailAddress":"otherUserReplaced","id":11708,"displayName":"otherUserReplaced","active":true,"slug":"otherUserReplaced","type":"NORMAL"},"role":"AUTHOR","approved":false,"status":"UNAPPROVED"},"reviewers":[{"user":{"name":"authorUserReplaced","emailAddress":"authorReplaced","id":13761,"displayName":"authorReplaced","active":true,"slug":"authorUserReplaced","type":"NORMAL"},"lastReviewedCommit":"d5b55683288bc89c23609f3087a02b6daf7eef06","role":"REVIEWER","approved":true,"status":"APPROVED"}],"participants":[]},"participant":{"user":{"name":"authorUserReplaced","emailAddress":"authorReplaced","id":13761,"displayName":"authorReplaced","active":true,"slug":"authorUserReplaced","type":"NORMAL"},"lastReviewedCommit":"d5b55683288bc89c23609f3087a02b6daf7eef06","role":"REVIEWER","approved":true,"status":"APPROVED"},"previousStatus":"UNAPPROVED"}'
      

      As far as I can see here is where Jenkins Bitbucket Plugin fails:

      https://github.com/jenkinsci/bitbucket-plugin/blob/ce068b7f2cbf5250aa6d54c3acdd455d45b56246/src/main/java/com/cloudbees/jenkins/plugins/BitbucketPayloadProcessor.java#L24

        Attachments

          Activity

          Hide
          vnenashev Владислав Ненашев added a comment -

          I have configured a Webhook in Bitbucket Server v6.1.2 to be triggered by test event on https://${jenkins}/bitbucket-hook/ . I have received a HTTP 500 error, this log

          Headers

          X-Jenkins: 2.204.2
          Server: nginx
          X-Content-Type-Options: nosniff
          Connection: keep-alive
          X-Hudson: 1.395
          Date: Fri, 31 Jul 2020 02:23:05 GMT
          Referrer-Policy: same-origin
          X-Jenkins-Session: 235864ed
          X-Frame-Options: sameorigin
          X-Instance-Identity: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxAJBRvXS/tRscjjny4G+hXNHrykFYDcA65kSF01pl1A/5ocM6ccSR9Eh+YzAmLYuU9OfXTP1IDI/4oYI+jgxTG+2F6+0iMPsC9VMkDyMc0pyfMNx+6C4aLcZackeUm9JbmQYMJLsK+dPD7+cBQaOkOUmePNkAg1sPLRb66QVyQ7aXYpbNj73dthDmFbKAjX56+AKz524xRWzXzl2pqRxZph5QObmn/mKobtOJp1QByEtWT70Qvvd9oL0BnueBMRPx54aILyjzXGhYr/98tlfFucM5b9iVjdFSy7gpjeqNiqL8SStbUr8vPYmZaekS0j7a5WOEfBrqAAtQy0rHXVYAQIDAQAB
          Strict-Transport-Security: max-age=63072000
          Cache-Control: no-cache,no-store,must-revalidate
          X-Jenkins-CLI-Port: 8181
          X-Hudson-Theme: default
          Set-Cookie: JSESSIONID.424e5210=node0ala72bmhd9c8opuelq9mz2g11.node0;Path=/;Secure;HttpOnly
          X-Hudson-CLI-Port: 8181
          Expires: Thu, 01 Jan 1970 00:00:00 GMT
          X-Jenkins-CLI2-Port: 8181
          Content-Length: 25567
          Content-Type: text/html; charset=UTF-8
          

          Body

           

            
            <!DOCTYPE html><html><head resURL="/static/235864ed" data-rooturl="" data-resurl="/static/235864ed">
              
          
              <title>Jenkins [Jenkins]</title><link rel="stylesheet" href="/static/235864ed/css/layout-common.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/css/style.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/css/color.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/css/responsive-grid.css" type="text/css"><link rel="shortcut icon" href="/static/235864ed/favicon.ico" type="image/vnd.microsoft.icon"><link color="black" rel="mask-icon" href="/images/mask-icon.svg"><script>var isRunAsTest=false; var rootURL=""; var resURL="/static/235864ed";</script><script src="/static/235864ed/scripts/prototype.js" type="text/javascript"></script><script src="/static/235864ed/scripts/behavior.js" type="text/javascript"></script><script src='/adjuncts/235864ed/org/kohsuke/stapler/bind.js' type='text/javascript'></script><script src="/static/235864ed/scripts/yui/yahoo/yahoo-min.js"></script><script src="/static/235864ed/scripts/yui/dom/dom-min.js"></script><script src="/static/235864ed/scripts/yui/event/event-min.js"></script><script src="/static/235864ed/scripts/yui/animation/animation-min.js"></script><script src="/static/235864ed/scripts/yui/dragdrop/dragdrop-min.js"></script><script src="/static/235864ed/scripts/yui/container/container-min.js"></script><script src="/static/235864ed/scripts/yui/connection/connection-min.js"></script><script src="/static/235864ed/scripts/yui/datasource/datasource-min.js"></script><script src="/static/235864ed/scripts/yui/autocomplete/autocomplete-min.js"></script><script src="/static/235864ed/scripts/yui/menu/menu-min.js"></script><script src="/static/235864ed/scripts/yui/element/element-min.js"></script><script src="/static/235864ed/scripts/yui/button/button-min.js"></script><script src="/static/235864ed/scripts/yui/storage/storage-min.js"></script><script src="/static/235864ed/scripts/hudson-behavior.js" type="text/javascript"></script><script src="/static/235864ed/scripts/sortable.js" type="text/javascript"></script><script>crumb.init("", "");</script><link rel="stylesheet" href="/static/235864ed/scripts/yui/container/assets/container.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/scripts/yui/assets/skins/sam/skin.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/scripts/yui/container/assets/skins/sam/container.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/scripts/yui/button/assets/skins/sam/button.css" type="text/css"><link rel="stylesheet" href="/static/235864ed/scripts/yui/menu/assets/skins/sam/menu.css" type="text/css"><meta name="ROBOTS" content="INDEX,NOFOLLOW"><meta name="viewport" content="width=device-width, initial-scale=1"><script src="/adjuncts/235864ed/org/kohsuke/stapler/jquery/jquery.full.js" type="text/javascript"></script><script>var Q=jQuery.noConflict()</script><link rel="stylesheet" href="/plugin/jquery-ui/css/jquery-ui-1.8.9.custom.css" type="text/css"><script src="/plugin/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script><script>
                if(window.Prototype && JSON) {
                  var _json_stringify = JSON.stringify;
                  JSON.stringify = function(value) {
                      var _array_tojson = Array.prototype.toJSON;
                      delete Array.prototype.toJSON;
                      var r=_json_stringify(value);
                      Array.prototype.toJSON = _array_tojson;
                      return r;
                  };
               }  
             </script><script src="/plugin/extended-choice-parameter/js/selectize.min.js" type="text/javascript"></script><script src="/plugin/extended-choice-parameter/js/jsoneditor.min.js" type="text/javascript"></script><script src="/plugin/extended-choice-parameter/js/jquery.jsonview.min.js" type="text/javascript"></script><link rel="stylesheet" href="/plugin/extended-choice-parameter/css/jquery.jsonview.css"><link rel="stylesheet" id="icon_stylesheet" href="/plugin/extended-choice-parameter/css/selectize.css"><link rel="stylesheet" id="icon_stylesheet" href="/plugin/extended-choice-parameter/css/selectize.bootstrap2.css"><link rel="stylesheet" id="theme_stylesheet"><link rel="stylesheet" id="icon_stylesheet"><script src="/static/235864ed/scripts/yui/cookie/cookie-min.js"></script><style type="text/css">
          .logo:after {
          content: 'powered by SberWorks';
          font-size: 16px;
          margin-left: 164px;
          margin-right: 12px;
          color: white;
          line-height: 46px;
          }
          
          </style><script src="/static/235864ed/jsbundles/page-init.js" type="text/javascript"></script></head><body data-model-type="hudson.model.Hudson" id="jenkins" class="yui-skin-sam two-column jenkins-2.204.2" data-version="2.204.2"><a href="#skip2content" class="skiplink">Skip to content</a><div id="page-head"><div id="header"><div class="logo"><a id="jenkins-home-link" href="/"><img src="/static/235864ed/images/headshot.png" alt="[Jenkins]" id="jenkins-head-icon"><img src="/static/235864ed/images/title.png" alt="Jenkins" width="139" id="jenkins-name-icon" height="34"></a></div><div class="login"> <a href="/login?from=%2Fbitbucket-hook%2F"><b>log in</b></a></div><div class="searchbox hidden-xs"><form role="search" method="get" name="search" action="/search/" style="position:relative;" class="no-json"><div id="search-box-minWidth"></div><div id="search-box-sizer"></div><div id="searchform"><input role="searchbox" name="q" placeholder="search" id="search-box" class="has-default-text"> <a href="https://jenkins.io/redirect/search-box"><img src="/static/235864ed/images/16x16/help.png" style="width: 16px; height: 16px; " class="icon-help icon-sm"></a><div id="search-box-completion"></div><script>createSearchBox("/search/");</script></div></form></div></div><div id="breadcrumbBar"><tr id="top-nav"><td id="left-top-nav" colspan="2"><link rel='stylesheet' href='/adjuncts/235864ed/lib/layout/breadcrumbs.css' type='text/css' /><script src='/adjuncts/235864ed/lib/layout/breadcrumbs.js' type='text/javascript'></script><div class="top-sticker noedge"><div class="top-sticker-inner"><div id="right-top-nav"></div><ul id="breadcrumbs"><li class="item"><a href="/" class="model-link inside">Jenkins</a></li><li href="/" class="children"></li></ul><div id="breadcrumb-menu-target"></div></div></div></td></tr></div></div><div id="page-body" class="clear"><div id="side-panel"><div class="task"><a href="https://jenkins.io/" class="task-icon-link"><img src="/static/235864ed/images/24x24/next.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-next icon-md"></a> <a href="https://jenkins.io/" title="Jenkins project" class="task-link">Jenkins project</a></div><div class="task"><a href="https://jenkins.io/redirect/report-an-issue" class="task-icon-link"><img src="/static/235864ed/images/24x24/gear2.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-gear2 icon-md"></a> <a href="https://jenkins.io/redirect/report-an-issue" title="Bug tracker" class="task-link">Bug tracker</a></div><div class="task"><a href="https://jenkins.io/redirect/mailing-lists" class="task-icon-link"><img src="/static/235864ed/images/24x24/search.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-search icon-md"></a> <a href="https://jenkins.io/redirect/mailing-lists" title="Mailing Lists" class="task-link">Mailing Lists</a></div><div class="task"><a href="https://twitter.com/jenkinsci" class="task-icon-link"><img src="/static/235864ed/images/24x24/user.png" style="width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class="icon-user icon-md"></a> <a href="https://twitter.com/jenkinsci" title="Twitter: @jenkinsci" class="task-link">Twitter: @jenkinsci</a></div></div><div id="main-panel"><a name="skip2content"></a><h1 style="text-align: center"><img src="/static/235864ed/images/rage.png" width="154" height="179"><span style="font-size:50px"> Oops!</span></h1><div id="error-description"><p>A problem occurred while processing the request.
                  Please check <a href="https://jenkins.io/redirect/issue-tracker">our bug tracker</a> to see if a similar problem has already been reported.
                  If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem.
                  If you think this is a new issue, please file a new issue.
                  When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins.
                  <a href="https://jenkins.io/redirect/users-mailing-list">The users list</a> might be also useful in understanding what has happened.<h2>Stack trace</h2><pre style="margin:2em; clear:both">net.sf.json.JSONException: JSONObject["user"] not found.
          	at net.sf.json.JSONObject.getString(JSONObject.java:2040)
          	at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPostServicePayload(BitbucketPayloadProcessor.java:178)
          	at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPayload(BitbucketPayloadProcessor.java:42)
          	at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:54)
          	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
          	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
          	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
          	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
          	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
          	at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:27)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
          	at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
          	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
          	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:109)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:42)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
          	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
          	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
          	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
          	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
          	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
          	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
          	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
          	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
          	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
          	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
          	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
          	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          	at org.eclipse.jetty.server.Server.handle(Server.java:505)
          	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
          	at org.eclipse.jetty.server.HttpConne
          

           

          Show
          vnenashev Владислав Ненашев added a comment - I have configured a Webhook in Bitbucket Server v6.1.2 to be triggered by test event on  https://${jenkins}/bitbucket-hook/  . I have received a HTTP 500 error, this log Headers X-Jenkins: 2.204.2 Server: nginx X-Content-Type-Options: nosniff Connection: keep-alive X-Hudson: 1.395 Date: Fri, 31 Jul 2020 02:23:05 GMT Referrer-Policy: same-origin X-Jenkins-Session: 235864ed X-Frame-Options: sameorigin X-Instance-Identity: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxAJBRvXS/tRscjjny4G+hXNHrykFYDcA65kSF01pl1A/5ocM6ccSR9Eh+YzAmLYuU9OfXTP1IDI/4oYI+jgxTG+2F6+0iMPsC9VMkDyMc0pyfMNx+6C4aLcZackeUm9JbmQYMJLsK+dPD7+cBQaOkOUmePNkAg1sPLRb66QVyQ7aXYpbNj73dthDmFbKAjX56+AKz524xRWzXzl2pqRxZph5QObmn/mKobtOJp1QByEtWT70Qvvd9oL0BnueBMRPx54aILyjzXGhYr/98tlfFucM5b9iVjdFSy7gpjeqNiqL8SStbUr8vPYmZaekS0j7a5WOEfBrqAAtQy0rHXVYAQIDAQAB Strict-Transport-Security: max-age=63072000 Cache-Control: no-cache,no-store,must-revalidate X-Jenkins-CLI-Port: 8181 X-Hudson-Theme: default Set-Cookie: JSESSIONID.424e5210=node0ala72bmhd9c8opuelq9mz2g11.node0;Path=/;Secure;HttpOnly X-Hudson-CLI-Port: 8181 Expires: Thu, 01 Jan 1970 00:00:00 GMT X-Jenkins-CLI2-Port: 8181 Content-Length: 25567 Content-Type: text/html; charset=UTF-8 Body   <!DOCTYPE html><html><head resURL= "/ static /235864ed" data-rooturl= "" data-resurl=" / static /235864ed"> <title>Jenkins [Jenkins]</title><link rel= "stylesheet" href= "/ static /235864ed/css/layout-common.css" type= "text/css" ><link rel= "stylesheet" href= "/ static /235864ed/css/style.css" type= "text/css" ><link rel= "stylesheet" href= "/ static /235864ed/css/color.css" type= "text/css" ><link rel= "stylesheet" href= "/ static /235864ed/css/responsive-grid.css" type= "text/css" ><link rel= "shortcut icon" href= "/ static /235864ed/favicon.ico" type= "image/vnd.microsoft.icon" ><link color= "black" rel= "mask-icon" href= "/images/mask-icon.svg" ><script> var isRunAsTest= false ; var rootURL= ""; var resURL=" / static /235864ed ";</script><script src=" / static /235864ed/scripts/prototype.js " type=" text/javascript "></script><script src=" / static /235864ed/scripts/behavior.js " type=" text/javascript "></script><script src= '/adjuncts/235864ed/org/kohsuke/stapler/bind.js' type= 'text/javascript' ></script><script src=" / static /235864ed/scripts/yui/yahoo/yahoo-min.js "></script><script src=" / static /235864ed/scripts/yui/dom/dom-min.js "></script><script src=" / static /235864ed/scripts/yui/event/event-min.js "></script><script src=" / static /235864ed/scripts/yui/animation/animation-min.js "></script><script src=" / static /235864ed/scripts/yui/dragdrop/dragdrop-min.js "></script><script src=" / static /235864ed/scripts/yui/container/container-min.js "></script><script src=" / static /235864ed/scripts/yui/connection/connection-min.js "></script><script src=" / static /235864ed/scripts/yui/datasource/datasource-min.js "></script><script src=" / static /235864ed/scripts/yui/autocomplete/autocomplete-min.js "></script><script src=" / static /235864ed/scripts/yui/menu/menu-min.js "></script><script src=" / static /235864ed/scripts/yui/element/element-min.js "></script><script src=" / static /235864ed/scripts/yui/button/button-min.js "></script><script src=" / static /235864ed/scripts/yui/storage/storage-min.js "></script><script src=" / static /235864ed/scripts/hudson-behavior.js " type=" text/javascript "></script><script src=" / static /235864ed/scripts/sortable.js " type=" text/javascript "></script><script>crumb.init(" ", " ");</script><link rel=" stylesheet " href=" / static /235864ed/scripts/yui/container/assets/container.css " type=" text/css "><link rel=" stylesheet " href=" / static /235864ed/scripts/yui/assets/skins/sam/skin.css " type=" text/css "><link rel=" stylesheet " href=" / static /235864ed/scripts/yui/container/assets/skins/sam/container.css " type=" text/css "><link rel=" stylesheet " href=" / static /235864ed/scripts/yui/button/assets/skins/sam/button.css " type=" text/css "><link rel=" stylesheet " href=" / static /235864ed/scripts/yui/menu/assets/skins/sam/menu.css " type=" text/css "><meta name=" ROBOTS " content=" INDEX,NOFOLLOW "><meta name=" viewport " content=" width=device-width, initial-scale=1 "><script src=" /adjuncts/235864ed/org/kohsuke/stapler/jquery/jquery.full.js " type=" text/javascript "></script><script> var Q=jQuery.noConflict()</script><link rel=" stylesheet " href=" /plugin/jquery-ui/css/jquery-ui-1.8.9.custom.css " type=" text/css "><script src=" /plugin/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script><script> if (window.Prototype && JSON) { var _json_stringify = JSON.stringify; JSON.stringify = function(value) { var _array_tojson = Array.prototype.toJSON; delete Array.prototype.toJSON; var r=_json_stringify(value); Array.prototype.toJSON = _array_tojson; return r; }; } </script><script src= "/plugin/extended-choice-parameter/js/selectize.min.js" type= "text/javascript" ></script><script src= "/plugin/extended-choice-parameter/js/jsoneditor.min.js" type= "text/javascript" ></script><script src= "/plugin/extended-choice-parameter/js/jquery.jsonview.min.js" type= "text/javascript" ></script><link rel= "stylesheet" href= "/plugin/extended-choice-parameter/css/jquery.jsonview.css" ><link rel= "stylesheet" id= "icon_stylesheet" href= "/plugin/extended-choice-parameter/css/selectize.css" ><link rel= "stylesheet" id= "icon_stylesheet" href= "/plugin/extended-choice-parameter/css/selectize.bootstrap2.css" ><link rel= "stylesheet" id= "theme_stylesheet" ><link rel= "stylesheet" id= "icon_stylesheet" ><script src= "/ static /235864ed/scripts/yui/cookie/cookie-min.js" ></script><style type= "text/css" > .logo:after { content: 'powered by SberWorks' ; font-size: 16px; margin-left: 164px; margin-right: 12px; color: white; line-height: 46px; } </style><script src= "/ static /235864ed/jsbundles/page-init.js" type= "text/javascript" ></script></head><body data-model-type= "hudson.model.Hudson" id= "jenkins" class= "yui-skin-sam two-column jenkins-2.204.2" data-version= "2.204.2" ><a href= "#skip2content" class= "skiplink" >Skip to content</a><div id= "page-head" ><div id= "header" ><div class= "logo" ><a id= "jenkins-home-link" href= "/" ><img src= "/ static /235864ed/images/headshot.png" alt= "[Jenkins]" id= "jenkins-head-icon" ><img src= "/ static /235864ed/images/title.png" alt= "Jenkins" width= "139" id= "jenkins-name-icon" height= "34" ></a></div><div class= "login" > <a href= "/login?from=%2Fbitbucket-hook%2F" ><b>log in</b></a></div><div class= "searchbox hidden-xs" ><form role= "search" method= "get" name= "search" action= "/search/" style= "position:relative;" class= "no-json" ><div id= "search-box-minWidth" ></div><div id= "search-box-sizer" ></div><div id= "searchform" ><input role= "searchbox" name= "q" placeholder= "search" id= "search-box" class= "has- default -text" > <a href= "https: //jenkins.io/redirect/search-box" ><img src= "/ static /235864ed/images/16x16/help.png" style= "width: 16px; height: 16px; " class= "icon-help icon-sm" ></a><div id= "search-box-completion" ></div><script>createSearchBox( "/search/" );</script></div></form></div></div><div id= "breadcrumbBar" ><tr id= "top-nav" ><td id= "left-top-nav" colspan= "2" ><link rel= 'stylesheet' href= '/adjuncts/235864ed/lib/layout/breadcrumbs.css' type= 'text/css' /><script src= '/adjuncts/235864ed/lib/layout/breadcrumbs.js' type= 'text/javascript' ></script><div class= "top-sticker noedge" ><div class= "top-sticker- inner " ><div id= "right-top-nav" ></div><ul id= "breadcrumbs" ><li class= "item" ><a href= "/" class= "model-link inside" >Jenkins</a></li><li href= "/" class= "children" ></li></ul><div id= "breadcrumb-menu-target" ></div></div></div></td></tr></div></div><div id= "page-body" class= "clear" ><div id= "side-panel" ><div class= "task" ><a href= "https://jenkins.io/" class= "task-icon-link" ><img src= "/ static /235864ed/images/24x24/next.png" style= "width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class= "icon-next icon-md" ></a> <a href= "https://jenkins.io/" title= "Jenkins project" class= "task-link" >Jenkins project</a></div><div class= "task" ><a href= "https://jenkins.io/redirect/report-an-issue" class= "task-icon-link" ><img src= "/ static /235864ed/images/24x24/gear2.png" style= "width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class= "icon-gear2 icon-md" ></a> <a href= "https://jenkins.io/redirect/report-an-issue" title= "Bug tracker" class= "task-link" >Bug tracker</a></div><div class= "task" ><a href= "https://jenkins.io/redirect/mailing-lists" class= "task-icon-link" ><img src= "/ static /235864ed/images/24x24/search.png" style= "width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class= "icon-search icon-md" ></a> <a href= "https://jenkins.io/redirect/mailing-lists" title= "Mailing Lists" class= "task-link" >Mailing Lists</a></div><div class= "task" ><a href= "https://twitter.com/jenkinsci" class= "task-icon-link" ><img src= "/ static /235864ed/images/24x24/user.png" style= "width: 24px; height: 24px; width: 24px; height: 24px; margin: 2px;" class= "icon-user icon-md" ></a> <a href= "https://twitter.com/jenkinsci" title= "Twitter: @jenkinsci" class= "task-link" >Twitter: @jenkinsci</a></div></div><div id= "main-panel" ><a name= "skip2content" ></a><h1 style= "text-align: center" ><img src= "/ static /235864ed/images/rage.png" width= "154" height= "179" ><span style= "font-size:50px" > Oops!</span></h1><div id= "error-description" ><p>A problem occurred while processing the request. Please check <a href= "https: //jenkins.io/redirect/issue-tracker" >our bug tracker</a> to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. <a href= "https: //jenkins.io/redirect/users-mailing-list" >The users list</a> might be also useful in understanding what has happened.<h2>Stack trace</h2><pre style= "margin:2em; clear:both" >net.sf.json.JSONException: JSONObject[ "user" ] not found. at net.sf.json.JSONObject.getString(JSONObject.java:2040) at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPostServicePayload(BitbucketPayloadProcessor.java:178) at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPayload(BitbucketPayloadProcessor.java:42) at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:54) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:27) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:109) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:42) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215) at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88) at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:505) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) at org.eclipse.jetty.server.HttpConne  
          Hide
          tkrisztiangyula Krisztián Gyula Tóth added a comment - - edited

          I have a similar issue when using a Post Webhook "Test Connection" on push with Bitbucket Server 6.1.3 (self-hosted). I am using Bitbucket Plugin 1.1.10.  (on Jenkins 2.187).

          PR: https://github.com/jenkinsci/bitbucket-plugin/pull/65

          at net.sf.json.JSONObject.getString(JSONObject.java:2040)
          	at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPostServicePayload(BitbucketPayloadProcessor.java:143)
          	at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPayload(BitbucketPayloadProcessor.java:38)
          	at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:54)
          	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
          	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
          	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
          Show
          tkrisztiangyula Krisztián Gyula Tóth added a comment - - edited I have a similar issue when using a Post Webhook "Test Connection" on push with Bitbucket Server 6.1.3 (self-hosted). I am using Bitbucket Plugin 1.1.10.  (on Jenkins 2.187). PR:  https://github.com/jenkinsci/bitbucket-plugin/pull/65 at net.sf.json.JSONObject.getString(JSONObject.java:2040) at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPostServicePayload(BitbucketPayloadProcessor.java:143) at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPayload(BitbucketPayloadProcessor.java:38) at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:54) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
          Hide
          vasili439 Vasily Yanov added a comment -

          Sorry. Wrong window

          Show
          vasili439 Vasily Yanov added a comment - Sorry. Wrong window
          Hide
          roxymur Roxana Muresan added a comment -

          Hi Francisco A. R. Vivas,

          No problem. In the mean time I found out some more details on this. Just for clarification, this issue appears when using the Hook "Post-Receive WebHooks" on Bitbucket (not the normal Post Webhook) and the Bitbucket-Plugin for Jenkins. 

          Now I'm using a normal Post Webhook on Bitbucket but I stumbled on a different issue with the Bitbucket-Plugin for Jenkins (see https://issues.jenkins-ci.org/browse/JENKINS-54272 and https://issues.jenkins-ci.org/browse/JENKINS-49177). For this issue there are already 3 PRs open on github so a fix might be available soon.. hopefully.

          Best  regards,

          Show
          roxymur Roxana Muresan added a comment - Hi Francisco A. R. Vivas , No problem. In the mean time I found out some more details on this. Just for clarification, this issue appears when using the Hook "Post-Receive WebHooks" on Bitbucket (not the normal Post Webhook) and the Bitbucket-Plugin for Jenkins.  Now I'm using a normal Post Webhook on Bitbucket but I stumbled on a different issue with the Bitbucket-Plugin for Jenkins (see https://issues.jenkins-ci.org/browse/JENKINS-54272  and https://issues.jenkins-ci.org/browse/JENKINS-49177 ). For this issue there are already 3 PRs open on github so a fix might be available soon.. hopefully. Best  regards,
          Hide
          farv Francisco A. R. Vivas added a comment -

          It is not a correct issue.

          Show
          farv Francisco A. R. Vivas added a comment - It is not a correct issue.
          Hide
          farv Francisco A. R. Vivas added a comment -

          I have discover that I was using Webhooks instead of Post Webhooks. If you have the same problem check both because they doesn't work properly when are both configured.

          I will close this issue. Sorry Roxana Muresan, I will vote yours if you create a new one with better information than mine.

          Show
          farv Francisco A. R. Vivas added a comment - I have discover that I was using Webhooks instead of Post Webhooks. If you have the same problem check both because they doesn't work properly when are both configured. I will close this issue. Sorry Roxana Muresan , I will vote yours if you create a new one with better information than mine.
          Hide
          roxymur Roxana Muresan added a comment -

          I have the same issue when using a Post Webhook on push with Bitbucket Server 5.13.1. I am using Bitbucket Plugin 1.1.8.  (on Jenkins 2.138.2).

          Show
          roxymur Roxana Muresan added a comment - I have the same issue when using a Post Webhook on push with Bitbucket Server 5.13.1. I am using Bitbucket Plugin 1.1.8.  (on Jenkins 2.138.2).
          Hide
          farv Francisco A. R. Vivas added a comment -

          I have try to fix this and I found some important differences between Bitbucket Server and Bitbucket Cloud.

          https://confluence.atlassian.com/bitbucket/event-payloads-740262817.html

          https://confluence.atlassian.com/bitbucketserver0513/event-payload-957493824.html

          As we can see in the Event Payload section of both systems, they are different enough to not be able to fix it quickly.

          Show
          farv Francisco A. R. Vivas added a comment - I have try to fix this and I found some important differences between Bitbucket Server and Bitbucket Cloud. https://confluence.atlassian.com/bitbucket/event-payloads-740262817.html https://confluence.atlassian.com/bitbucketserver0513/event-payload-957493824.html As we can see in the Event Payload section of both systems, they are different enough to not be able to fix it quickly.

            People

            • Assignee:
              Unassigned
              Reporter:
              farv Francisco A. R. Vivas
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: