confluence-helloworld-addon - Failed to Establish Local Tunnel

Tim Brown July 18, 2019

I am trying to run the Confluence-helloworld-addon as per the guide :https://developer.atlassian.com/cloud/confluence/getting-started/

However when I run the the app I get the following output/error:

$ npm start

> helloworld-addon@0.0.1 start C:\devwork\MCC_Demo_App
> node app.js

Watching atlassian-connect.json for changes
Initialized memory storage adapter
Add-on server running at http://Skywalker:3000
Failed to establish local tunnel
err = Error: ngrok is not yet ready to start tunnels
Error: ngrok is not yet ready to start tunnels
Error: ngrok is not yet ready to start tunnels
at Request._callback (C:\devwork\MCC_Demo_App\node_modules\atlassian-connect-express\node_modules\ngrok\index.js:192:30)
at Request.self.callback (C:\devwork\MCC_Demo_App\node_modules\request\request.js:185:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (C:\devwork\MCC_Demo_App\node_modules\request\request.js:1161:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (C:\devwork\MCC_Demo_App\node_modules\request\request.js:1083:12)
at IncomingMessage.g (events.js:260:16)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:921:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
Unhandled error: Error: ngrok is not yet ready to start tunnels
at Request._callback (C:\devwork\MCC_Demo_App\node_modules\atlassian-connect-express\node_modules\ngrok\index.js:192:30)
at Request.self.callback (C:\devwork\MCC_Demo_App\node_modules\request\request.js:185:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (C:\devwork\MCC_Demo_App\node_modules\request\request.js:1161:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (C:\devwork\MCC_Demo_App\node_modules\request\request.js:1083:12)
at IncomingMessage.g (events.js:260:16)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:921:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)

 

I have checked the adddon server and it is running.

I am using Node.js 4.50 as per the doco.

Any help would be appreciated.

4 answers

1 accepted

1 vote
Answer accepted
Anne Calantog
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2019

Hello everyone, a fix https://ecosystem.atlassian.net/browse/ACEJS-139 has been published. Cheers

Tim Brown July 24, 2019

Hi Anne - I am unable to access that link - I just get taken to a portal page.

I cannot access any of the links provided by Dario either.

Like Dario B likes this
Pim Janissen July 24, 2019

Hi @Anne Calantog

 

Thank you. I was able to access that link. Great to see it was fixed. I will test it later today.

 @Dario B I still get the no permission error.

Like Dario B likes this
Tim Brown July 24, 2019

Hi Anne, just checked and its still broken. 

Adriaan Knapen July 25, 2019

Make sure to bump the versions of your dependency, as the fix got pushed in ACE 3.5.0, e.g. like this:

"atlassian-connect-express": "^3.5.0",

 It also uses ngrok 3 as a development dependency.

"ngrok": "^3.2.3",
Like # people like this
Pim Janissen July 25, 2019

Works for me now. Thank you.

Like Dario B likes this
Tim Brown July 25, 2019

@Pim Janissen I couldn't get it to work - what  did you do?
I am a Node newbie so please be gentle :)

Like Dario B likes this
Pim Janissen July 25, 2019

Using nodejs version 10.16.0

package.json ->

{
"name": "helloworld-addon",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"atlassian-connect-express": "^3.5.0",
"body-parser": "^1.14.2",
"compression": "^1.6.0",
"cookie-parser": "^1.4.0",
"errorhandler": "^1.4.2",
"express": "^4.13.3",
"express-hbs": "*",
"jugglingdb-sqlite3": "0.0.5",
"morgan": "^1.6.1",
"static-expiry": ">=0.0.5",
"urijs": "1.18.1",
"async": "2.0.1"
},
"dev-dependencies": {
"ngrok": "^3.2.3"
}
}

 

1. Open CMD and go to the root folder of the project (with the package.json in it)
2. npm install
3. npm start

This did the trick.

Like Dario B likes this
Anne Calantog
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 25, 2019

Awesome! Thanks for confirming on your end. Cheers!

Like Dario B likes this
Tim Brown July 25, 2019

@Pim Janissen did you get the hello world macro to appear? I get the tunnel and what looks like a successful install of the macro but it does not show up in the macros.

Pim Janissen July 25, 2019

When i create a new confluence document in my dev environment and type '/hello' the macro pops up as a suggestion.

See below:

Capture.PNG

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

@Pim Janissen I am happy to know that this is now working for you! :) 

However, since I added you again to the ticket and I can see  you in the list of the participants, can you kindly confirm you can now open:

For the rest:

@Tim_Brown  is this now working for you? In case it is, can you please accept the answer in order to mark this thread as 'solved'? (provide more details on what is failing otherwise)

 

Cheers,
Dario

Pim Janissen July 25, 2019

@Dario B That did the trick, I can now see the ticket you opened.

Like Dario B likes this
2 votes
Addono July 24, 2019

Ran into the same issue, basically ngrok 2 is broken right now, as the server sided API was extended in a non-backwards compatible manner.

 

Find a little bit more elaborate answer here:

https://community.developer.atlassian.com/t/error-ngrok-is-not-yet-ready-to-start-tunnels/30570/2?u=addono

0 votes
Pim Janissen July 24, 2019

<deleted>

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

Hi @Tim_Brown,

If my understanding is correct, you are trying to follow the steps in https://developer.atlassian.com/cloud/confluence/getting-started/ and you are getting stuck since you cannot start the server.

If this is correct, then looking at the provided logs I can see that the problem here is that ngrok is not managing to create a tunnel to make the add-on server running on your local machine available over the  Internet:

Failed to establish local tunnel
err = Error: ngrok is not yet ready to start tunnels

 

Now, I might not be the best person to answer this question, but I can see that the syntax of the example showing how to create the credentials.json file is wrong, it is not a valid JSON and this could be causing the issue you are facing.

Indeed, the example in that page shows:

 ``` json
 {
  "hosts" : {
   "": {
    "product" : "confluence",
    "username" : "<user@example.com>",
    "password" : ""
   }
  }
 }
 ```

 

While, in order to be a valid JSON file it should be:

 {
  "hosts" : {
   "": {
    "product" : "confluence",
    "username" : "<user@example.com>",
    "password" : ""
   }
  }
 }

 

Can you kindly check if your credentials.json file looks like the latter one and not like the one above (that is indeed wrong)?

 

Also, in case this is not helping, please notice that this is not the best place to get support on development related questions. As you can find in https://developer.atlassian.com/resources/, in order to get support on developers related questions you can either:

 

Please let us know if this helps.

 

Cheers,
Dario

Tim Brown July 23, 2019

Thanks Dario,

I had already figured that the JSON was invalid and updated as per your suggestion.

I have been debugging the problem at have tracked it down to ngrok thinking there are multiple sessions open, which when looking at the status page at localhost:4040 it shows just two. I am guessing that there has been an update to ngrok that has broken this demo.

It would be good if Atlassion had a tool that maybe did some automated build and tests of their examples ;P

Thanks,

Tim.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2019

Thanks for your feedback @Tim_Brown ,

I have reproduced the issue and I have created the below development bug report in order to have the example (and the related documentation page) fixed:

Please watch above bug ticket in order to be updated on its status.

Have a nice day.

Dario

Pim Janissen July 24, 2019

Hi Dario,

I've encountered the same issue. However, your link to the issue seems to be broken. I can't open the issue you shared. Also I can't find a project with key DEVHELP.

Kind regards,

Pim

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2019

@Pim Janissen  are you logged in or trying to access as anonymous user? 

I might have also shared the wrong link. Can you try to access below link instead and let me know if that works?

https://ecosystem.atlassian.net/servicedesk/customer/portal/14/DEVHELP-3179

Pim Janissen July 24, 2019

@Dario B  I am logged in. And I can see a lot of projects, but not that one.

Is there somewhere I need to sign up before I can join?

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2019

@Pim Janissen  you were faster than me :) 

As I have added to my comment above, can you try to access https://ecosystem.atlassian.net/servicedesk/customer/portal/14/DEVHELP-3179  and let me know if that works?

Thanks,
Dario

Pim Janissen July 24, 2019

@Dario B I am very eager to be updated on the bugfix ;)

That link also does not work for me.

 

 

EDIT: to be more specific

Capture.PNG

 

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2019

@Pim Janissen I have just shared the issue with you (and the other people in this thread) so that you should be able to access it.

Please confirm you can now access the bug ticket.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events