-
Notifications
You must be signed in to change notification settings - Fork 3.9k
WebRTC SCTP data channels transmit/receive no data to/from Chrome/Chromium 32+, FF28+ #1526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tested nw 0.9.1 linux. It's working with Chrome 32. The demo I'm using is https://bitbucket.org/webrtc/codelab/overview step7 folder with this patch to use SCTP: diff --git a/complete/step7/js/main.js b/complete/step7/js/main.js
index 7daf56c..0dc7f4c 100644
--- a/complete/step7/js/main.js
+++ b/complete/step7/js/main.js
@@ -161,7 +161,7 @@ function createPeerConnection() {
try {
// Reliable Data Channels not yet supported in Chrome
sendChannel = pc.createDataChannel("sendDataChannel",
- {reliable: false});
+ {reliable: true});
sendChannel.onmessage = handleMessage;
trace('Created send data channel');
} catch (e) { |
Ok - thanks for providing the link. I will check what might be the difference with my code and maybe i find the reason or can provide an example which does not work. |
Hi! I'm trying to get work following code with peerjs. <script src="http://cdn.peerjs.com/0.3/peer.js"></script>
<script>
var peer = new Peer('someid1', {host: 'localhost', port: 9000});
// ADDED THIS:
peer.on('open', function(id) {
console.log('My Peer is is: ' + id)
var conn = peer.connect('someid2', {reliable:true});
console.log(conn.label)
console.log("REMOTE connecting to LOCAL", conn)
conn.on('error', function(err) {
console.log('error')
console.log(err)
});
conn.on('data', function(data) {
console.log('on data')
console.log('Received', data);
});
conn.on('open', function(){
console.log("connect to REMOTE opened", conn);
console.log('before sending hi')
conn.send('hi!');
});
});
peer.on('close', function() {
console.log('peer destroyed')
});
peer.on('error', function(err) {
console.log('error peer')
console.log(err)
});
</script> Here is remote peer code which accepts connections and data peer2.html: <script src="http://cdn.peerjs.com/0.3/peer.js"></script>
<script>
var peer = new Peer('someid1', {host: 'localhost', port: 9000});
// ADDED THIS:
peer.on('open', function(id) {
console.log('My Peer is is: ' + id)
var conn = peer.connect('someid2', {reliable:true});
console.log(conn.label)
console.log("REMOTE connecting to LOCAL", conn)
conn.on('error', function(err) {
console.log('error')
console.log(err)
});
conn.on('data', function(data) {
console.log('on data')
console.log('Received', data);
});
conn.on('open', function(){
console.log("connect to REMOTE opened", conn);
console.log('before sending hi')
conn.send('hi!');
});
});
peer.on('close', function() {
console.log('peer destroyed')
});
peer.on('error', function(err) {
console.log('error peer')
console.log(err)
});
</script> If I run these code in different window chrome browsers then I get such output: peer2.html >>>> But when I launch index.html in node-webkit then following output I get: peer2.html>>>>> So, connection is established but no data is transmitted or no 'data' event emitted. Chrome browser version Version 33.0.1750.117 And all above code works there Node-webkit chromium version Version 32.0.1700.107 (1700.107) Any ideas? Maybe trouble in Chromium version? Is there any instructions how to build node-webkit with fresh chromium? |
All right - i am not able to reproduce this with node-webkit 0.9.2. SCTP Data channels work fine with 0.9.2 so i am closing this. |
@rogerwang: node-webkit can communicate fine with Chrome 32 but not with Chrome 33 or later. This seems to be a Chrome 32 issue. The same issue can be found in Chromium 32.0.1700.77. This is the same version as the Chromium Version in node-webkit 0.9.2 and these too talk fine to each other. But both cannot speak to Chromium 33+. I think that you guys cannot do much about it other than upgrading to Chromium 33 - feel free to keep it open or close it. I was not able to find a workaound to make Chromium 32.0.1700.77 talk to anyone other that itself. |
@longsleep nw 0.9.2 is updated to Chromium 32.0.1700.107. Does that version have the bug as well? |
@rogerwang: sorry i meant 32.0.1700.107. The same Version is in Ubuntu too - and it has the same Problem. It is exactly varuzhnikov described above with node-webkit. To test one can install Spreed Speak Freely https://github.com/strukturag/spreed-speakfreely |
Are there any updates for this issue? As previously said, it's currently impossible to send data using DataChannels to Chromium v33+. Is node-webkit going to be updated soon to a newer Chromium release? |
👍 got bit by this just today, after spending a few hours trying to figure out why my client refuses to work in node-webkit. |
This is bug in the Chromium version included with node-webkit 0.9. Try with 0.10.0-rc1 when it is available. |
Thanks for the update, will do. I'm afraid to embark on the compilation journey myself, so I guess I'll wait :) |
Since a couple of hours there are automatic builds - check your code with the latest build and report back. |
@rogerwang: Live builds are great. http://dl.node-webkit.org/live-build/06-21-2014/linux64_master-build-55-633e3d5-b0d0757-cf7702c-8fb09a0-d54520d-86728d1/ fixes the problem for me. So i am tempted to close this. @jure: Please let us know if it works for you too. |
Closing as it works in nw 0.10. |
Yes, very sorry for the delay, I also confirm that DataChannels now work as expected. P.S.: Live builds are fantastic! |
The WebRTC data channels in node-webkit 0.9.0-rc1 do not work when connected with a peer which is not node-webkit 0.9.0-rc1. Funny thing is that Opera 19.0.1326.47 seems to have the very same issue and can only transfer SCTP data with itself or with node-webkit.
Chrome all versions including 32.0.1700.77 work fine with all later Chrome versions and also with Firefox 28 and 29.
I saw the very same issue with a single Chromium release in the past (see https://code.google.com/p/chromium/issues/detail?id=324484), but the issue went away with later Chromium. So maybe some setting or third party library is responsible which was not updated with the node-webkit 0.9.0-rc1 build and thus the SCTP data channels are somehow not compatible with the ones in Chromium builds and FF.
I will add the same issue to Opera.
Test case:
What is the expected behavior?
The string sent should be received on the other end.
What went wrong?
Nothing is received, no matter if sent from 32 or 33 or from 33 to 32 or Firefox 29. No errors are raised on the Javascript side either.
Works with when connected to another node-webkit 0.9.0-rc1 or to Opera 19.
The text was updated successfully, but these errors were encountered: