Websockets on Linux

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Websockets on Linux

Postby mgoimam » Wed Jun 22, 2016 9:59 am

I am trying to use websockets on Linux (Ubuntu 14.04 to be precise) using CEF version 2704 / Chromium 51. I expose my own server and have a test webpage to test its functionality.

On my Ubuntu machine, when I load my test webpage in Firefox, the websocket connections are established, but when I load it in my CEF based application, they are not. I couldn't find any relevant error/warning messages in the logs. I figured it might be related to security settings, so I tried serving the webpage from "localhost" (the server is also running on "localhost"), and also tried adding the "--disable-web-security" switch. I also tried adding a scheme handler on "ws" and I do see the calls reaching at least CEF.

With the same setup on my Windows setup, websockets do work (webpage hosted on Windows machine, server running on this same Windows machine, same CEF based application).

I will continue my investigation by digging in the CEF / Chromium sources, but would appreciate any tips as to what might be the issue.
mgoimam
Newbie
 
Posts: 7
Joined: Mon Mar 28, 2016 10:40 am

Re: Websockets on Linux

Postby magreenblatt » Wed Jun 22, 2016 10:55 am

Does it work in Chrome on Ubuntu? Are you using ws or wss? If wss, do you have a valid certificate?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Websockets on Linux

Postby mgoimam » Wed Jun 22, 2016 11:01 am

Yes, using Chrome 51.0.2704.103 (64-bit).
mgoimam
Newbie
 
Posts: 7
Joined: Mon Mar 28, 2016 10:40 am

Re: Websockets on Linux

Postby magreenblatt » Wed Jun 22, 2016 11:22 am

Does it work in the cefclient or cefsimple sample applications?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Websockets on Linux

Postby mgoimam » Wed Jun 22, 2016 4:37 pm

After investigation, it turns out that the Linux build was using a caching proxy (hosted locally) that was interfering with the websockets. I changed my proxy settings to avoid using the proxy for localhost connections and it seems to have resolved my issues. Thank you.
mgoimam
Newbie
 
Posts: 7
Joined: Mon Mar 28, 2016 10:40 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 45 guests