Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Issues listening for incoming signals behind a proxy #192

Closed
jrschumacher opened this issue Nov 15, 2017 · 24 comments
Closed

Issues listening for incoming signals behind a proxy #192

jrschumacher opened this issue Nov 15, 2017 · 24 comments

Comments

@jrschumacher
Copy link

jrschumacher commented Nov 15, 2017

Originally reported by @matt-hammond-bbc on Nov 16th 2017

I'm having issues when behind a corporate proxy (http, https, socks). The initial login is successful, but attempts to activate sharing timeout with the error message:

Timed out while subscribing to incoming signals

Teletype 0.1.2
Atom 1.22.1
Mac OS X 10.12.6
Proxies configured through Preferences and as environment variables http[s]_proxy and HTTP[S]_PROXY.

@dwaq
Copy link

dwaq commented Nov 15, 2017

I'm also have issues behind a proxy. Would love to see this one fixed.

@ghost
Copy link

ghost commented Nov 15, 2017

Also not working behind a proxy here.

My setup is a bit more complex (no local DNS on the local network, HTTP proxy that actively breaks SSL encryption for security inspection) and the symptoms are a bit different (trying to create a share results in "Attempting to share a portal failed with error: Timed out while subscribing to incoming signals"). I'll subscribe to this bug report for now and will create a separate bug if it looks warranted.

@mkchandler
Copy link

I'm having the same exact issue that @dsnellgrove is having.

@nathansobo
Copy link
Contributor

Thanks for the reports. We'll take a look 🔜.

@matt-hammond-001
Copy link

+1

I'm also having issues when behind a corporate proxy (http, https, socks). The initial login is successful, but attempts to activate sharing timeout with the error message:

Timed out while subscribing to incoming signals

Teletype 0.1.2
Atom 1.22.1
Mac OS X 10.12.6
Proxies configured through Preferences and as environment variables http[s]_proxy and HTTP[S]_PROXY.

@as-cii
Copy link
Contributor

as-cii commented Nov 16, 2017

Hello everyone! We care a lot about connectivity issues, so thank you all for the detailed reports! ✨

Configuring a proxy server like the ones described in this issue is unfortunately non-trivial. So far, we're several hours into trying to reproduce it, but haven't yet had any luck. To help us diagnose the issue, do you think you could provide a Dockerfile or a Vagrant image that we can then use to reproduce this locally? Once we track down the cause of this problem, we will start working on a fix as soon as possible.

Thanks for your help in making teletype better! 🙇

@mkchandler
Copy link

@as-cii The problem we are having is really at the network layer, not the local machine layer. Because my company intercepts all traffic and uses their own certs, the app thinks there is a man-in-the-middle attack (which technically there is). This is a common thing unfortunately in corporate environments.

Many pieces of software such as npm, Atom, VS Code, etc. have workarounds for this. For instance, Atom has the following setting: http://flight-manual.atom.io/getting-started/sections/installing-atom/#behind-a-firewall

Are there maybe some more detailed logs I can provide from Atom? I realize also that the issue myself and a few others in this thread are having may be slightly different than the OP; should a new issue be opened?

@jdell64
Copy link

jdell64 commented Nov 16, 2017

Same issue here. Running cntlm... apm works... Is there a verbose flag to call when trying to connect?

I should note that I am able to get a response from https://api.teletype.atom.io/protocol-version , but i get this error in atom:

Failed to share portal
Attempting to share a portal failed with error: Timed out while subscribing to incoming signals

which comes from:

https://github.com/atom/teletype-client/blob/2d7086f6d66a7d54f58ebe0a9850e1ccd3cb9601/lib/peer-pool.js#L32

const timeoutError = new Errors.PubSubConnectionError('Timed out while subscribing to incoming signals')

Indicating a timeout error when trying to share.

@as-cii
Copy link
Contributor

as-cii commented Nov 17, 2017

First of all, thanks @mkchandler and @jdell64 for the additional information! It seems like the majority of the problems are coming from Pusher somehow. I wonder if we can collect more data related to what is going wrong during the connection to their service.

Two things you can do to help us debug this:

  • In Chrome, visit https://test.pusher.com and post here what you see. This will help us understand if the connectivity issue can be attributed to Atom only, or if there's something fundamentally wrong with using Pusher behind a proxy.
  • In Atom, after opening the DevTools (CmdAlti on macOS, or alternatively click on the menu View->Developer->Toggle Developer Tools) do the following:
    • Enable Pusher logging by running the following in the DevTools Console:
      atom.packages.getLoadedPackage('teletype').mainModule.client.pubSubGateway.pusherClient.constructor.logToConsole = true
      
    • Share a portal
    • Post everything that is getting logged to the DevTools Console

Given that most of you can reach https://api.teletype.atom.io, I am unclear on why Pusher is not falling back to long-polling, assuming that WebSockets can't be used. I think the above steps will give us a sense of what is happening exactly so that we can get to the bottom of this. Thanks for your help!

@matt-hammond-001
Copy link

@as-cii ... thanks for looking into this. Here's the output you requested:

test.pusher.com:

11:56:51 debug Pusher : No callbacks on presence-channel for pusher:subscription_succeeded
11:56:51 debug Pusher : Event recd : {"event":"pusher_internal:subscription_succeeded","data":{"presence":{"count":4,"ids":["396","407","46","939"],"hash":{"46":null,"396":null,"407":null,"939":null}}},"channel":"presence-channel"}
11:56:51 debug Pusher : Event sent : {"event":"pusher:subscribe","data":{"auth":"a0173cd5499b34d93109:a213cefedb44557fccb3d303bb7b9403408509fcf735ed1128304bbc754ded5c","channel_data":"{"user_id":939}","channel":"presence-channel"}}
11:56:51 status connected
11:56:51 debug Pusher : State changed : connecting -> connected with new socket ID 226225.535514
11:56:50 debug session id: 854766036
11:56:50 debug Pusher : Connecting : {"transport":"ws","url":"wss://ws-mt1.pusher.com:443/app/a0173cd5499b34d93109?protocol=7&client=js&version=4.2.1&flash=false"}
11:56:50 debug Pusher : State changed : initialized -> connecting

Developer console:

"Share" toggle clicked to enable sharing....

/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : State changed : disconnected -> connecting
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"ws","url":"wss://ws.pusherapp.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}

... At this point, the failure notification appears: "Failed to share portal. Attempting to share a portal failed with error: Timed out while subscribing to incoming signals" ...

/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_polling","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : State changed : connecting -> unavailable
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"ws","url":"wss://ws.pusherapp.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_polling","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"ws","url":"wss://ws.pusherapp.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/matteh/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_polling","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}

@jrschumacher
Copy link
Author

@matt-hammond-bbc Going to test.pusher.com is fine. Here are the results, but when I enable teletype. I cannot get past this point.

atom.packages.getLoadedPackage('teletype').mainModule.client.pubSubGateway.pusherClient.constructor.logToConsole = true
true
/Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:48 teletype: Using pusher key: xxxxxxxxxxxxxxxxxxxxxx
/Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:49 teletype: Using base URL: https://api.teletype.atom.io
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
authenticationProviderPromise.Promise @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:164
getAuthenticationProvider @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:163
signInUsingSavedToken @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:121
activate @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:63
module.exports.Package.activateNow @ <embedded>:70800
(anonymous) @ <embedded>:70772
module.exports.Package.measure @ <embedded>:70646
(anonymous) @ <embedded>:70765
module.exports.Package.activate @ <embedded>:70762
activatePackage @ <embedded>:24140
packagesToEnable.forEach.name @ <embedded>:23889
disabledPackagesSubscription.config.onDidChange @ <embedded>:23889
(anonymous) @ <embedded>:21336
module.exports.Emitter.simpleDispatch @ <embedded>:64210
module.exports.Emitter.emit @ <embedded>:64326
module.exports.Config.emitChangeEvent @ <embedded>:21527
module.exports.Config.setRawValue @ <embedded>:21313
module.exports.Config.set @ <embedded>:20891
module.exports.Config.removeAtKeyPath @ <embedded>:21050
module.exports.Package.enable @ <embedded>:70631
enablePackage @ <embedded>:23695
enablementButtonClickHandler @ <embedded>:193603
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
authenticationProviderPromise.Promise @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:164
getAuthenticationProvider @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:163
signInUsingSavedToken @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:121
activate @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:63
module.exports.Package.activateNow @ <embedded>:70800
(anonymous) @ <embedded>:70772
module.exports.Package.measure @ <embedded>:70646
(anonymous) @ <embedded>:70765
module.exports.Package.activate @ <embedded>:70762
activatePackage @ <embedded>:24140
packagesToEnable.forEach.name @ <embedded>:23889
disabledPackagesSubscription.config.onDidChange @ <embedded>:23889
(anonymous) @ <embedded>:21336
module.exports.Emitter.simpleDispatch @ <embedded>:64210
module.exports.Emitter.emit @ <embedded>:64326
module.exports.Config.emitChangeEvent @ <embedded>:21527
module.exports.Config.setRawValue @ <embedded>:21313
module.exports.Config.set @ <embedded>:20891
module.exports.Config.removeAtKeyPath @ <embedded>:21050
module.exports.Package.enable @ <embedded>:70631
enablePackage @ <embedded>:23695
enablementButtonClickHandler @ <embedded>:193603
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:99
module.exports.Provider.provide @ <embedded>:127767
module.exports.ServiceHub.consume @ <embedded>:70516
module.exports.Package.activateServices @ <embedded>:71001
module.exports.Package.activateNow @ <embedded>:70803
(anonymous) @ <embedded>:70772
module.exports.Package.measure @ <embedded>:70646
(anonymous) @ <embedded>:70765
module.exports.Package.activate @ <embedded>:70762
activatePackage @ <embedded>:24140
packagesToEnable.forEach.name @ <embedded>:23889
disabledPackagesSubscription.config.onDidChange @ <embedded>:23889
(anonymous) @ <embedded>:21336
module.exports.Emitter.simpleDispatch @ <embedded>:64210
module.exports.Emitter.emit @ <embedded>:64326
module.exports.Config.emitChangeEvent @ <embedded>:21527
module.exports.Config.setRawValue @ <embedded>:21313
module.exports.Config.set @ <embedded>:20891
module.exports.Config.removeAtKeyPath @ <embedded>:21050
module.exports.Package.enable @ <embedded>:70631
enablePackage @ <embedded>:23695
enablementButtonClickHandler @ <embedded>:193603
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:99
module.exports.Provider.provide @ <embedded>:127767
module.exports.ServiceHub.consume @ <embedded>:70516
module.exports.Package.activateServices @ <embedded>:71001
module.exports.Package.activateNow @ <embedded>:70803
(anonymous) @ <embedded>:70772
module.exports.Package.measure @ <embedded>:70646
(anonymous) @ <embedded>:70765
module.exports.Package.activate @ <embedded>:70762
activatePackage @ <embedded>:24140
packagesToEnable.forEach.name @ <embedded>:23889
disabledPackagesSubscription.config.onDidChange @ <embedded>:23889
(anonymous) @ <embedded>:21336
module.exports.Emitter.simpleDispatch @ <embedded>:64210
module.exports.Emitter.emit @ <embedded>:64326
module.exports.Config.emitChangeEvent @ <embedded>:21527
module.exports.Config.setRawValue @ <embedded>:21313
module.exports.Config.set @ <embedded>:20891
module.exports.Config.removeAtKeyPath @ <embedded>:21050
module.exports.Package.enable @ <embedded>:70631
enablePackage @ <embedded>:23695
enablementButtonClickHandler @ <embedded>:193603
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
portalBindingManagerPromise.Promise @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:184
getPortalBindingManager @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:183
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:100
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
portalBindingManagerPromise.Promise @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:184
getPortalBindingManager @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:183
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:100
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
authenticationProviderPromise.Promise @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:164
getAuthenticationProvider @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:163
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:101
/Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16 GET https://api.teletype.atom.io/protocol-version net::ERR_TUNNEL_CONNECTION_FAILED
get @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/rest-gateway.js:16
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:27
getClient @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:203
authenticationProviderPromise.Promise @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:164
getAuthenticationProvider @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:163
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:101
/Users/rschumacher/.atom/packages/teletype/lib/popover-component.js:33 Uncaught (in promise) TypeError: Cannot read property 'isSignedIn' of null
    at PopoverComponent.render (/Users/rschumacher/.atom/packages/teletype/lib/popover-component.js:33)
    at Object.initialize (/Users/rschumacher/.atom/packages/teletype/node_modules/etch/lib/component-helpers.js:32)
    at new PopoverComponent (/Users/rschumacher/.atom/packages/teletype/lib/popover-component.js:14)
    at new PortalStatusBarIndicator (/Users/rschumacher/.atom/packages/teletype/lib/portal-status-bar-indicator.js:10)
    at TeletypePackage.consumeStatusBar (/Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:102)
render @ /Users/rschumacher/.atom/packages/teletype/lib/popover-component.js:33
initialize @ /Users/rschumacher/.atom/packages/teletype/node_modules/etch/lib/component-helpers.js:32
PopoverComponent @ /Users/rschumacher/.atom/packages/teletype/lib/popover-component.js:14
PortalStatusBarIndicator @ /Users/rschumacher/.atom/packages/teletype/lib/portal-status-bar-indicator.js:10
consumeStatusBar @ /Users/rschumacher/.atom/packages/teletype/lib/teletype-package.js:102

@dwaq
Copy link

dwaq commented Nov 17, 2017

I'm on Windows 7 and my pusher test results are very similar to @matt-hammond-bbc
07:44:56 debug Pusher : Event sent : {"event":"pusher:ping","data":{}} 07:42:56 debug Pusher : No callbacks on presence-channel for pusher:subscription_succeeded 07:42:56 debug Pusher : Event recd : {"event":"pusher_internal:subscription_succeeded","data":{"presence":{"count":2,"ids":["225","46"],"hash":{"46":null,"225":null}}},"channel":"presence-channel"} 07:42:56 debug Pusher : Event sent : {"event":"pusher:subscribe","data":{"auth":"a0173cd5499b34d93109:20c8773cbce29aee5440615d684b482d9064f93a67168d6807684f7c9a2476c6","channel_data":"{\"user_id\":225}","channel":"presence-channel"}} 07:42:56 status connected 07:42:56 debug Pusher : State changed : connecting -> connected with new socket ID 226019.553292 07:42:55 debug session id: 855871847 07:42:55 debug Pusher : Connecting : {"transport":"ws","url":"wss://ws-mt1.pusher.com:443/app/a0173cd5499b34d93109?protocol=7&client=js&version=4.2.1&flash=false"} 07:42:55 debug Pusher : State changed : initialized -> connecting

However after the share, I get the error "Failed to share portal
Attempting to share a portal failed with error: Timed out while subscribing to incoming signals", and then I get this info on the dev console:
Pusher : Connecting : {"transport":"ws","url":"wss://ws.pusherapp.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"} C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"} C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : Connecting : {"transport":"xhr_polling","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"} C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : TimelineSender Error: received 0 from stats.pusher.com C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : Connecting : {"transport":"ws","url":"wss://ws.pusherapp.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"} C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"} C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : Connecting : {"transport":"xhr_polling","url":"https://sockjs.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"} C:\Users\z003ruax\.atom\packages\teletype\node_modules\pusher-js\dist\node\pusher.js:157 Pusher : TimelineSender Error: received 0 from stats.pusher.com

So I'm getting TimelineSender Error: received 0 from stats.pusher.com instead of State changed : connecting -> unavailable

@jdell64
Copy link

jdell64 commented Nov 17, 2017

at pusher, no errors that I can see. console has this though:

Pusher : State changed : initialized -> connecting
app.js:125 Pusher : Connecting : {"transport":"ws","url":"wss://ws-mt1.pusher.com:443/app/a0173cd5499b34d93109?protocol=7&client=js&version=4.2.1&flash=false"}
/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)
VM42:164 WebSocket connection to 'wss://ws-mt1.pusher.com/app/a0173cd5499b34d93109?protocol=7&client=js&version=4.2.1&flash=false' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED
WrappedWebSocket @ VM42:164
app.js:125 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs-mt1.pusher.com:443/pusher/app/a0173cd5499b34d93109?protocol=7&client=js&version=4.2.1"}
app.js:125 Pusher : State changed : connecting -> connected with new socket ID 226310.139328
app.js:125 Pusher : Event sent : {"event":"pusher:subscribe","data":{"auth":"a0173cd5499b34d93109:5d3758d7ac4a426c888bd58eb253ff4754c1bf4c4b910cd0a95c37dea2999888","channel_data":"{\"user_id\":593}","channel":"presence-channel"}}
app.js:125 Pusher : Event recd : {"event":"pusher_internal:subscription_succeeded","data":{"presence":{"count":2,"ids":["46","593"],"hash":{"46":null,"593":null}}},"channel":"presence-channel"}
app.js:125 Pusher : No callbacks on presence-channel for pusher:subscription_succeeded

a 404 for a favicon, and a ERR_NAME_NOT_RESOLVED for the websocket connection.

Nothing in the atom console unfortunately:

after a few seconds, i started getting a few logs:

atom.packages.getLoadedPackage('teletype').mainModule.client.pubSubGateway.pusherClient.constructor.logToConsole = true
true
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"ws","url":"wss://ws-mt1.pusher.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"}
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs-mt1.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : TimelineSender Error: received 0 from stats.pusher.com
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_polling","url":"https://sockjs-mt1.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"ws","url":"wss://ws-mt1.pusher.com:443/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1&flash=false"}
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs-mt1.pusher.com:443/pusher/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.1"}
/Users/rtindell/.atom/packages/teletype/node_modules/pusher-js/dist/node/pusher.js:157 Pusher : TimelineSender Error: received 0 from stats.pusher.com

@as-cii
Copy link
Contributor

as-cii commented Nov 17, 2017

Thanks everyone for the replies! After your super helpful feeback we have investigated this issue a little further and found a potential issue with the pusher client library that we were using. ✨ If you are interested, you can read more about the upcoming fix at atom/teletype-client#38.

I will post an update here as well when the fix is published in a new version of the teletype package.

@matt-hammond-001
Copy link

@as-cii 👍🏼

@youngjuning
Copy link

@as-cli Thanks for your work

@as-cii
Copy link
Contributor

as-cii commented Nov 17, 2017

We have just published Teletype v0.1.4 ⚡️

I will leave this issue open for now, but please let us know if it solves the connectivity problem for you. Thanks! 🙇

@dwaq
Copy link

dwaq commented Nov 17, 2017

It looks like it solved my issue. 🙌 It generated an ID for me. I don't know how to test any further than that.

@bac
Copy link

bac commented Nov 17, 2017

Did not help for me. Still get "Failed to initialize the teletype package. Establishing a teletype connection failed with error: Failed to fetch"

Nothing in the Console when I disable/enable teletype.

@mkchandler
Copy link

@as-cii The update to v0.1.4 solved my issue! Thanks so much!

@matt-hammond-001
Copy link

@as-cii - many thanks - also works for me!

@jdell64
Copy link

jdell64 commented Nov 17, 2017

Solved on my end as well.

@as-cii as-cii changed the title Fetch /protocol-version - 407 Proxy Authentication Required Issues listening for incoming signals behind a proxy Nov 17, 2017
@ghost
Copy link

ghost commented Nov 17, 2017

Fixed here too!

@as-cii
Copy link
Contributor

as-cii commented Nov 17, 2017

Awesome, thanks everyone for the reports! ❤️

It seems like some users are still having issues reaching api.teletype.atom.io behind a proxy, so I went ahead and:

@as-cii as-cii closed this as completed Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants