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

Cannot connect jira cloud instance #16

Closed
XanatosX opened this issue May 3, 2018 · 6 comments
Closed

Cannot connect jira cloud instance #16

XanatosX opened this issue May 3, 2018 · 6 comments
Assignees

Comments

@XanatosX
Copy link

XanatosX commented May 3, 2018

Problem description

I cannot get it to work with my cloud instance, I always get a connection error telling me the URL is not valid.

I'm trying to use this tool because my company is using two different Jira instances with different user accounts ...

The idea was to use this tool to log my time for the second instance while keeping the log-in into the primary instance.

Please give me an advice what could be wrong.

Information about the options set in the plugin

URL: https:///rest/api/2/search
While the Jira URL was set to {instancename}.atlassian.net

Username and password were used.

If I copied the URL to the browser URL I was receiving the JSON data so it seems correct to me.

@alfeugds alfeugds self-assigned this May 3, 2018
@alfeugds
Copy link
Owner

alfeugds commented May 3, 2018

Hi @XanatosX
Thanks for reaching out. I'll try to look closer on your issue later today, but looking at your description, maybe we can make a quick test to see if it solves your issue:

Could you please try to set only the Jira URL field in the options, while keeping the username and password fields blank, and see if the Test Connection button returns a positive result?

This is because the chrome extension tries to use the authentication cookie already present in the browser when making calls to the Jira instance with no user/password present, and should work if you are already logged in to Jira.

Also, have any of the two Jira instances worked with the chrome extension so far?

@XanatosX
Copy link
Author

XanatosX commented May 4, 2018

Hi @alfeugds

Thank you for your quick reply.

I already tried to only use the URL but it's still showing a "connection failed" error. If I only enter the https://{instancename}.atlassian.net part it shows a "Connection successful" but I think this only checks if the Jira instance is present.

Sadly I did not get one of the Jira instances to a working state, one of them is using a two-factor authentification so I think that could be the problem here but the other should work.

@alfeugds
Copy link
Owner

alfeugds commented May 4, 2018

Hi @XanatosX

After you entered the https://{instancename}.atlassian.net part and received a "Connection successful" message, if you save the options, you may be able to use the tool and log hours through it.

The tool expects the Jira URL field to be your Jira instance's hostname (I think I should change the label to "Jira Hostname" for clarity). Then, the tool makes the API requests to Jira by joining the hostname with the "/rest/api/2/search" path.

If you use two-factor authentication, you just need to make sure that chrome is logged in to Jira, and let the user/password fields blank.

Let me know if that works for you.

@XanatosX
Copy link
Author

XanatosX commented May 4, 2018

Hi @alfeugds

Okay, we got some success, I entered the URL as mentioned by you to my browser logged in to the non-two-factor instance. After entering my username and password I finally got a connection. Lucky enough this is the instance I want to connect to.

The next step would be to use this tool in the browser where I'm logged in to the other instance. So I used the same working configuration and switched to the two-factor instance, now the connection error reappears.

So I seem like the cookie is preferred instead of the login?

You should also rewrite the readme.md on the chrome extension shop and on GitHub, if I'm right it tells you to insert the whole API link.

@alfeugds
Copy link
Owner

alfeugds commented May 4, 2018

Hello @XanatosX

Indeed the login cookie seems to be more stable than the user/password configurations. I intend to make this process more clear by resolving the issue #10

I'll definitely rewrite both readme.md and the description in Chrome Store, thanks for the tip!

I hope the tool fits your needs, and feel free to reach out if you have any other issues or suggestions.

Since you finally got a connection to the desired Jira instance, do you think we close this issue?

@XanatosX
Copy link
Author

XanatosX commented May 4, 2018

Hey @alfeugds,

it's not completely working as expected but I can use it which is a big improvement 👍

The plan was to be logged in into the two-factor instance but log the time with your tool in the other instance without two-factor authentification. My Idea was to use one browser profile instead of two and write my work log to a note entering it later on with your tool.

But yes I think we can close it and I will start another attempt as soon as #10 is solved 😄

Thank you for helping me out and clarifying this up, feel free to close this issue.

@XanatosX XanatosX closed this as completed May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants