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.
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.
Any update here? I am having similar issues with a redirect if i follow the documentation. If i update the app location to include /atlassian-connect.json i can register the app, but once i try and see it in action, the [guid]-app.js file shows a 404 so the module doesnt make a sucessful request using the AP library since it cant find that ifle.
Run this command - AC_LOCAL_BASE_URL=https://{your_ngrok_url} npm run start
then open this URL in the web browser which will be similar to “https://{your_ngrok_url}/atlassian-connect.json”
if it’s working fine and returns some json on the browser then copy the URL from the browser and add use it to register the app
While registering the app you may encounter “key already used error” then go to the atlassian-connect.json file and give the “key” a new unique value