szimek / sharedrop

Easy P2P file transfer powered by WebRTC - inspired by Apple AirDrop
https://www.sharedrop.io
MIT License
9.94k stars 725 forks source link

Win 10 to Win 10 Chrome recipients on same network do not receive prompt to save file #81

Open Code-SQ opened 4 years ago

Code-SQ commented 4 years ago

Source: Chrome 78.0.3904.108 (64-bit) on Win 10 x64 desktop, connected to same AP by LAN Target: Chrome 78.0.3904.108 (64-bit) on Win 10 x64 laptop, connected to same AP by WiFi

On both devices, when trying to send any file (both large, over 500MB, and small, in mere KBs), the sharedrop.io would ask sender to confirm to send the file, but the recipient would never receive any request to accept the file. This issue occurs both ways. The sender would just get stuck with a blinking blue dot beside the target's avatar.

However, the transfer is successful if I used Android devices as one of the Source or Target devices on the same network connecting to the same AP via WiFi. Tested on all permutations of 2x Android vs 2x Win10 devices: A to A works (both ways), A to W works, W to A works, W to W doesn't work.

Anything that I can do to help troubleshoot? There are no visible feedback on the website other than the blinking blue dot.

lrq3000 commented 4 years ago

First off, my congratulations to make a WebRTC file sharing app that finally works in my company's firewalled network! I have tried peermesh, peertransfer and file.pizza before, and they all failed.

So I think I get a similar issue, but I tested between different networks (from my home to my company's network). I have tested with 2 browsers: Firefox 71.0 and Chrome 79.0.3945.88, both the latest stable builds, on Windows 10 (latest stable build too, on both computers). To summarize the tests, let's use H for home network, N for company's firewalled network, F for Firefox and C for Chrome.

Here are the results: HF-NF works, HC-NF works, HF-NC doesn't work, HC-NC doesn't work. These tests were done on both ways (ie, HF->NC doesn't work, and HF<-NC doesn't work either).

So the transfer only fails when Chrome is used inside the company's heavily firewalled network. The other way around (Chrome on my home network, but Firefox on company's network) works.

Here is the console log for HF<-NC, where just after confirming the Send on the sending end, I get the error message box "It was not possible to establish direct connection with the other peer":

DOMException: Failed to set the 'binaryType' property on 'RTCDataChannel': Blob support not implemented yet
    at https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3805:171
    at https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3806:279
    at https://www.sharedrop.io/assets/vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3892:117
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105 Peer:     State has changed:  idle
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152 Room:     Connecting to:  21930d5fa61cc30af371dfe184a9dea8
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152 Firebase: (Re)Connected
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:153 Room:     user_added:  Object
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152 Firebase: User added to the room
syndication.twitter.com/i/jot?l=%7B%22language%22%3A%22en%22%2C%22message%22%3A%22m%3A%22%2C%22widget_origin%22%3A%22https%3A%2F%2Fwww.sharedrop.io%2F%22%2C%22widget_frame%22%3A%7B%22href%22%3A%22https%3A%2F%2Fplatform.twitter.com%2Fwidgets%2Ftweet_button.html%3Furl%3Dhttps%253A%252F%252Fwww.sharedrop.io%26text%3DShareDrop%2520%25E2%2580%2593%2520easily%2520and%2520securely%2520share%2520files%2520of%2520any%2520size%2520directly%2520between%2520devices%2520using%2520your%2520browser%26count%3Dnone%22%2C%22ancestorOrigins%22%3A%7B%220%22%3A%22https%3A%2F%2Fwww.sharedrop.io%22%7D%2C%22origin%22%3A%22https%3A%2F%2Fplatform.twitter.com%22%2C%22protocol%22%3A%22https%3A%22%2C%22host%22%3A%22platform.twitter.com%22%2C%22hostname%22%3A%22platform.twitter.com%22%2C%22port%22%3A%22%22%2C%22pathname%22%3A%22%2Fwidgets%2Ftweet_button.html%22%2C%22search%22%3A%22%3Furl%3Dhttps%253A%252F%252Fwww.sharedrop.io%26text%3DShareDrop%2520%25E2%2580%2593%2520easily%2520and%2520securely%2520share%2520files%2520of%2520any%2520size%2520directly%2520between%2520devices%2520using%2520your%2520browser%26count%3Dnone%22%2C%22hash%22%3A%22%22%7D%2C%22_category_%22%3A%22tfw_client_event%22%2C%22triggered_on%22%3A1577774016155%2C%22dnt%22%3Afalse%2C%22client_version%22%3A%22cfadeaf%3A1576014006272%22%2C%22format_version%22%3A1%2C%22event_namespace%22%3A%7B%22client%22%3A%22tfw%22%2C%22page%22%3A%22button%22%2C%22section%22%3A%22share%22%2C%22action%22%3A%22impression%22%7D%7D:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:154 Room:     user_removed:  Object
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152 Room:     Connecting to:  da08160c-48b0-43a9-9bb2-f9bdab77be1d
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152 Firebase: (Re)Connected
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:153 Room:     user_added:  Object
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152 Firebase: User added to the room
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:153 Room:     user_added:  Object
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105 Peer:     State has changed:  idle
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105 Peer:     State has changed:  has_selected_file
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Creating RTCPeerConnection.
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Listening for ICE candidates.
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Listening for `negotiationneeded`
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Listening for data channel
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Listening for remote stream
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:161 Peer:     Opening data channel connection... o
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105 Peer:     State has changed:  establishing_connection
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  `negotiationneeded` triggered
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Created offer.
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Set localDescription: offer for: 7fc6ea20-2b97-11ea-982e-33da78c1fcfd
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Received ICE candidates for: 7fc6ea20-2b97-11ea-982e-33da78c1fcfd
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Setting remote description RTCSessionDescription
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Set remoteDescription: ANSWER for: 7fc6ea20-2b97-11ea-982e-33da78c1fcfd
4vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  Added ICE candidate for: 7fc6ea20-2b97-11ea-982e-33da78c1fcfd
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:160 Peer:     Data channel connection error Error: ICE connection state is 'failed'
    at s._handleMessage (vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3825)
    at vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3815
    at firebase.js:51
    at Db (firebase.js:46)
    at zb (firebase.js:22)
    at Ab (firebase.js:21)
    at Qh.g.Hb (firebase.js:204)
    at Ch.g.Id (firebase.js:192)
    at qh.Id (firebase.js:183)
    at ih.xg (firebase.js:181)
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105 Peer:     State has changed:  error
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803 PeerJS:  ICE connection state is 'disconnected', closing connections to 7fc6ea20-2b97-11ea-982e-33da78c1fcfd
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:160 Peer:     Data channel connection error Error: ICE connection state is 'disconnected'
    at RTCPeerConnection.t.oniceconnectionstatechange [as onicechange] (vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3877)
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105 Peer:     State has changed:  idle

And here's for HF -> NC (formatting a little bit different since it's from Firefox), where the connection just hangs up after confirming the sending on the sender side (I click on the Send button, then there is a never-ending blinking dot on the left of the target user name, whereas normally I should either get an error or another message box confirming I am waiting for the target user to accept):

unreachable code after return statement vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:1984
Peer:    State has changed:  idle share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105:143
Room:    Connecting to:  c049056f-58a6-470b-b6b5-79829b973257 share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152:186
Firebase: (Re)Connected share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152:281
Room:    user_added:  
Object { avatarUrl: "/assets/images/avatars/102.svg", label: "Exuberant Penguin", peer: {…}, public_ip: "82.212.129.73", uuid: "fa68a700-2b97-11ea-982e-33da78c1fcfd" }
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:153:9
Firebase: User added to the room share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:152:440
Room:    user_added:  
Object { avatarUrl: "/assets/images/avatars/71.svg", label: "Honest Bear", public_ip: "139.165.114.207", uuid: "76cdb430-2b97-11ea-982e-33da78c1fcfd" }
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:153:9
Peer:    State has changed:  idle share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105:143
unreachable code after return statement vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:1984
Peer:    State has changed:  has_selected_file share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105:143
PeerJS:  Creating RTCPeerConnection. vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
onaddstream is deprecated! Use peerConnection.ontrack instead. vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3881
PeerJS:  Listening for ICE candidates. vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Listening for `negotiationneeded` vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Listening for data channel vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Listening for remote stream vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
Peer:    Opening data channel connection... 
Object { _events: {…}, options: {…}, open: false, type: "data", peer: "76cdb430-2b97-11ea-982e-33da78c1fcfd", provider: {…}, id: "dc_8oj2zcv184p", label: "file", metadata: {}, serialization: "none", … }
share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:161:9
Peer:    State has changed:  establishing_connection share-drop-4a2284aff1d8e3e4885d2450a23abe62.js:105:143
PeerJS:  `negotiationneeded` triggered vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Created offer. vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Set localDescription: offer for: 76cdb430-2b97-11ea-982e-33da78c1fcfd vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Received ICE candidates for: 76cdb430-2b97-11ea-982e-33da78c1fcfd 4 vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Setting remote description 
RTCSessionDescription { type: "answer", sdp: "v=0\r\no=- 5344404166868229314 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:1ujg\r\na=ice-pwd:hPu/LEsvmTAGXTFDSU35aUFy\r\na=ice-options:trickle\r\na=fingerprint:sha-256 3C:60:12:09:20:46:62:1B:FE:D4:E6:DB:62:39:23:00:0B:91:FA:2B:74:2F:10:62:D9:14:28:5B:F0:96:FE:B5\r\na=setup:active\r\na=mid:0\r\na=sctp-port:5000\r\na=max-message-size:262144\r\n" }
vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Set remoteDescription: ANSWER for: 76cdb430-2b97-11ea-982e-33da78c1fcfd vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
PeerJS:  Added ICE candidate for: 76cdb430-2b97-11ea-982e-33da78c1fcfd vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:3803:46
unreachable code after return statement vendor-6deb0f828efb7a002b3c4761e62c6e4d.js:1984

Hope this helps debug this out, let me know if you need any additional detail.

ANDALACA commented 4 years ago

Another thing could simply be that you are sharing a complete room link. Just found out that when i have two Chromium Edge incognito windows open and share the room id/link, popups won't appear. However, if i just go to sharedrop.io in both windows, sharing works fine!

lrq3000 commented 4 years ago

I shared the same link across browsers and computers, so this was not the culprit of the issue in my case.

Le lun. 8 juin 2020 à 22:28, embql notifications@github.com a écrit :

Another thing could simply be that you are sharing a complete room link. Just found out that when i have two Chromium Edge incognito windows open and share the room id/link, popups won't appear. However, if i just go to sharedrop.io in both windows, sharing works fine!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cowbell/sharedrop/issues/81#issuecomment-640868006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIRFXVKOJMLTTQDVSP4NW3RVVCVHANCNFSM4JRXEWIQ .