Getting this error intermittently today while using the REST API with OAuth tokens. If I retry the same request, then it succeeds (or sometimes fails again).
More weirdness, just got this error “{“projectLead”:“You must specify a valid project lead.”}” with code that hasn’t changed in years. Ran it again and it worked the second time.
We experience the same issue on various endpoints since 10th November. Most often we see it with these:
/rest/api/2/issue/{id}/watchers
/rest/api/2/issue/{id}/comment
/rest/api/2/user/viewissue/search
This is how a response for a failed request looks like:
“type”: “HTTP”,
“url”: “https://api.atlassian.com/ex/jira/{cloud-id}/rest/api/2/issue/{issue-id}/watchers”,
“method”: “GET”,
“requestHeaders”: {
“Authorization”: “Bearer ******”,
“Accept”: “application/json”,
“Accept-Encoding”: “gzip, x-gzip”,
“Content-Type”: “application/json”
},
“startTime”: “2021-11-12T10:58:04.171Z”,
“durationMillis”: 106,
“status”: 403,
“protocol”: “REST”,
“responseEntity”: “{"errorMessages":["The app is not installed on this instance."]}”
Obviously the app is there and works just fine, but from time to time for some reason it fails like this (no pattern found so far).
We see the same issue for various endpoints. Most often we see it with these:
/rest/api/2/issue/{issue-id}/watchers
/rest/api/2/issue/{issue-id}/comment
/rest/api/2/user/viewissue/search
This is how a response to failed request looks like in our case:
{
"type": "HTTP",
"url": "https://api.atlassian.com/ex/jira/{cloud-id}/rest/api/2/issue/{issue-id}/watchers",
"method": "GET",
"requestHeaders": {
"Authorization": "Bearer ******",
"Accept": "application/json",
"Accept-Encoding": "gzip, x-gzip",
"Content-Type": "application/json"
},
"startTime": "2021-11-12T10:58:04.171Z",
"durationMillis": 106,
"status": 403,
"protocol": "REST",
"responseEntity": "{\"errorMessages\":[\"The app is not installed on this instance.\"]}"
}
Obviously the app is installed on the instance and works just fine in most of the cases. Just from time to time returns this error (no pattern found so far).
Hi @MattS and @IWSAdministrator ,
Can I ask you if this is happening with the new limited life/rotating refresh token or if these apps are still using the persistent refresh token?
For reference: Superseded: 31 January 2022 - Action required - Deprecating persistent refresh tokens
We are investigating what’s happening and this will help us in isolating the problem?
Thank you,
Caterina
Hi @CaterinaCurti ,
thank you for reminding us about the refresh token update. The apps were not set to “rotating refresh tokens”.
Unfortunately even after correcting this setting, we still face the issue.
When we run a batch of requests during a synchronisation, sometimes hundreds of them pass correctly before we receive the error and sometimes we get the error within the first few.
It is totally random and we are not able to identify any pattern.
Hi @IWSAdministrator ,
Thanks for the reply. With my question, I wanted to understand the conditions for this issue rather than suggesting that switching to the refresh tokens would help to address it. Sorry if my comment wasn’t clear.
At this stage, we will need some details from the app to investigate this further.
Can you please raise a ticket here with us Jira Service Management with a reference to this thread?
Please also add:
- the site URL or ID of a few affected sites
- the OAuth Client ID
- the userID
- the link to install the app so that we can test it on our environments and the steps to trigger the calls that are intermittently failing
- if possible, a few timestamps when the problem has been observed on the provided sites
Thank you,
Caterina
Hi all,
We have now been able to confirm the problem on our end and our teams are working on investigating the causes leading to it and implement a solution.
Thank you for your patience,
Caterina
Hi all,
We believe the issue has been resolved now and our checks confirm that everything is working as expected.
Please let us know if you still see a problem.
Thank you again for your patience while we addressed this,
Caterina
Hi @CaterinaCurti,
I can confirm that the synchronisations run ok.
The last failed request I see in our logs has “2021-11-18T02:28:56.129942Z” timestamp. We will do a few more tests on 19th, but so far it seems to be resolved.
Thank you for resolving the issue. Great job 
Thank you for confirming this!
Really appreciated.
Iam getting same issue again with “client_credentails” flow. I have passed clientId, clientSecret and grant_type:“client_credentials” to the url: https://auth.atlassian.com/oauth/token. while access jira api with the token generated, iam getting 403 with “The app is not installed on this instance.”
I am facing the exact same issue.
Welcome to the Atlassian developer community @SrinivasDoosa,
Currently, the client credentials flow is not supported, except for the narrow case of a handful of Jira Software APIs.
I’m closing this thread on the grounds that it’s not specific enough for us to solve.
It looks like even after chasing an initial hypothesis that this might be related to a change in the OAuth behavior regarding refresh tokens, we didn’t get enough context to be able to reproduce the problem, let alone solve the problem. If you see this error and need more help, we would need more details, like which endpoints you are calling, which OAuth flow you’ve tried, and steps to reproduce.