Closed mjsobrep closed 4 years ago
I was able to get Firefox running again, but it took some considerable work: the JavaScript code needed to be updated and Firefox sends at least one invalid ICE candidate during the initial setup phase.
I will probably commit a fix in the next one or two weeks.
cool, thanks
I pushed two commits to the develop branch. The changes only affect the webrtc_ros
package, so you can still use the pre-packaged webrtc
package (and avoid building gigabytes of source code).
Let me know if that resolves your problem.
Sorry for being so slow to test this. I'm still having similar problems. In chrome everything still works, but not in Firefox. As you can see in the image below, I am running the new, modified code. But in Firefox connection issues are still coming up.
Weirdly enough, I can make it work in Firefox alright. I have added every single remaining patch that I was working on, even though I don't believe they are related. The only thing left that might actually have an impact is this PR for async_web_server_cpp.
Another thing that I might have communicated poorly: You do not need to rebuild the webrtc
package which merely compiles the (external) WebRTC codebase, but you do need to rebuild the webrtc_ros
package that implements the server node. It needs to ignore a malformed SDP line that Firefox insists on sending.
Ahh, I had not realized that. I pulled down the dev branch of this repo into my catkin_ws/src
, added a CATKIN_IGNORE
file to the webrtc package. I also pulled the apache2_websocket_proxy_workaround
branch of the async_web_server_cpp
into my catkin_ws/src
. I re-ran catkin_make
. Setup a demo video stream to play, ran the webrtc_ros_server_node
and I have the same result, although with a lot more info getting printed to the terminal now. Is there anything wrong in my approach? It would be useful if anyone else is following this thread to see if this all works for them, maybe my systems are broken in some weird way...
Your approach is fine. I pretty much did the same things, albeit using catkin_tools to build intead. Regarding your system, I'm using Ubuntu 18.04 with ROS Melodic, and I haven't tested the package with the previous LTS yet. Maybe that's the issue?
That is possible. I am on kinetic in ubuntu 16
FInally upgraded to ubuntu 18 with melodic. I'm seeing the same error using the same approach as above. Not the end of the world, chrome works, so I will stick with that for now.
I'm sorry to hear that. Do you think you could create e.g. a docker image that reproduces the error?
I'm not sure when this stopped being a problem for me. But it is currently working in firefox. So I am closing this.
Great news! I'm sorry I didn't have much time to investigate, but I could never reproduce that problem anyway. Hopefully, it stays solved for good.
Can confirm that this is still a problem with the currently released apt-gettable version for kinetic. I'm seeing the exact same signaling error.
I'll try compiling the current master and see if there are any improvements.
I've now tested the current master which didn't work. I went back to the original "firefox fix" commit at 309bf57 which wouldn't really compile with the current webrtc release, so I attemped a slightly later 4d7dbeb, which also didn't work in Firefox. Still getting the exact same console errors as seen in this image posted above.
I sincerely doubt this was ever fixed. It is quite puzzling how there could be a signaling error due to websockets not connecting - websockets which obviously work in Firefox without any problems in hundreds of thousands of applications.
Found the culprit here, the WebSocket upgrade request is being responded to with HTTP/1.0
, but Firefox requires HTTP/1.1
. This patch fixes it for me: https://github.com/rohbotics/async_web_server_cpp/commit/c994c1211c6f873197caf7991204a201b2bb0503
Reference (under "The WebSocket handshake"): https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers
Just running the demo site, I am able to get everything working in Chrome, but not in Firefox. in Firefox, I get:
And nothing shows up in the viewers.
In the terminal, running the node, I get:
Any thoughts on what could be up? Thanks