Unable to authenticate with on-prem Jira

Issue #218 resolved
Andrey Leybovich created an issue

We have Jira running on-prem and authenticating with AD. I Installed the plugin (v 2.0.2) in the latest version of VS Code (updated today) and then tried logging into the plugin, and I get `Error authenticating with Jira: Error: socket hang up`

Comments (10)

  1. Jonathan Doklovic Account Deactivated

    @Andrey Leybovich Do you have any proxy settings set in your VS Code settings? possibly “no_proxy”

  2. Dawei Wang

    I have similar issue but got 400 error. I tried different proxy settings and have no avail, version 2.0.4 here.

    I suspect it related to sending data to analytics in atlaclient loginManager , where event it fails, the application should keeps going, since it should not be a required function.

  3. Jonathan Doklovic Account Deactivated

    We’ve recently released version 2.1.0 which among other things has a bit more details in the error message when this happens.

    Could you please try this version and report the errors here?

  4. Dawei Wang

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} , thanks, will try the 2.10.

    At the same time looking at the code

    if (isBasicAuthInfo(authInfo)) {
                try {
                    const siteDetails = await this.saveDetailsForServerSite(site, authInfo);
                    authenticatedEvent(siteDetails).then(e => { this._analyticsClient.sendTrackEvent(e); });
                } catch (err) {
                    const errorString = `Error authenticating with ${site.product.name}: ${err}`;
                    Logger.error(new Error(errorString));
                    return Promise.reject(errorString);
                }
            }
    

    if for some reason, the Atlassian analytics service is not available then it will fail?

  5. Jonathan Doklovic Account Deactivated

    @Dawei Wang The analytics shouldn’t fail anything. It’s fired off as a Promise that we don’t await on, but I’ll definitely look into it.

  6. Jonathan Doklovic Account Deactivated

    I’ve created a new version that allows you to tunnel https to your http proxy which i think is the cause of this issue. To test it out:

    1. download the visix file (link below) and install it using the “Install From visix…” option in the extension panel menu
    2. from the command palette open “Preferences:Open Settings (UI)”
    3. on the settings screen search for “output level”
    4. find “Atlascode: Output Level” and change it to be “debug”
    5. Search again for “Tunnel”
    6. find “Atlascode: Enable Https Tunnel” and check it
    7. Switch to the Output tab at the bottom of VS Code
    8. Using the dropdown on the right, select “Atlassian”
    9. open the Atlassian Settings screen
    10. try to login

    https://bitbucket.org/atlassianlabs/atlascode/downloads/atlascode-2.1.1-tunnel2.vsix

    Let me know how it goes, Thanks!

  7. Dawei Wang

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} , works now, thank you very much, but my on prem server do not need proxy, does the plugin respect NO_PROXY environment variable?

  8. Jonathan Doklovic Account Deactivated

    @Dawei Wang The tunnel2 version did not respect NO_PROXY.

    Here’s a new version that respects the env variable with the following rules:

    • NO_PROXY is a comma-separated list of hostnames and domains.
    • A hostname (e.g., mail, company.com, www.company.com) matches only that one hostname.
    • A domain starts with a . (e.g., .company.com) and matches all hostnames in that domain, including the hostname equal to the domain (e.g., .company.com matches company.com, www.company.com, mail.company.com).

    can you please test and let me know how it goes?

    https://bitbucket.org/atlassianlabs/atlascode/downloads/atlascode-2.1.1-noproxy.vsix

  9. Log in to comment