# Failed to Register when attempting Confluence Cloud Hello World

**URL:** <https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816>\
**Category:** Confluence Cloud\
**Created:** [October 21, 2019, 6:38pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816 "2019-10-21T18:38:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 21, 2019, 6:38pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/1 "2019-10-21T18:38:09Z")

</div>

Hello World,

I am having trouble when I follow the instructions for Getting Started, with Confluence Cloud Development. It used to be very easy to build a simple Macro in Confluence. The community post rules prevent me from putting URI’s in my posting, so the domain and some of the error messages are gone. But I can post them individually if you need them. Here are my details.  
I hope someone can help me out.

I followed all the instructions and I think node.js is ok. git clone is good. npm install is good, no errors.

My credentials.json contains:

```auto
{
   "hosts" : {
      "<domain>": {
         "product" : "confluence",
         "username" : "<Confluence UID>",
         "password" : "<My Token>"
      }
   }
}

```

I get the following error with npm start:

```auto
Failed to register with host <domain>/wiki
Error: Invalid URI "..."
Error: Invalid URI "..."

```

I have tested navigating to /wiki and that lands me in my domain.

HELP!!

---

<div class="post-metadata">

**Author:** ![aagrawal2](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/aagrawal2/32/40775_2.png) [@aagrawal2](https://community.developer.atlassian.com/u/aagrawal2)\
**Post date:** [October 22, 2019, 2:56am UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/2 "2019-10-22T02:56:02Z")

</div>

Hi,

credentials.json looks like

```auto
{
    "hosts" : {
        "<site-url>": {
            "product" : "confluence",
            "username" : "<email@address.com>",
            "password" : "<api-token>"
        }
    }
}

```

Have you made sure `<site-url>` is in format `your-site.atlassian.net`?

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 22, 2019, 2:37pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/3 "2019-10-22T14:37:36Z")

</div>

My file contents, API token removed:

```auto
{
   "hosts" : {
      "sebdevsite.atlassian.net": {
         "product" : "confluence",
         "username" : "steven.bierenbaum@duckcreek.com",
         "password" : "<token>"
      }
   }
}

```

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 22, 2019, 3:02pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/4 "2019-10-22T15:02:14Z")

</div>

Update:

Found this recent post.

> [@Tutorial help / confluence](https://community.developer.atlassian.com/t/tutorial-help-confluence/32843):
>
> Hi, I’m trying to follow the steps in the tutorial at [https://developer.atlassian.com/cloud/confluence/lesson-1-the-source-awakens/](https://developer.atlassian.com/cloud/confluence/lesson-1-the-source-awakens/) to refresh my addon knowledge. No problem going to [https://developer.atlassian.com/cloud/confluence/lesson-1-the-source-awakens/#starting-and-installing-the-app](https://developer.atlassian.com/cloud/confluence/lesson-1-the-source-awakens/#starting-and-installing-the-app) . Then after specifying the credentials.json (which works in another addon) and running npm start, I get the following error: Failed to register with host https:///XXXXX.atlassian.net/wiki Error: Invalid …

I have the same issue in my error message. There are three “/” in my domain URL. I must assume we have the same issue.

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 22, 2019, 3:25pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/5 "2019-10-22T15:25:16Z")

</div>

More:  
I decided to skip the Getting Started and move to Lesson 1 as maybe there is an issue with it. I installed atlas-connect, ngrok and sqlite. They went fine. I had run the npm install for the awesome-app directory. I got the same errors when running npm start. Here are the errors below:  
Failed to register with host https:///sebdevsite.atlassian.net/wiki  
Error: Invalid URI “https:///sebdevsite.atlassian.net/wiki/rest/plugins/1.0/”  
Error: Invalid URI “https:///sebdevsite.atlassian.net/wiki/rest/plugins/1.0/”  
at Request.init (C:\Users\steven.bierenbaum\awesome-app\node\_modules\request\request.js:273:31)

Help!

---

<div class="post-metadata">

**Author:** ![aagrawal2](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/aagrawal2/32/40775_2.png) [@aagrawal2](https://community.developer.atlassian.com/u/aagrawal2)\
**Post date:** [October 22, 2019, 11:19pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/6 "2019-10-22T23:19:03Z")

</div>

I was able to replicate this issue. Let me discuss this with our team and will be back to you soon.

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [October 23, 2019, 7:21am UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/7 "2019-10-23T07:21:06Z")

</div>

@SteveB @aagrawal2 - this looks like it might be a Windows-related issue. This worked for me out of the box on Mac. Lets see if someone here has a Windows setup that we can try/debug this on.

---

<div class="post-metadata">

**Author:** ![marc](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/marc/32/39047_2.png) [@marc](https://community.developer.atlassian.com/u/marc)\
**Post date:** [October 23, 2019, 9:51am UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/8 "2019-10-23T09:51:27Z")

</div>

Hi @nmansilla and @aagrawal2 : I’m on Linux and experiencing this issue.

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 23, 2019, 12:59pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/9 "2019-10-23T12:59:24Z")

</div>

Thank you. Great to know you are on the case. Holding tight to hear from you.

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 23, 2019, 1:29pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/10 "2019-10-23T13:29:50Z")

</div>

I am guessing this is a tool version mixed with Windows 10. The versions of the tools looks very different than the tutorial example. Here is my version set:

 ![Add-On%20Failed2](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/1/a/1a816558c7cdbd5313cf981151f8725d73fc09d9.jpeg)

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 25, 2019, 2:27pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/11 "2019-10-25T14:27:22Z")

</div>

All,

I hate to say this but I have been four days trying to get a solution to what should be a very simple issue. I am going to have to find a different product other than confluence. This is the most basic part of creating dynamic content.

Someone please give me an update?

---

<div class="post-metadata">

**Author:** ![TorfinnOlsen](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@TorfinnOlsen](https://community.developer.atlassian.com/u/TorfinnOlsen)\
**Post date:** [October 25, 2019, 5:42pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/12 "2019-10-25T17:42:46Z")

</div>

I’m having the exact same problem in Windows 10, node v12.13.0 npm 6.12.0

Curl seems to be returning a response that indicates no problems, but npm start results in the same chicanery others have described here.

---

<div class="post-metadata">

**Author:** ![TorfinnOlsen](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@TorfinnOlsen](https://community.developer.atlassian.com/u/TorfinnOlsen)\
**Post date:** [October 25, 2019, 5:51pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/13 "2019-10-25T17:51:44Z")

</div>

Worthy of noting my curl results all look great, except this happens:

User-Agent: curl/7.65.3

> Accept: _/_

{ [5 bytes data]

- Connection state changed (MAX\_CONCURRENT\_STREAMS == 200)!  
} [5 bytes data]  
\< HTTP/2 302

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [October 25, 2019, 7:37pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/14 "2019-10-25T19:37:05Z")

</div>

A manual patch fix / path for you would be this:

1. Run ngrok manually (i.e. ngrok http 3000), and copy that **Forwarding** URL (i.e. [https://x1111.ngrok.io](https://x1111.ngrok.io))
2. Edit your atlassian-connect.json file, and replace **{{localBaseUrl}}** with the **Forwarding** URL above.
3. Run your app with **node app.js**

This will run the app on localhost:3000, and then ngrok will be porting that to the public internet. You can go to [https://x1111.ngrok.io/atlassian-connect.json](https://x1111.ngrok.io/atlassian-connect.json) and you should see your descriptor. Can you try that?

If you’re successful at that, then the next step would go to Confluence, and go to **Settings \> Manage Apps \> Upload app** – and this is where you’ll paste that descriptor URL.

BTW, the manual patch directions above are to workaround that weird URL issue you’re encountering.

---

<div class="post-metadata">

**Author:** ![TorfinnOlsen](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@TorfinnOlsen](https://community.developer.atlassian.com/u/TorfinnOlsen)\
**Post date:** [October 25, 2019, 10:07pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/15 "2019-10-25T22:07:11Z")

</div>

> [@SteveB](#):
>
> ere are three “/” in my domain URL. I must assume we have the same issue.

I gave this a whirl but still wasn’t able to get it working unfortunately . Bad gateway 502 error when I try to run NGROK like that.

I’ll try from my windows box at home, and try again with my Linux box and see how it works out.

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [October 26, 2019, 12:27am UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/16 "2019-10-26T00:27:26Z")

</div>

Alright… damn it. Found the issue. The `urijs` [library](https://www.npmjs.com/package/urijs) was updated on npm the other day, and there’s something funky in there that’s adding the extra slash. Haven’t had time to debug that yet.

So, forget that last post I made, and just add this to your `package.json` file as the last line in `dependencies` object:

`"urijs": "1.19.1"`

Then run:  
`npm install`

And finally:  
`npm start`

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [October 26, 2019, 1:41am UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/17 "2019-10-26T01:41:32Z")

</div>

Filed an issue on the URI.js (urijs) project:

> <https://github.com/medialize/URI.js/issues/390>
>
> https://github.com/medialize/URI.js/commit/4ced30a1c5ad278eae70bb06dee8d7886e680…52b
> 
> The commit above (handle relative paths) on version 1.19.2 causes an extra slash to be added.
> 
> \`\`\` js
> var URI = require('urijs');
> var url = new URI("atlassian.com");
> url.protocol("https");
> console.log(url.toString())
> \`\`\`
> 
> Output is: 
> 
> https:///atlassian.com

For now, I’m going to ask someone from the team to put a static version number for this dependency until it’s fixed. Sorry you had all of those problems @TorfinnOlsen and @SteveB. ☹

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 28, 2019, 5:12pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/18 "2019-10-28T17:12:22Z")

</div>

I’m sorry, but I am still having the issue.

Here’s my package.json:

```auto
{
  "name": "helloworld-app",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "dependencies": {
    "atlassian-connect-express": "^3.0.2",
    "body-parser": "^1.14.2",
    "compression": "^1.6.0",
    "cookie-parser": "^1.4.0",
    "errorhandler": "^1.4.2",
    "express": "^4.13.3",
    "express-hbs": "*",
    "morgan": "^1.6.1",
    "sequelize": "^4.38.0",
    "static-expiry": ">=0.0.5",
    "jugglingdb-sqlite3": "0.0.5",
    "async": "2.0.1",
    "urijs": "1.19.1"
  }
}

```

npm install:  
"  
npm install  
audited 1684 packages in 2.521s  
found 2 high severity vulnerabilities  
run `npm audit fix` to fix them, or `npm audit` for details  
"  
then nmp start ends with this:  
"  
Local tunnel established at [https://72d46d43.ngrok.io/](https://72d46d43.ngrok.io/)  
Check [http://127.0.0.1:4040](http://127.0.0.1:4040) for tunnel status  
Registering add-on…  
Failed to register with host https:///sebdevsite.atlassian.net/wiki  
Error: Invalid URI “https:///sebdevsite.atlassian.net/wiki/rest/plugins/1.0/”  
Error: Invalid URI “https:///sebdevsite.atlassian.net/wiki/rest/plugins/1.0/”  
"

---

<div class="post-metadata">

**Author:** ![rwhitbeck](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/rwhitbeck/32/35781_2.png) [@rwhitbeck](https://community.developer.atlassian.com/u/rwhitbeck)\
**Post date:** [October 28, 2019, 5:59pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/19 "2019-10-28T17:59:39Z")

</div>

Can you try deleting the node\_modules folder and then rerunning `npm install`? This will ensure it’s pulling the version requested.

---

<div class="post-metadata">

**Author:** ![SteveB](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/steveb/32/38654_2.png) [@SteveB](https://community.developer.atlassian.com/u/SteveB)\
**Post date:** [October 28, 2019, 6:22pm UTC](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816/20 "2019-10-28T18:22:49Z")

</div>

Still there. Same error:  
Local tunnel established at [https://ec09fbfe.ngrok.io/](https://ec09fbfe.ngrok.io/)  
Check [http://127.0.0.1:4040](http://127.0.0.1:4040) for tunnel status  
Registering add-on…  
Failed to register with host https:///sebdevsite.atlassian.net/wiki  
Error: Invalid URI “https:///sebdevsite.atlassian.net/wiki/rest/plugins/1.0/”  
Error: Invalid URI “https:///sebdevsite.atlassian.net/wiki/rest/plugins/1.0/”  
.  
.  
.  
at flush (C:\users\steven.bierenbaum\confluence-helloworld-addon\node\_modules\rsvp\dist\rsvp.js:2441:7)  
at process.\_tickCallback (internal/process/next\_tick.js:61:11)  
Add-on not registered; no compatible hosts detected

[Next page](https://community.developer.atlassian.com/t/failed-to-register-when-attempting-confluence-cloud-hello-world/32816.md?page=2)
