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

Bitbucket plugin unable to parse a Pull Request JSON Object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • bitbucket-plugin
    • None
    • Jenkins ver. 2.204.2
      Bitbucket Plugin 1.1.16

      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
      

       

            tzach_solomon Tzach Solomon
            vnenashev Владислав Ненашев
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: