witheve / Eve

Better tools for thought

Home Page:http://witheve.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Play with Eve: Error during WebSocket handshake

opened this issue · comments

WebSocket connection to 'ws://play.witheve.com/ws' failed: Error during WebSocket handshake: Unexpected response code: 404
EveClient @ client.ts:145
(anonymous) @ client.ts:455

I see this error in the JavaScript console when loading examples at http://play.witheve.com/#/examples/quickstart.eve. Specifically, I can't get the quickstart example to work properly unless I mess around randomly checking checkboxes, the reset button, and refreshing the page. I would expect that when I check the checkboxes in the quickstart example, that the view would update automatically, but this does not occur.

Chrome OS Version 58.0.3029.140 (64-bit)

Hey @philmaker1,

The websocket message is expected. Eve attempts to raise a connection to the server in the event that you'd like to remotely execute code. If the server isn't up (as is the case with play.witheve.com, for security reasons), it'll harmlessly failover to local-only execution mode.

W.r.t. getting the quickstart examples to work:
The checkboxes allow you to enable/disable blocks of code from evaluating in the current state of the running program. For blocks of code which commit values, disabling a block will not remove the values it asserted, so you'll need to reset the program (ctrl+shift+enter or cmd+shift+enter) or write a block to remove those values from the running program. Refreshing the page will also reset the program state, which is likely what caused things to intermittently work for you.

Unfortunately, we don't explain this at all in the QS, and didn't engineer the QS to avoid this gotcha. We initially had a hack that would reset the program for you when you checked/unchecked a block in the QS (since in the QS you don't really care about maintaining your live state), but found that transitioning to authoring their own programs was confusing for the user.

We've rewritten the quickstart for 0.3 very differently to account for this, but if you have any specific suggestions on how we can better the UX we're always looking for ways to improve.