Cannot set issue properties via Forge on some instances

Hi,
We are trying to set an Issue Property from within an Issue Glance, like this:

await properties.onJiraIssue(issueId).set(FIELD_KEY, { id: some.value });

This works well enough on most, but not all instances. We have one instance where it does fail, producing the following error:

invocation: c72818f6a0c53ad4 issue-glance.run
INFO    14:27:36.971  c72818f6a0c53ad4  Error: Permissions error or key does not exist

The app is the same version on all instances and the only discernible difference I could find is that the troubling instance is Cloud Premium, while the others are not.

So far, I have checked:

  • the app’s scopes (:heavy_check_mark: App has write permissions)
  • setting the property via postman (:heavy_check_mark: Works without problem)
  • setting a different property id (:negative_squared_cross_mark: same behavior)
  • using asApp().requestJira() instead (:negative_squared_cross_mark: same behavior, slightly different error message)
  • the permission scheme of the project (:negative_squared_cross_mark: inconclusive, looks identical to unaffected instances; thx @danielwester )

I’m sure that there must be something obvious I’m overlooking, but at this point, I’m out of ideas. Does anyone else have an idea where to look next?

Thanks,
Oliver

Does the app have write privileges according to the permission scheme for that project? (ie can it update the issue)

1 Like

Thanks @danielwester , that hadn’t occurred to me! I’ve now checked this, but, unfortunately, that doesn’t seem to be the problem here. The app has the same permissions on all instances and the same issue is present in all projects on the affected instance.

I have exactly the same issue. An instance that i created when Forge was first announced doesn’t work but other instances do when setting properties on issues and projects.

I have the same issue with properties.onJiraIssue(...).set: Permissions error or key does not exist

I was experimenting with api.asUser() code and Jira displayed Oauth authorization screen to me, where I granted permissions. After some experiments the permissions error were gone. However, I do not know whether these two operations are related – I tried forge deploy, forge install --update etc. several times, also with adding scopes to the manifest file (however, I am not sure whether this is needed, because documentation says “ Note, Forge apps deployed in the development environment always receive all available OAuth 2 scopes.”