Forum Discussion

umk's avatar
umk
New Contributor
7 years ago

Bitbucket pull request: Repository not found

Hello!

 

My team has been using the Code Collaborator Bitbucket Cloud integration for a couple months. We upgraded from Code Collaborator v11.0 to v11.1 today and now have problems getting pull requests to show up in Collaborator.

 

The BitBucket webhooks page shows a successful "pullrequest:created" event but the collab.log contains this error:

404: Repository KYN/kyn-server not found

 

 

2017-08-29 17:53:13,008 ERROR http-nio-8443-exec-4 com.smartbear.ccollab.datamodel.remotesystem.PrRemoteSystemProcessor - https://api.bitbucket.org/2.0/repositories/KYN/kyn-server/pullrequests/29/commits 404: Repository KYN/kyn-server not found
com.smartbear.ccollab.datamodel.remotesystem.bitbucket.BitbucketApiException: https://api.bitbucket.org/2.0/repositories/KYN/kyn-server/pullrequests/29/commits 404: Repository KYN/kyn-server not found
        at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasApiClient.makeCall(BitbucketSaasApiClient.java:152)
        at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasApiClient.toList(BitbucketSaasApiClient.java:118)
        at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasApi.getPullRequestCommits(BitbucketSaasApi.java:134)
        at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasProcessor.getPullRequestCommits(BitbucketSaasProcessor.java:55)
        at com.smartbear.ccollab.datamodel.remotesystem.PrRemoteSystemProcessor.processPullRequestCreate(PrRemoteSystemProcessor.java:160)
        at com.smartbear.ccollab.BitbucketWebhooksEndpoint.doPost(BitbucketWebhooksEndpoint.java:71)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)

 

It seems something is wrong with the URL that is being constructed by collaborator. I tried testing from command line to see if I could reproduce and I can:

 

curl --user username:app_password https://api.bitbucket.org/2.0/repositories/KYN/kyn-server/pullrequests/36/commits
{"type": "error", "error": {"message": "Repository KYN/kyn-server not found"}}

 

 

If I change "KYN" in the URL (which appears to be a BitBucket project name) to my Bitbucket Team ID ("TEAM"), then the call succeeds:

curl --user username:password https://api.bitbucket.org/2.0/repositories/TEAM/kyn-server/pullrequests/36/commits
{"pagelen": 10, "size": 15, "values": [{"hash": "25a0646107c5d95ff09b3eaa0cbf9a81a966a28f", "repository": {"links": 
...

What is the solution? I have already tried deleting and recreating the remote system configuration in collaborator without success.

 

Thanks.

 

6 Replies

  • Hello, I am having exactly the same issue with my BitBucket integration following my upgrade from 11.0 to 11.1. 

     

    As umk describes, the Bitbucket API path seems to erroneously contain the Project Path rather than the Team Path. 

     

    We are using Collaborator Community Edition.

    • umk's avatar
      umk
      New Contributor

      I've submitted a support request with smartbear: Case #00253994

  • OlegB's avatar
    OlegB
    SmartBear Alumni (Retired)

    Hello Everyone,

     

    Unfortunately, you have faced a known issue. Our R&D team is aware of it and is working to fix it now.

     

    As a possible workaround, the Bitbucket repository can be transferred to an individual Bitbucket user that is used in the Collaborator configuration for the Bitbucket integration ("Username for authentication"). This should solve the reported issue.

     

    I will send the further updates, once I have them. 

    • gurukini's avatar
      gurukini
      Occasional Visitor

      Any updates on this? We purchased the licenses and moved to 11.1 specifically for this feature. Really waiting for this to be fixed. 

      • Hi,

         

        The bug fix should be included in Collaborator 11.2 release. The ETA of the release is one or two weeks.