Looks like you have gone offline

Issue #225 closed
Archie Henderson created an issue

I have installed 2.0.5-mtls as per issue #196 and am able to complete the authentication of Jira and Bitcbucket without issue. I can now access Jira issues and PRs within VS Code. However, there are various scenarios where I get the ‘looks like you have gone offline’ message, seemingly without reason. So far I have found clicking on the ‘Details' of a PR and ‘Start Work’ of an issue both lead me to the offline message. I’ve turned on the debug output and nothing is shown at the point I do either of these actions. Possibly of interest is the fact that immediately after startup there is a debug message saying that I’m offline. I’ve copied the output below.

[2019-10-09 01:05:02:296] Atlassian for VS Code (v2.0.5-mtls) activated in 23 ms
[2019-10-09 01:05:02:790] You have gone offline :(
[2019-10-09 01:05:02:980]  Error: Error getting pipes Error: unable to verify the first certificate
[2019-10-09 01:05:02:980] knownpipes

Comments (12)

  1. Jonathan Doklovic Account Deactivated

    @Archie Henderson There seem to be a couple of things going on here. First, did you authenticate with Bitbucket cloud or server? Also, if you use the command palette to open “Preferences: Open Settings (UI)” and on that page search for “Charles” is “Atlascode: Enable Charles” checked or unchecked?

    Also, does the project you have open have a lot of branches or PRs related to it? Or to put it another way, if you open a different Bitbucket project with less branches, do you still get these same errors?

  2. Jonathan Doklovic Account Deactivated

    @Archie Henderson We’ve just released version 2.1.0 which I think might clear up these offline issues.

    Can you please try it out and let me know how it goes?

  3. Archie Henderson reporter

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} I’m authenticating using Bitbucket server with the custom SSL certificates. I’ve looked up “Atlascode:Enable” Charles and it is unchecked. There are not a significant number of branches in this project.

    I’ve tried with 2.1.0 and in the output logs I am now seeing a lot of messages indicating that the online check is failing.

  4. Jonathan Doklovic Account Deactivated

    @Archie Henderson I assume you’re now seeing logs trying to connect to both http://atlassian.com and https://bitbucket.org in the logs that are failing?

    what happens if you open a terminal and do:

    curl -H 'Accept: application/json, text/plain, */*' -H 'User-Agent: axios/0.19.0' -H 'Host: bitbucket.org' -X HEAD 'https://bitbucket.org/'
    

    that’s essentially what the online/offline checker does.

    Also, do you know if your going through a company proxy?

  5. Archie Henderson reporter

    Correct, that’s what I’m seeing. I’m on Windows so replaced the single quotes with double ones. The response I got was:

    Warning: Setting custom HTTP method to HEAD with -X/--request may not work the
    Warning: way you want. Consider using -I/--head instead.

    Yes, there is a company proxy unfortunately

  6. Jonathan Doklovic Account Deactivated

    @Archie Henderson could you run that curl command again and just add the -v flag to get verbose output? I want to know what http response code it’s giving you.

    Also, I’m working through some other proxy related issues today but I’m not convinced that’s the problem yet as all of the other requests seem to work fine.

  7. Jonathan Doklovic Account Deactivated

    You also might want to try -I like it suggests. I’m not too familiar with curl on Windows so I don’t know if it matters.

  8. Jonathan Doklovic Account Deactivated

    @Archie Henderson I’ve created a new version that allows you to tunnel https to your http proxy which I think is the cause of the issue. Here’s what I’d like you to do:

    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. Search for “Tunnel”
    4. find “Atlascode: Enable Https Tunnel” and check it
    5. Switch to the Output tab at the bottom of VS Code
    6. Using the dropdown on the right, select “Atlassian”

    After doing this you should see stuff in the logs about the tunneling. Please let me know if this works for you.

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

    Thanks!

  9. Archie Henderson reporter

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} , I’ve tried the new version and without checking the ‘Enable Https Tunnel’ box I am getting a successful connection message. Obviously that’s great news, but not sure if it’s because of changes in this version or because I’m in a different office today. I’ve also tried with the tunneling option checked and this works too, so I will give it all a go next week when I am back in the original office just to confirm that the fact it’s now working is not due to different IT configurations in this office. Thanks for your help!

  10. Archie Henderson reporter

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} , sadly in my usual office this doesn’t work with tunneling either enabled or disabled. Is there anything else I can help test?

  11. Jonathan Doklovic Account Deactivated

    @Archie Henderson Can you try the curl command and let me know what response code it gives you?

    curl -v -H 'Accept: application/json, text/plain, */*' -H 'User-Agent: axios/0.19.0' -H 'Host: bitbucket.org' -X HEAD 'https://bitbucket.org/'
    

  12. Alastair Wilkes

    I'm closing this issue due to inactivity, but please do reopen (or open a new issue) if issues persist. Thanks!

  13. Log in to comment