Demo for Bitbucket Connect fails

I’m following the demo for Connect for Bitbucket here: Getting started. On Step 7, when I try to register the app here Log in with Atlassian account, it tells me 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’ve also tried changing the baseUrl attribute in atlassian-connect.json to my new ngrok URL, but this didn’t work.

Any tips?

Also, here’s a view of the ngrok admin console at localhost:4040:

Also, here’s the Summary of the response:

Welcome to the Atlassian developer community @AdamLeppek,

This problem is caused by a change in behavior in how Bitbucket Connect works:

It looks like the docs have not been updated to reflect. Please be sure to rank pages in the top right of the appropriate page and report problems.

Thanks a lot @ibuchanan! I take it that the solution recommended on that post you mentioned is this, by @JeroenDeRaedt:

Just changing the URL you use to point at the actual URL should mitigate this issue.

I don’t actually quite understand what this involves…

So sorry. Of course you wouldn’t know; you’re just getting started.

I think the problem is in step 6 where you set the AC_LOCAL_BASE_URL. Instead of ending with no path, you must now append atlassian-connect.json.

$ AC_LOCAL_BASE_URL= npm run start

Ok, I think we’re getting closer, but after I do this I still get the same error when I try to register the app. I get a 302 when the ngrok URL is used by itself, and I get a 404 when /atlassian-connect.json is appended.

Ah! I got it. I built the app using the root path, and registered the app by going directly to the /atlassian-connect.json resource. It seems to be working now, thanks a lot for the help.

1 Like

I am getting the same error but not able to figure out,

i build the app using this
AC_LOCAL_BASE_URL= node app.js

and i am registering the app using
but getting 404

@ibuchanan @AdamLeppek