Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12311

Requests using access tokens with user agent Xcode fail when "Clone in Xcode" is disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 6.10.4, 7.1.2
    • 5.16.2, 6.10.2, 7.1.1
    • API - REST
    • None

    Description

      Issue Summary

      When the "Clone in Xcode" integration is not enabled, Bitbucket will try to enable it when it receives REST API requests with an "Xcode" user agent. This succeeds when using basic authentication, but fails when using an access token.

      Steps to Reproduce

      1. Be sure "Clone in Xcode" is disabled at <base-url>/account.
      2. Make a request to the REST API using an access token (not basic auth), with an Xcode user agent: curl -X GET -H "User-Agent: Xcode/".

      Expected Results

      Bitbucket should allow Xcode as a user agent and the request should succeed.

      Actual Results

      The user receives a 500 error, and the below exception is thrown in the atlassian-bitbucket.log file:

      2020-04-15 12:01:45,404 ERROR [https-jsse-nio-8444-exec-20] *CTFXYJx721x9826216x11 s0w3ye 1.1.1.1 "GET /mvc/error500 HTTP/1.1" c.a.s.i.web.ErrorPageController There was an unhandled exception loading [/rest/api/1.0/application-properties]
      

      Workaround

      Navigate to <base-url>/account and enable "Clone in Xcode". This will prevent Bitbucket from attempting to enable it during the API request and triggering this error.

      Attachments

        Activity

          People

            bturner Bryan Turner (Inactive)
            smaruvada Shashank Maruvada
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: