I have developed basic jira application with npm connect framework. I host is on heroku with postgresql. First installation is fine. Subsequent installs seems fine until I try to open my pages then it is giving me this error:
Authentication verification error (400): Unable to decode JWT token: Error: Signature verification failed for input: eyJ0.... with method sha256
If I empty DB it works fine. This error is happening when there are duplicate entries in DB with this Query:
SELECT "id", "clientKey", "key", "val" FROM "AddonSettings" AS "AddonSetting"
|5 |9b8b3c4d-f33b-3f03-8cab-8d9562498a61 |clientInfo |{"key":"AO-apppp","clientKey":"9b8b3c4d-f33b-3f03-8cab-8....","oauthClientId":"eyJob3N0S2V....|
|6 |9b8b3c4d-f33b-3f03-8cab-8d9562498a61 |clientInfo |{"key":"AO-apppp","clientKey":"9b8b3c4d-f33b-3f03-8cab-8d...","oauthClientId":"eyJob3N0S2V...|
If I delete this it works fine but if try to install again new entries come. I store data on DB so I cant reset it.
Hello @Werare ,
Welcome to the Atlassian Community!
If I understand correctly you are trying to report a bug you have found when you reinstall the connect app you have built.
I have searched a bit around and I can see someone else already reported the same issue in our developers service desk:
I am not sure why this issue has been logged as improvement instead of bug. I am going to check with DEV if it can be moved to bug.
In the meanwhile you can set your self as a watcher so that you will be notified in case of any update and you can add a comment to the issue if you want to add more details or ask any question.
Finally, for the future, please notice that this is not the best place to get help on development related questions.
The right resources are listed in https://developer.atlassian.com/resources.
Specifically:
Cheers,
Dario
Multiple entries in the DB is causing this issue. I resolved the problem for now by adding these endpoints to the index.js
app.get('/installed', function (req, res) { res.send(200); });
app.post('/installed', function (req, res) { res.send(200); });
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.