Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Failed to register with host Confluence

Brenda Blanco April 25, 2017

Hi!

I am working on installing the example add-on : 

https://bitbucket.org/atlassianlabs/atlassian-connect-confluence-example

I followed these instructions:

  • Copy credentials.json.sample to credentials.json and fill in the blanks to enable auto registration of the add-on into your JIRA instance.
  • npm install to install dependencies
  • npm start to run the add-on

I could see the addon (macro) in my Confluence Cloud instance, but I am getting this error message:

D:\devroot\Atlassian-example>npm start

> confluence-connect-example@0.1.0 start D:\devroot\Atlassian-example
> node app.js

Watching atlassian-connect.json for changes
Add-on server running at http://TYCVDINRS7801:3000
Initialized sqlite3 storage adapter
Local tunnel established at https://84bbd884.ngrok.io/
Check http://127.0.0.1:4040 for tunnel status
Registering add-on...
GET /atlassian-connect.json 200 17.365 ms - -
Failed to register with host Confluence:5551410787
Add-on installation timed out
Add-on not registered; no compatible hosts detected
Re-registering due to atlassian-connect.json change
GET /atlassian-connect.json 200 5.954 ms - -
Failed to register with host Confluence:5551410787
Add-on installation timed out
Add-on not registered; no compatible hosts detected

 

Any idea what am I doing wrong? I created the credentials.json file with my info:

{
     "hosts" : {
           "company.atlassian.net": {
                "product": "confluence",
                "username" : "myUser",
                "password" : "*********"
              }
       }
}

Why ACE is not register the addon successfully?

Thank you in advance

9 answers

2 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2021

A few more things that could help with the troubleshooting and resolution here. I'll keep adding more as I discover them

 

Enable development mode

One more thing to check is that the Enable development mode checkbox needs to be enabled.

This is explained here (https://developer.atlassian.com/cloud/confluence/getting-set-up-with-ace/#enable-development-mode-in-your-site) but I didn't enable it right away on the Confluence side, just the Jira one when I followed the tutorial the first time.

 

 

Uninstall the app and restart it with npm start

With the app not running. Go into your Manage Apps Admin and see if it’s listed. If it is uninstall it and then try running your app again.

More details on this here: https://community.developer.atlassian.com/t/the-app-host-returned-http-response-code-404-when-we-tried-to-contact-it-during-installation/48367/6

 

 

The POST to /installed returns 404

See the suggestions shared here: https://community.developer.atlassian.com/t/development-v-s-production-atlassian-cloud-add-on/48886/10

 

Product site license is not valid

Check the license of the product for the site. If the license is not valid (e.g. the subscription expired), the app will be installed and automatically removed. 
Sometimes it will also fail to install.

1 vote
Jason Immerman January 25, 2021

Another potential problem is that the port that should be used by the express server is already being used by something else, so the express server isn't actually listening on that port. Just try hitting the local port (for me, localhost:5000), to see if you get to your server as expected.

Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2021

Just a note to add that, when using the default ACE settings, the port is the `3000` one so the URL to check is http://localhost:3000/.

1 vote
Thomas Hery January 18, 2021

Had exactly the same issue and this solved it:

In atlasssian-connect.json replace this :

  "lifecycle": {
        "installed": "/installed"
    },

for this:

 "lifecycle": {
        "installed": "installed"
    },

Source:

https://stackoverflow.com/a/60507647/15033600

1 vote
Sophia Chen April 15, 2019

Hi,

 

I am trying to install and use ACE but I keep getting the following:

Registering add-on...
Failed to register with host https://<username>:<token>@<my-company>.atlassian.net/wiki (401)
Add-on not registered; no compatible hosts detected

 

I have even tried using my password directly and I still get the same error. It fails to register then fails to authenticate because a proper JWT token is never created.

 

Anyone have any ideas? I've run out of Google links and forum links to try.

Sophia Chen April 15, 2019

Things to note, my CURL requests work perfectly fine with my user and token

Jerry Laster _Divim_ Inc__
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 20, 2019

Hi 

Did you solve your problem? My test instance, which was working fine, stopped working today.

Jerry

Mo December 6, 2020

I'm having the same issue

Chris Beswick March 28, 2021

If anyone still has this problem I solved this by having in your credentials.json file include the full url of your domain like so - this wasn't immediately clear to me.

{
"hosts" : {
"https://<your-domain>.atlassian.net": {
"product" : "confluence",
"username" : "<user>",
"password" : "<APItoken>"
}
}
}



Like # people like this
Michael Dugah July 20, 2021

I have faced this same issue.

Make sure you have enabled development mode in Confluence

Like Tiago Cardoso likes this
1 vote
Lava Kumar Dukanam _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2018

Hello there,

I was able to solve this by adding this configuration to credentials.json


{
"hosts" : {
"<domain-name>.atlassian.net/wiki": {
"username" : "admin",
"password" : "**atlassian-password**" }
}
}

Let me know if this is still a problem.

Hope this helps someone!

Thanks,

Lava

0 votes
Kin July 31, 2020

It suddenly happened to me at some point. It kinda fails at random point...


What I did in order to solve these issues is to manually uninstall previously installed connect-app on my confluence cloud dev at ie.:
https://<your_installation>.atlassian.net/wiki/plugins/servlet/upm?source=side_nav_manage_addons

Then after that I ran "npm start", error is gone and connect-app is installed.

Another option is to wait out the yellow error messages and eventually it is installed according to the logger in console.

0 votes
Jorge Colon October 10, 2019

Make sure to create an API Token for your Atlassian user and use that value as the password in your credentials.json file. Also make sure to delete the sqlite file so that it creates a fresh one and doesn't try to authenticate with an old JWT.

0 votes
Nicolás Wernli August 15, 2017

Any updates within this gusy? I'm having same problem here.

0 votes
Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 25, 2017

Atlassian Cloud services are having many outages today, particularly related to logins, so this might be the cause.

Check:

https://atlassian.statuspage.io

and the current incident:

https://atlassian.statuspage.io/incidents/kz9n65qlcljd

I'd recommend subscribing to updates about the incident, and waiting until the issues are resolved before then trying again.

Brenda Blanco April 25, 2017

Thank you Sam! I will try later!

Brenda Blanco April 26, 2017

Hi Sam

I think the login issues were not related to this problem, I have it already.

Rushwell Dzvetero June 28, 2017

Hi Brenda, im having the same issue, how were you able to resolve it?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events