Atlas-connect failed to auto register add on

Cesar Buffevant September 27, 2019

I was trying to create an add-on based on https://bitbucket.org/atlassian/atlas-connect for nodejs. I follows these steps https://developer.atlassian.com/cloud/jira/platform/build-a-jira-app-using-a-framework/ and also enabled Development mode in the instance I'm using according to https://developer.atlassian.com/cloud/jira/platform/getting-started/.

 

When I ran npm start, the process failed to auto register de add-on with the message:

Failed to register with host https://mydomain.atlassian.net/ (401)
Add-on not registered; no compatible hosts detected.

After adding some logging I found out a request to GET /rest/plugins/1.0/, which is using basic authentication:

authorization: Basic Q2VzYXIgQnVmZm.......wTHpJT2dTYjNlSDhHYWNw

Due the fact atlas-connect is not updated recently (last commit is from 2017), is there a chance this deprecation https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/?_ga=2.66050542.1797406443.1569370776-1378963707.1565706858 has broken auto register process?

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2019

Hi @Cesar Buffevant ,

Welcome to the Atlassian Community!

As written in the Deprecation notice - Basic authentication with passwords and cookie-based authentication page you are pointing to, basic authentication with username and password has been replaced by basic authentication with email address and API Token:

Atlassian has introduced support for API tokens for all Atlassian Cloud sites as a replacement for basic authentication requests that previously used a password or primary credential for an Atlassian account, as well as cookie-based authentication. 

 

This is also mentioned in the example for step #1 of the Deploy your Jira app section of the "Build a Jira app using a framework" documentation page you are following:

Deploy your Jira app

You have a Jira Cloud instance and you have an app. It’s time to put the two together. 

  1. In your jira-getting-started directory, copy the credentials.json.sample file to a new credentials.json file. Edit the credentials.json file and update the URL, username, and password to match your Jira Cloud instance, then save it. It should look something like this:

    { "hosts": { "": { "product": "jira", "username": "youremail@domain.com", "password": "API token from id.atlassian.com" } } }

 

Can you kindly confirm you are using email address and API Token for your Atlassian Account as username and password in your credentials.json file?

 

Also, for the future, please notice that this is not be the best place to get help on development  related questions. The right resources are listed in https://developer.atlassian.com/resources. Specifically:

 

 

Cheers,
Dario

Cesar Buffevant October 3, 2019

Thanks Dario! I confirm you I'm using my email and the API token.

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2019

You are very welcome @Cesar Buffevant 

 If you are already using email an token and this is still not working then I would suggest to create a developers support request

Suggest an answer

Log in or Sign up to answer