Websocket Error (Invalid or Illegal String)

Bugs will be moved here once resolved.

Post » Tue May 07, 2013 8:03 pm

Link to .capx file (required!):
https://www.dropbox.com/s/yb4awn4whwa2vg0/websocketerror.capx

Steps to reproduce:
1. Use a Websocket Object.
2. Trigger a connection. Webserver does not have to exist.

Observed result:
Error message pops up:
Javascript error!
SyntaxError: An invalid or illegal string was specified
http://localhost:50000/C2WebSocket_plugin.js, line 120 (col undefined)

This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!

Expected result:
The text should change to "Test Succesful"
A more general outcome: the "On Connection Error" should be triggered.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows XP Service Pack 3
Windows 7

Construct 2 version:
   r128.2marlon6672013-05-08 09:41:47
B
10
S
2
Posts: 94
Reputation: 1,536

Post » Tue May 07, 2013 8:50 pm

If i try to connect to the test echo server (ws://echo.websocket.org)
it still throws the same error.

When i type anything in the "protocol(optional)" field and try to connect to the echo server, the error won't show up and the "On connection error" gets triggered.
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed May 08, 2013 9:39 am

That's strange... Does that mean that the protocol parameter cannot be omitted? When i looked in the WebSocket's Runtime.js, Line 120 was the method for creating a new Socket, and it had the protocol parameter included. Isn't there a way to leave it blank?

My WebSocket server doesn't use a protocol. I don't want it to, either.
B
10
S
2
Posts: 94
Reputation: 1,536

Post » Wed May 08, 2013 2:19 pm

Oops, looks like it got broken in r127. Should be fixed in the next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Sep 04, 2013 10:54 pm

Looks like this bug is back in 143.
Im getting a javascript error message when I try to connect without an existing server.

Should I make a new bug report?
@Ashley
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Sep 05, 2013 11:19 am

Yes, post a new report.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests