Codestream: VS Code Mac Login Exception

Created on 27 Mar 2019  ·  14Comments  ·  Source: TeamCodeStream/codestream

I'm using a Mac and running VSCode 1.32.3 with CodeStream Version 0.50.0-55. I also tried CodeStream Version 0.35.0-54

I try to sign in and it sits in a loop of WebviewPanel: Completed posting webview/focus/didChange to the webview for a while then it times out with the following error message and stack trace:

~/.vscode/extensions/codestream.codestream-0.50.0/dist/extension.js:1:12234
Error: CodeStream: Login failed:
request to http://api.codestream.com/no-auth/login failed, reason: connect ETIMEDOUT
[2019-03-27 14:43:39:169] [3] CodeStreamSession.logout — signInFailure
[2019-03-27 14:43:39:170] [3] CodeStreamSession.logout completed • 0 ms
[2019-03-27 14:43:39:170] module.exports.onWebviewRequest.e.onIpcRequest
Error: UNKNOWN
[2019-03-27 14:43:39:196] WebviewPanel: Completed posting response(wv:2:qPG9VCtmQEOqilWkaPF3Gw) to the webview

The CodeStream Agent shows the following error:

[Error - 11:23:36 AM] [2019-03-27 15:23:36:182] ClientRequest.<anonymous>
FetchError: request to https://api.codestream.com/no-auth/login failed, reason: connect ETIMEDOUT
FetchError: request to https://api.codestream.com/no-auth/login failed, reason: connect ETIMEDOUT
    at ClientRequest.<anonymous> (~/.vscode/extensions/codestream.codestream-0.50.0/dist/agent.js:16:255208)
    at ClientRequest.emit (events.js:182:13)
    at ClientRequest.EventEmitter.emit (domain.js:442:20)
    at Socket.socketErrorListener (_http_client.js:382:9)
    at Socket.emit (events.js:182:13)
    at Socket.EventEmitter.emit (domain.js:442:20)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

The proxy I use is valid and have tried setting it with character encoding, without encoding and even using my http_proxy settings in my dotfiles. I've also set "http.proxyStrictSSL": false,

needs more info

Most helpful comment

It seems like it is working now.

Just need to invite people to team and test further. Thank you!

All 14 comments

@ethikz Sorry for the issue you are running into. Do you have "http.proxy" set to your proxy in your vscode settings? If not, can you try setting that and report back?

@eamodio I do have it set. Only difference is the one in my dot file is url encoded

Can you verify that this URL works in Chrome. It will test the proxy config outside of VS Code.

https://api.codestream.com/no-auth/status

That should simply return 'OK'

Yep, I get the message OK in the browser.

I do know the proxy works in VSCode though for other things as though. They all pull from my environment variable in my dotfile.

@ethikz We've released v0.51 and while I doubt it will fix your issue, it does have a bit of new logging that might help us figure out the issue. Can you try it and report back with logs (from both the CodeStream and CodeStream (Agent) output channel)? If you don't want to post the logs here, you can send them to: [email protected] and just put the issue number in the subject. Thanks!

@eamodio Sure, I'll update and try. If you could give me a few days, might be early next week, due to being at a 3 day hackathon.

@ethikz - Just wanted to follow up to see if you had a chance to grab some updated logs. Thanks!

@planteater, sorry for the late reply.

So I'm using 0.52.0-60 and I get the following error

From Agent

[Error - 10:12:46 AM] [2019-04-11 14:12:46:168] ClientRequest.<anonymous>
FetchError: request to https://api.codestream.com/no-auth/login failed, reason: connect ETIMEDOUT 23.22.69.228:443
FetchError: request to https://api.codestream.com/no-auth/login failed, reason: connect ETIMEDOUT 23.22.69.228:443
    at ClientRequest.<anonymous> (.vscode/extensions/codestream.codestream-0.52.0/dist/agent.js:23:204118)
    at ClientRequest.emit (events.js:182:13)
    at ClientRequest.EventEmitter.emit (domain.js:442:20)
    at TLSSocket.socketErrorListener (_http_client.js:382:9)
    at TLSSocket.emit (events.js:182:13)
    at TLSSocket.EventEmitter.emit (domain.js:442:20)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

From Codestream

[2019-04-11 14:14:57:862] WebviewPanel: Completed posting webview/focus/didChange to the webview
[2019-04-11 14:14:58:979] WebviewPanel: Completed posting webview/editor/didChangeVisibleRanges to the webview
[2019-04-11 14:14:59:489] WebviewPanel: Completed posting webview/editor/didChangeVisibleRanges to the webview
[2019-04-11 14:15:07:906] WebviewPanel: Completed posting webview/focus/didChange to the webview
[2019-04-11 14:15:13:840] WebviewPanel: FAILED posting webview/focus/didChange to the webview
[2019-04-11 14:16:23:296] WebviewPanel: Resuming communication...
[2019-04-11 14:16:23:297] WebviewPanel: Flushing pending queue
[2019-04-11 14:16:23:298] WebviewPanel: Completed posting webview/focus/didChange to the webview
[2019-04-11 14:16:23:298] WebviewPanel: Completed flushing pending queue
[2019-04-11 14:16:23:302] WebviewPanel: Completed posting webview/focus/didChange to the webview

When opening the js file and finding the line it is reporting, I see this function:

function en(e) {
    var t = this,
      n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
      r = n.size;
    let i = void 0 === r ? 0 : r;
    var o = n.timeout;
    let s = void 0 === o ? 0 : o;
    null == e ? e = null : "string" == typeof e || nn(e) || e instanceof Blob || Buffer.isBuffer(e) || "[object ArrayBuffer]" === Object.prototype.toString.call(e) || ArrayBuffer.isView(e) || e instanceof zt || (e = String(e)), this[Qt] = {
      body: e,
      disturbed: !1,
      error: null
    }, this.size = i, this.timeout = s, e instanceof zt && e.on("error", function (e) {
      const n = "AbortError" === e.name ? e : new Xt(`Invalid response body while trying to fetch ${t.url}: ${e.message}`, "system", e);
      t[Qt].error = n
    })
  }

@ethikz - Could I trouble you to send the complete output for the agent? Unfortunately what you sent above is missing the part we need. Thanks!

@planteater That is what the agent showed me minus the account I'm trying to log in to. Is there a specific thing you're looking for?

I have it set on debug.

@ethikz I need the full agent logs (output), so that I can see how it starts up, what proxy settings it was sent, etc. If you don't want to post the full logs here, please send them to [email protected] and use GH #43 as the subject line. Thanks!

@eamodio You should have received an email with logs attached.

@ethikz Thanks for the logs and I think we've fixed the issue in 0.52.1 which was just released. Can you try it out and report back? Thanks!

It seems like it is working now.

Just need to invite people to team and test further. Thank you!

Was this page helpful?
0 / 5 - 0 ratings