Unable to register helloworld demo add-on

I’m unable to run the simple Hello World demo at https://developer.atlassian.com/confcloud/quick-start-to-confluence-connect-39987884.html. Running the node app results in this error:

Could not contact host: https://ceb-ttd.atlassian.net/wiki
Unhandled error: Error: Unexpected host info response format text/html;charset=UTF-8
    at Request._callback (C:\Users\Charlie.Bosson\Documents\git\
    confluence-helloworld-addon\node_modules\atlassian-connect-express\
    lib\internal\host-info.js:25:31) ...

My Confluence dev instance appears to be returning an empty response. I added some trace to host-info.js to retrieve the request options, return status, the body, and the headers. Here is that data, with my PII removed:

requestOptions:{"baseUrl":"https://<myemail>:<mypassword>@ceb-ttd.atlassian.net/wiki","timeout":5000,"uri":"/plugins/servlet/oauth/consumer-info"}
status code:200
res.body:<empty>
headers: { server: 'nginx',
  date: 'Thu, 18 May 2017 17:15:49 GMT',
  'content-type': 'text/html;charset=UTF-8',
  'content-length': '0',
  connection: 'close',
  vary: 'Accept-Encoding',
  'x-confluence-request-time': '1495127749552',
  'x-seraph-loginreason': 'OUT, OK',
  'set-cookie':
   [ 'JSESSIONID=7B560FB03CD71204F150E95E73CC521A; Path=/wiki; Secure; HttpOnly',
     'studio.crowd.tokenkey=""; Domain=.ceb-ttd.atlassian.net; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly',
     'studio.crowd.tokenkey=j6Ay4IptQYUlJXePPpLC0Q00; Domain=.ceb-ttd.atlassian.net; Path=/; Secure; HttpOnly' ],
  'strict-transport-security': 'max-age=315360000;includeSubDomains' }

If I place the URI directly in the browser, or in Postman, I correctly receive the expected consumer-info XML.
Note that the server is returning a 200, so it’s a successful call.
Can anybody please shed some light on this? I’ve tried 5 other tutorials with the same result.
Thanks,
Charlie

I turned on debugging in request.js, and here is the output:

Registering add-on...
requestOptions:{"baseUrl":"https://<user>:<password>@ceb-ttd.atlassian.net/wiki","timeout":5000,"uri":"/plugins/servlet/oauth/consumer-info"}
REQUEST { baseUrl: 'https://<user>:<password>@ceb-ttd.atlassian.net/wiki',
  timeout: 5000,
  uri: '/plugins/servlet/oauth/consumer-info',
  callback: [Function],
  method: 'GET' }
REQUEST make request https://<user>:<password>@ceb-ttd.atlassian.net/wiki/plugins/servlet/oauth/consumer-info
REQUEST onRequestResponse https://<user>:<password>@ceb-ttd.atlassian.net/wiki/plugins/servlet/oauth/consumer-info 200 { server: 'nginx',
  date: 'Thu, 18 May 2017 21:48:05 GMT',
  'content-type': 'text/html;charset=UTF-8',
  'content-length': '0',
  connection: 'close',
  vary: 'Accept-Encoding',
  'x-confluence-request-time': '1495144085719',
  'x-seraph-loginreason': 'OUT, OK',
  'set-cookie':
   [ 'JSESSIONID=0FF2AFD2FF647237AC52DEA6657D956F; Path=/wiki; Secure; HttpOnly',
     'studio.crowd.tokenkey=""; Domain=.ceb-ttd.atlassian.net; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly',
     'studio.crowd.tokenkey=j6Ay4IptQYUlJXePPpLC0Q00; Domain=.ceb-ttd.atlassian.net; Path=/; Secure; HttpOnly' ],
  'strict-transport-security': 'max-age=315360000;includeSubDomains' }
REQUEST reading response's body
REQUEST finish init function https://<user>:<password>@ceb-ttd.atlassian.net/wiki/plugins/servlet/oauth/consumer-info
REQUEST response end https://<user>:<password>@ceb-ttd.atlassian.net/wiki/plugins/servlet/oauth/consumer-info 200 { server: 'nginx',
  date: 'Thu, 18 May 2017 21:48:05 GMT',
  'content-type': 'text/html;charset=UTF-8',
  'content-length': '0',
  connection: 'close',
  vary: 'Accept-Encoding',
  'x-confluence-request-time': '1495144085719',
  'x-seraph-loginreason': 'OUT, OK',
  'set-cookie':
   [ 'JSESSIONID=0FF2AFD2FF647237AC52DEA6657D956F; Path=/wiki; Secure; HttpOnly',
     'studio.crowd.tokenkey=""; Domain=.ceb-ttd.atlassian.net; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly',
     'studio.crowd.tokenkey=j6Ay4IptQYUlJXePPpLC0Q00; Domain=.ceb-ttd.atlassian.net; Path=/; Secure; HttpOnly' ],
  'strict-transport-security': 'max-age=315360000;includeSubDomains' }
REQUEST end event https://<user>:<password>@ceb-ttd.atlassian.net/wiki/plugins/servlet/oauth/consumer-info
REQUEST emitting complete https://<user>:<password>@ceb-ttd.atlassian.net/wiki/plugins/servlet/oauth/consumer-info
status code:200
res.body:
{ server: 'nginx',
  date: 'Thu, 18 May 2017 21:48:05 GMT',
  'content-type': 'text/html;charset=UTF-8',
  'content-length': '0',
  connection: 'close',
  vary: 'Accept-Encoding',
  'x-confluence-request-time': '1495144085719',
  'x-seraph-loginreason': 'OUT, OK',
  'set-cookie':
   [ 'JSESSIONID=0FF2AFD2FF647237AC52DEA6657D956F; Path=/wiki; Secure; HttpOnly',
     'studio.crowd.tokenkey=""; Domain=.ceb-ttd.atlassian.net; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly',
     'studio.crowd.tokenkey=j6Ay4IptQYUlJXePPpLC0Q00; Domain=.ceb-ttd.atlassian.net; Path=/; Secure; HttpOnly' ],
  'strict-transport-security': 'max-age=315360000;includeSubDomains' }
Could not contact host: https://ceb-ttd.atlassian.net/wiki
Unhandled error: Error: Unexpected host info response format text/html;charset=UTF-8
    at Request._callback (C:\Users\Charlie.Bosson\Documents\git\confluence-helloworld-addon\node_modules\atlassian-connect-express\lib\internal\host-info.js:26:31)
    at Request.self.callback (C:\Users\Charlie.Bosson\Documents\git\confluence-helloworld-addon\node_modules\request\request.js:191:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (C:\Users\Charlie.Bosson\Documents\git\confluence-helloworld-addon\node_modules\request\request.js:1174:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (C:\Users\Charlie.Bosson\Documents\git\confluence-helloworld-addon\node_modules\request\request.js:1094:12)
    at IncomingMessage.g (events.js:292:16)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

I have since tried this same demo on a different machine, a Mac, with the same results.

Did you enable development mode? https://developer.atlassian.com/static/connect/docs/latest/guides/development-setup.html

Hi Charlie,
I got problem in the above process this morning too. But still can register add on by:

  1. First start you add on and ngrok.
  2. Go to your instance, make sure you enabled development mode for you instance.
  3. Use Upload add-on link on Manage add-ons page.
  4. type you ngrok address of your addon as ‘From this URL’, then click Upload.
  5. You add on will install successfully and see it running in your instance now.

I am sure there is something broken due to Atlassian ID is enforce for login into instance. But mean time you have a work around to try out our samples.