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

Missing scope for bitbucket hooks registration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Jenkins 2.138.3
      org.jenkins-ci.plugins:cloudbees-bitbucket-branch-source:2.2.15

      Recently, this plugin has stopped working and it returns the error:

      Dec 04, 2018 9:33:02 AM com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1 doRun
      WARNING: Could not register hooks for Softonic Development/catalog-etl
      java.io.IOException: I/O error when parsing response from URL: https://api.bitbucket.org/2.0/repositories/softonic-development/catalog-etl/hooks?page=1&pagelen=50
       at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getWebHooks(BitbucketCloudApiClient.java:586)
       at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHooks(WebhookAutoRegisterListener.java:136)
       at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.access$000(WebhookAutoRegisterListener.java:57)
       at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1.doRun(WebhookAutoRegisterListener.java:103)
       at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
      Caused by: com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 403: Forbidden.
      {"type": "error", "error": \{"message": "Your credentials lack one or more required privilege scopes.", "detail": {"granted": ["pullrequest", "repository:write"], "required": ["webhook"]}}}
       at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:798)
       at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:810)
       at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getWebHooks(BitbucketCloudApiClient.java:572)
       ... 9 more
      
      

       

      It seems like something on Bitbucket's side changed and broke the plugin (at least the part that sets up the webhooks). Is there any way we could fix this?

            Unassigned Unassigned
            ricc Riccardo Piccoli
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: