Impossible to upload/install add-on in development stage to JIRA Cloud DEV

1,222 views
Skip to first unread message

Frédéric Tardieu

unread,
Sep 28, 2016, 8:52:49 PM9/28/16
to Atlassian Connect Dev
Hi all,

I just switched from using a locally hosted JIRA to JIRA Cloud development one, as specified in https://developer.atlassian.com/static/connect/docs/latest/developing/developing-locally.html .

When I upload the URL on the JIRA Cloud dev, I get a 404 error at the end of the installation process, while there is no 404 appearing on the nodejs server side nor ngrok. The message I'm getting is:

"The add-on host returned HTTP response code 404 when we tried to contact it during installation. Please try again later or contact the add-on vendor.""

nodejs server log:

C:\Users\f.tardieu\workspace\jira-ft>node app.js
Watching atlassian-connect.json for changes
Initialized memory storage adapter
## Deeper add-on: server running at http://LGOP613:3000
GET / 302 5ms - 0b
GET /atlassian-connect.json 200 7ms - 823b
GET / 302 2ms - 0b
GET /atlassian-connect.json 200 2ms - 823b

ngrok log:

HTTP Requests
-------------

GET /atlassian-connect.json    200 OK
GET /                          302 Found
GET /atlassian-connect.json    200 OK
GET /                          302 Found

What is exactly not found?

Thanks a lot,

Fred

Robert Massaioli

unread,
Sep 28, 2016, 10:00:51 PM9/28/16
to Atlassian Connect Dev

What is in the top level baseUrl field of your atlassian-connect.json descriptor? Is it pointing to the public HTTPS Ngrok link?

My best guess is that your baseUrl still points to localhost and, from the Atlassian Cloud instances perspective, localhost is not your computer and thus you get a 404 when trying to access that link.

Please post your full descriptor here if possible.

Cheers,
Robert

Frédéric Tardieu

unread,
Sep 29, 2016, 4:53:16 PM9/29/16
to Atlassian Connect Dev
Hi Robert,

Thanks for your reply

The top level baseUrl field was set to https://46b37686.ngrok.io, the https url given by ngrok once my nodejs server was started. I traced the traffic at ngrok level, and saw that there was a 302 return code with "unexepected end of json file" while accessing the / route. After removing some unused commented lines in the descriptor, it became OK at installation process (I may have had a character sequence problem in the file, but I don't know exactly which one).

But I'm now facing another problem: after the add-on is installed correctly (the installation process goes to its end with the final confirmation dialog), I am getting an Auth failure: Query hash mismatch (see below for the full log, from add-on server start to auth error log) when starting the add-on in JIRA.

And last but not least, everything is OK when deployed in production (on Heroku).

I really would like to undertstand this point!!!

Thanks for any tip on this, Fred.

C:\Users\f.tardieu\workspace\jira-ft>node app.js
Watching atlassian-connect.json for changes
Initialized memory storage adapter
## Deeper add-on: server running at http://LGOP613:3000
## Deeper add-on: initialised yfiles, version 1.2.1.4
GET / 302 9ms - 0b
GET /atlassian-connect.json 200 3ms - 823b
Saved tenant details for jira:2161db11-5088-4704-a231-890083028392 to database
{ key: 'deeper',
  clientKey: 'jira:2161db11-5088-4704-a231-890083028392',
  publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcaLKgp0b7IM3tuzATc7rd+GfOEMzpcjANIpzGtuJi+31culpHEb5XZt8zov54nyRmMp3jgcZrTscYnz+nRFtMM6xJLAh8HjCeX9Ix7oXFiGUt2XRlMllsrkxKvuFNFxVTg7qNz32AHCNFBAAfMzCx+qOVcyW8q/wNuFGD8AvOjwIDAQAB',
  sharedSecret: '7HJ3IhQmfXY/NUt/rh0YBJYmfI0dd9ZFQXGWGNgv6L8pMpoNuQMh1wZEX4fTgg3pUwTeZxCEDIcXf7QEIaog0A',
  serverVersion: '100014',
  pluginsVersion: '1.1.118',
  productType: 'jira',
  description: 'Atlassian JIRA at https://tartech-dev.atlassian.net',
  eventType: 'installed' }
POST /installed?user_key=admin 204 21ms
Auth failure: Query hash mismatch: Received: "20b4cda51b886c472d347c20de46df433b72e3bf29671bd8c127374c703e2333" but calculated "6ed5dcef6353b0c6fd964e82e52823d3251f9484c913d699c3645739d522bdd5". Canonical query was: "GET&/deeper&__proto__=%5Bobject%20Object%5D&cp=&cv=1.1.118&lic=none&loc=en-US&tz=Eu
rope%2FBerlin&user_id=admin&user_key=admin&xdm_c=channel-deeper__deeper&xdm_deprecated_addon_key_do_not_use=deeper&xdm_e=https%3A%2F%2Ftartech-dev.atlassian.net
Authentication verification error: 401 Authentication failed: query hash does not match.
GET /deeper?tz=Europe%2FBerlin&loc=en-US&user_id=admin&user_key=admin&xdm_e=https%3A%2F%2Ftartech-dev.atlassian.net&xdm_c=channel-deeper__deeper&cp=&xdm_deprecated_addon_key_do_not_use=deeper&lic=none&cv=1.1.118&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInFzaCI6IjIwYjRjZGE1MWI4ODZ
jNDcyZDM0N2MyMGRlNDZkZjQzM2I3MmUzYmYyOTY3MWJkOGMxMjczNzRjNzAzZTIzMzMiLCJpc3MiOiJqaXJhOjIxNjFkYjExLTUwODgtNDcwNC1hMjMxLTg5MDA4MzAyODM5MiIsImNvbnRleHQiOnsidXNlciI6eyJ1c2VyS2V5IjoiYWRtaW4iLCJ1c2VybmFtZSI6ImFkbWluIiwiZGlzcGxheU5hbWUiOiJGcsOpZMOpcmljIFRhcmRpZXUgIFtBZG1pbmlzdHJhdG9yXSJ9fSwiZXhwIjoxNDc1MTc
4MDU4LCJpYXQiOjE0NzUxNzc4Nzh9.SSiheES3gsycYhPVH4fM7O43Nxe-7u9b3jDUmP1QqNc 401 85ms - 830b

Robert Massaioli

unread,
Sep 29, 2016, 6:59:56 PM9/29/16
to Atlassian Connect Dev
Hi,

Firstly, JSON does not support comments but you can add comments in other ways.

Secondly, that QSH error looks really odd. Can you please post your entire Atlassian Connect descriptor somewhere that I can view it? That way I can debug the problem further.

Cheers,
Robert

Frédéric Tardieu

unread,
Oct 8, 2016, 5:00:15 PM10/8/16
to Atlassian Connect Dev
Hi Robert,

I did some investigations on my side, as I had the feeling my ACE & Express versions were too old (based on this weird JWT error). To do so, I did an atlas-connect new to create a new add-on template, and compared the declared dependencies version in the package.json ... I updated my package.json to the versions out of the newly created add-on, restarted the app.js and it was fine.

So I had 2 problems:

  • comments in the descriptor leading to the 404 not found error,
  • old ACE version leading to a JWT error
This is my understanding so far... But at least I can go on coding the add-on!

Thank you again for your support,

Fred 
Reply all
Reply to author
Forward
0 new messages