I’m trying to build an app using the atlassian-connect-express example and am having trouble with the PROD environment installation. My app installs fine, but then I run into the error message below when viewing the app in my browser.
Unauthorized: Could not find stored client data for . Is this client registered?
I think the issue is me not storing/recalling the JWT correctly. I’m receiving it in the lifecycle.installed step but I can’t find any documentation on what to do with it or how to recall it properly.
I figured this out, and it might be because I don’t like to read docs but things were very unclear for me so I’m posting hoping this might help someone else.
The issue for me came down to the lifecycle.installed path, which I thought I needed to handle myself through express, but it turns out that ACE handles this for you??
Removing my app.post(’/installed’… from my routes/index.js, rebuilding and installing solved the problem.
Hi @jack,
your approach works for me, but the code I need to run on ‘host_settings_saved’ uses an instance of addon.httpClient in it to make REST API calls.
addon.httpClient get initialized with the req variable to be able to authenticate API REST calls, how could I use the req object created with the /installed POST call?
Replying to myself:
I found this post and learned that there is no need for the full req object to initialize addon.httpClient, it is possible to use only the clientKey:
To troubleshoot this issue further,
I have my connect app hosted at a certain domain and listed it as private in the Marketplace.
The installation via private upload in Jira and Confluence cloud went fine, but after say 3 weeks,
both plugins display the “Unauthorized: Could not find stored client data for …”.
Both apps are listed as installed in the manage apps page.
Could this be caused by a restart of Atlassian cloud servers due to an update?
We had to uninstall and reinstall the apps in order to get it working again.
Am I missing something?
Unfortunately, I am getting this issue on my app which worked for more than 2 years. This is affecting the prod app and we are concerned about the clients.