Bitbucket Cloud App cannot be installed anymore since app descriptor validator does not follow redirect?

Hi,

Since a few days, one of our Bitbucket Cloud apps cannot be installed anymore, because the Bitbucket Cloud app descriptor validator

https://bitbucket.org/!api/internal/account/%XXX%7D/addons/validate?url=DESCRIPTOR_URL

returns

The add-on server returned invalid data. Please contact the add-on vendor for help. Here’s the error we encountered - The content-type header was text/plain; charset=utf-8, but we expected application/json.

I guess this happens because the connect express template returns a redirect to /atlassian-connect.json in case a request to / comes in, and that redirect has no content type set, and is not followed anymore by the descriptor validator?

Any help is much appreciated.

Thanks,
Michael

2 Likes

Hi Michael,
you are correct that Bitbucket stops following redirects for Connect apps because of security considerations.
Just changing the URL you use to point at the actual URL should mitigate this issue.
If you have a marketplace app that needs updating, please share the app (or raise a marketplace ticket) and we can help you out.

1 Like

@JeroenDeRaedt Thanks for your feedback.

Was this change communicated somewhere? I think this could potentially break all Bitbucket Cloud apps which don’t have a fully qualified app connector in the Marketplace listing. The Connect express template provides this redirect to make this use case work.

What is your suggested fix? Shall we change the baseUrl in atlassian-connect.json to fully qualified, or shall we create a new Marketplace app version with the full URL to the app descriptor? I guess the latter will be overridden by the next automatically created app version by the Marketplace bot, because the Marketplace reads the descriptor URL from the baseUrl field of the descriptor?

I now did the latter, but installation still does not work. Is this a caching issue and will work eventually?

2 Likes

@JeroenDeRaedt any updates regarding @michael.rueegg questions?
Unfortunately, this change has a major effect on our development process and we cannot use the actual URL when testing a local environment.

Thanks in advance

1 Like

@BarGenish I believe we resolved @michael.rueegg’s issue? If you are experiencing similar issues with a seperate app, raise a marketplace ticket and we will help you out.

1 Like

Thanks for replying @JeroenDeRaedt !
opened Cannot install Cloud App since app descriptor does not follow redirect

In case there are other app vendors who have this problem, see the following response:

Since the correct follow up for these problems is to open a ticket, I’m locking this thread.

1 Like