teletype icon indicating copy to clipboard operation
teletype copied to clipboard

attempting to join portal failed with error: connecting to peer timed out

Open ghost opened this issue 7 years ago • 9 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:

Description

Whenever I try to join a portal, I get the error "Failed to join portal. Attempting to join portal failed with error: Connecting to peer timed out". The same thing happens whenever other teletype users attempt to join a portal that I've created.

Steps to Reproduce

  1. Click teletype icon in status bar
  2. Enter portal URL and click "Join" button

or

  1. Click teletype icon in status bar
  2. Click "Share" toggle
  3. Other teletype user tries to join portal via the URL

Expected behavior:

In the first case, I should be able to join the other user's portal. In the second case, the other user should be able to join my portal.

Actual behavior:

When I attempt to join a portal, the attempt fails, and I get a popup error message. The title of the message is "Failed to join portal", and the body of it says "Attempting to join portal failed with error: Connecting to peer timed out".

When other users attempt to join a portal I've created, they get the same error.

Reproduces how often:

This happens every single time.

Versions

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

Atom : 1.27.1 Electron: 1.7.15 Chrome : 58.0.3029.110 Node : 7.9.0

apm 1.19.0 npm 3.10.10 node 6.9.5 x64 atom 1.27.1 python 2.7.12 git 2.7.4

I'm running Ubuntu 16.04. Output of uname -a is Linux valtari 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Additional Information

  • The other users (i.e., the ones who cannot connect to my portals, and to whose portals I cannot connect) can both create portals and connect to other people's portals, so I'm pretty sure the problem lies with me.
  • The google internet speed test reports that my internet is very fast (about 90Gb/s up and down; I'm on a fast university campus network), so I don't think network speed is an issue.
  • I contacted the residence network administrators to check whether they were blocking peer-to-peer traffic, but they said they were not.

Here is a (possibly) relevant bit from the console in the developer tools:

index.html:1 WebSocket connection to 'wss://ws-mt1.pusher.com/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.2&flash=false' failed: WebSocket is closed before the connection is established.
/home/matthew/.atom/packages/teletype/lib/teletype-package.js:51 teletype: Using pusher key: f119821248b7429bece3
/home/matthew/.atom/packages/teletype/lib/teletype-package.js:52 teletype: Using base URL: https://api.teletype.atom.io
index.coffee? [sm]:140 Uncaught (in promise) TypeError: treeViewPkg.mainModule.treeView.find is not a function
    at index.coffee? [sm]:108
    at <anonymous>
(anonymous) @ index.coffee? [sm]:140

ghost avatar May 30 '18 20:05 ghost

Thanks for the report - if it's easy to test, if you connect to a different network and try again, does that make a difference?

Also, what version of Teletype are you running?

index.html:1 WebSocket connection to 'wss://ws-mt1.pusher.com/app/f119821248b7429bece3?protocol=7&client=js&version=4.2.2&flash=false' failed: WebSocket is closed before the connection is established.

Don't know if it's related but x-ref: https://github.com/atom/teletype/issues/320 where that message was mentioned.

rsese avatar May 31 '18 20:05 rsese

I'm running teletype 0.13.3, the latest version.

As far as testing a different network, I can do it with a different computer, but my main one is a desktop so it's not easy to connect to something else :)

ghost avatar May 31 '18 20:05 ghost

A bit of further info: my desktop computer is a wired connection. I tried today with my laptop (same OS, same versions of atom and teletype) using the wireless network and had the same results: the attempts time out every time. So it seems likely that the problem involves the network somehow.

As I said, I contacted the network admins but they couldn't say much. If you need any specific information about the network to help diagnose the problem, though, I can ask. I will try next week with my laptop from a different network to see if that works.

I will also try with my wife's Mac from this network when I get the chance.

ghost avatar Jun 01 '18 16:06 ghost

I tried from the same network with a mac (OSX 10.11.6) running the most recent versions of Atom and Teletype, and it still failed: could not connect to others, and others could not connect to me. Here is the output from my colleague's console when he couldn't connect to me:

4/home/jdfadams/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/utils.js:123 RTCIceServer.url is deprecated, please use RTCIceServer.urls instead.
deprecated @ /home/jdfadams/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/utils.js:123
window.RTCPeerConnection @ /home/jdfadams/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js:589
PeerConnection @ /home/jdfadams/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-connection.js:37
getPeerConnection @ /home/jdfadams/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-pool.js:172
connectTo @ /home/jdfadams/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-pool.js:89
connectTo @ /home/jdfadams/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/star-overlay-network.…:45
join @ /home/jdfadams/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/portal.js:95
joinPortal @ /home/jdfadams/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/teletype-client.js:139

So it seems most likely that it's some problem with the way the network is run.

ghost avatar Jun 02 '18 01:06 ghost

I've done further testing with different machines and networks that seems to confirm the problem is with the network:

  1. Ubuntu desktop on university network: Teletype doesn't work.
  2. Ubuntu laptop on university network: Teletype doesn't work.
  3. Mac laptop on university network: Teletype doesn't work.
  4. (Same) Ubuntu laptop on two different non-university networks: Teletype works fine.

ghost avatar Jun 05 '18 18:06 ghost

Thanks for narrowing things down @mbtuckersimm 👍 Based on your testing, it does seem like something about your university network might be the issue.

Besides the console tab in devtools, are there any error responses in the network tab that you can see?

rsese avatar Jun 11 '18 21:06 rsese

Wow, no one has a simple and direct solution to this problem..

ja6ezz avatar Jul 18 '19 12:07 ja6ezz

This issue still persists. I'm still getting connecting to peer timed out errors. Every single time.

DankTestAcc avatar Jun 01 '20 19:06 DankTestAcc

Also still happening on MacOS and Windows 10. Forces our hand to switch to VS Code...

tessapower avatar Jun 17 '21 03:06 tessapower