While creating a subscription, JS API can’t create websocket, because it generates the invalid url
at next line
var socket = this.socket = new WebSocket(url);
The url is
8888/E964D9C4-BF3B-01DC-FF44-CDD1BE011700
which is clearly invalid and produces the next error message
Wrong url scheme for WebSocket http://localhost/temp/back/8888/E964D9C4-BF3B-01DC-FF44-CDD1BE011700
problem occurs in latest Google Chrome ( v.28.0 )
Hi Максим,
Could you please let me know what API/code you used in your app that forced our library to get to that line of code? While we have some WebSocket related code in backendless.js, there is no WebSocket support (yet) on the server-side. I am curious how it gets to the point of error. Any sample code would be very helpful.
Regards,Mark
Something like next
var subscriptionOptions = new SubscriptionOptions();
Backendless.Messaging.subscribe( "default", function(){ /*stub*/ }, subscriptionOptions, new Backendless.Async( null, function(){ /*stub*/ } ) );
As far as I can see, code always attempt to create WebSocket during subscribing. After that it correctly fallback to the data polling, but it shows error message in the browser’s console anyway.
I see, yes, that’s true, an error is reported, but it does fall back to polling. We will clean it up and redeploy the library.
Thanks,Mark