Just upgraded from CodeKit to CodeKit 2, super excited about using it, but when I try to use the live preview feature in anything but Firefox, I get in a JS alert:

Failed to establish a connection to CodeKit. Live refreshes will not work.

I've tried using both the Bonjour and non-Bonjour addresses to no avail. Went to the console to find:

WebSocket connection to 'ws://192.168.1.6:5758/' failed: Error during WebSocket handshake: Status line contains embedded null

(note: the live refresh actually works, the only thing is there's a large annoying red box telling me to restart the connection. This red box doesn't appear in Firefox, but I need to code for WebKit.)

有帮助吗?

解决方案

I had this problem with CodeKit 2 on Android but instead of using my-imac.local:5757 i used my Local IP Address and the same port http://192.1.2.3:5757 and it worked perfectly.

I am using Chrome on Android 5.0.1 which is the most recent version as of this post.

In case you're not sure how to get your IP Address then hold Alt Key and click the wifi WiFi Logo logo in your menu bar... You should see IP: 123.45.6.7

Note Remember you must be on the same WiFi network as your computer.

Hope this helps you and/or any future people experiencing the same issue.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top