Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to connect to a Jira cloud instance #945

Closed
Kshitij-Katiyar opened this issue May 30, 2023 · 18 comments · Fixed by #949
Closed

Not able to connect to a Jira cloud instance #945

Kshitij-Katiyar opened this issue May 30, 2023 · 18 comments · Fixed by #949
Labels
Type/Bug Something isn't working

Comments

@Kshitij-Katiyar
Copy link
Contributor

Kshitij-Katiyar commented May 30, 2023

After running the slash command /jira instance connect <instanceURL> or in case of a single instance /jira connect. I am getting the error

could not get user info for client, err: No response returned: Get "https://<url>.atlassian.net/rest/api/2/myself": oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"invalid_grant","error_description":"Invalid aud: https://auth.atlassian.io"}

Steps to reproduce:-

  1. Install the instance by running the command /jira instance install cloud <url> .
  2. Upload the app on the Jira cloud instance.
  3. Run /jira connect and click on the URL.

mattermost server version - 6.6

@Kshitij-Katiyar Kshitij-Katiyar added the Type/Bug Something isn't working label May 30, 2023
@Kshitij-Katiyar Kshitij-Katiyar changed the title Not able to connect to a Jira cloud Not able to connect to a Jira cloud instance May 30, 2023
@serve-id
Copy link

exact same Problem here - was working smooth before Plugin Update:

Steps to reproduce:-
Install the instance by running the command /jira instance install cloud .
Upload the app on the Jira cloud instance.
Run /jira connect and click on the URL.
mattermost server version - Version: 7.7.1
DB-schema-Version: 100
Jira-Plugin-Version: 3.2.5

@mickmister
Copy link
Contributor

@Kshitij-Katiyar What is shown to the user in the browser when this happens? Is there a tab that navigates to Jira's site?

@Kshitij-Katiyar
Copy link
Contributor Author

Kshitij-Katiyar commented May 30, 2023

@mickmister This is the error I am getting here. Yes, the tab navigates to Jira's site. Please find the video below for more understanding

Screenshot from 2023-05-30 20-48-37

jira-error.webm

@mickmister
Copy link
Contributor

Thanks @Kshitij-Katiyar 👍

I'm not sure exactly what the problem is here. If we can't figure it out with a little debugging, and it reproduces on every setup, we may need to go down the path of deprecating the Atlassian Connect method of authentication.

We've been wanting to deprecate the Atlassian Connect method for a while, which is currently how the user authentication with Jira Cloud works in the plugin. The alternative is to use Jira's OAuth2.0 offering, which we have implemented in a PR #928 that was closed due to change in priorities.

The author of that PR is no longer working on the project, so the PR will need to be picked up again and driven to be merged. The PR has been dev approved, and has some remaining concerns from QA here #928 (comment).

@Kshitij-Katiyar What are your thoughts on getting the OAuth2 PR merged and shipped, to resolve the ticket you've created here? cc @hanzei @DHaussermann

@mickmister
Copy link
Contributor

It's also possible this is a regression on Jira's side, or possibly a deprecation we were unaware of for an API we are using. A quick search for this error isn't yielding much information, but maybe there is more information to be found.

@fuse
Copy link

fuse commented Jun 1, 2023

I encountered the exact same problem, plugin version 3.2.5.

Mattermost Version: 7.10.0
Database Schema Version: 105
Database: postgres

I tried downgrading manually to 3.2.3 but it’s not working either.

@mickmister
Copy link
Contributor

@Kshitij-Katiyar With some testing I've confirmed that using OAuth 2 via #928 sidesteps the issue. Are you able to pick this PR up? This issue is particularly urgent, as it seems no Jira Cloud instances can be connected to at the moment.

@Kshitij-Katiyar
Copy link
Contributor Author

Kshitij-Katiyar commented Jun 2, 2023

@Kshitij-Katiyar With some testing I've confirmed that using OAuth 2 via #928 sidesteps the issue. Are you able to pick this PR up? This issue is particularly urgent, as it seems no Jira Cloud instances can be connected to at the moment.

@mickmister I noticed that you pushed some commits on PR #928. Should I pick this up or you are working on this?

@mickmister
Copy link
Contributor

mickmister commented Jun 2, 2023

@Kshitij-Katiyar I was mainly resolving merge conflicts. I'm not able to own the PR going forward though because I will be OOO for the next few weeks.

@mickmister
Copy link
Contributor

@Kshitij-Katiyar Feel free to give the PR a review to get a better understanding of what is implemented there

@mickmister
Copy link
Contributor

@Kshitij-Katiyar Maybe this is another way around this while still using Atlassian Connect. Is there any other info you were able to uncover about the issue?

@mickmister
Copy link
Contributor

@Kshitij-Katiyar Note that I've closed that PR #928 since the developer is not working on the project, and reopened it as #949

@Jawknee-cache
Copy link

Is there currently a workaround for this issue?

@mickmister mickmister linked a pull request Jul 19, 2023 that will close this issue
@mickmister
Copy link
Contributor

Hi @Jawknee-cache, currently there is no workaround. Once #949 is merged and released, then this should be resolved. We apologize for this inconvenience.

@BlueSky-fur
Copy link

Glad this finally gets more traction, seems like people are struggeling with this since around 2020.

Since Omnibus updates take even longer, i guess regular instances get the update quicker?

@mickmister
Copy link
Contributor

Since Omnibus updates take even longer, i guess regular instances get the update quicker?

@BlueSky-fur Once a new version of the plugin is released, you'll be able to update the Jira plugin on your Omnibus installation immediately

@BlueSky-fur
Copy link

Oh its a plugin update! That makes it so much more awesome! :D

Thanks for the info!

@obi12341
Copy link

obi12341 commented Aug 11, 2023

we have exactly the same problem which is preventing us from migrating our gitlab/omnibus team edition to the already paid standalone kubernetes operator premium edition. Is there any ETA for this issue? By the way our team edition is working fine and reinstalling works fine but on the seperate premium edition with exactly the same Jira Cloud Instance we are facing this issue, which makes me believe it is not an jira issue. Maybe related to the Reverse Proxy Configuration or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants