tinyg icon indicating copy to clipboard operation
tinyg copied to clipboard

Can't connect to SPSJ on Firefox with Disconnect

Open peteruithoven opened this issue 9 years ago • 13 comments

When using Firefox I always get the following message:

You are running an old version of the Serial Port JSON Server. Latest is 1.6. You are at 1.1 so you should disconnect and download the latest version. Even before I tried to connect a Serial Port JSON Server. When trying to disconnect and connect to a server it doesn't respond. There are no errors / logs in the webbrowser's (firefox) console.
I tried clearing my cache and cookies. Using the same host adres on Chrome works like a charm.

Great project btw!

peteruithoven avatar Aug 31 '14 11:08 peteruithoven

This bug is likely fixed. The toolhead shadow was erroring out on Firefox and thus stopping the init() code for ChiliPeppr. That was cascading to other inits() not running, I believe, and why you were seeing this. Problem should be fixed now in Firefox.

chilipeppr avatar Sep 03 '14 15:09 chilipeppr

The toolhead seems indeed fixed, the simulator also works again, but there is still something going wrong. The Serial Port window still doesn't respond. In the Javascript console I do see the following error: ReferenceError: Zw is not defined From: phoneNumberUtil.js:159 I also see init of serial port widget and init of serial port console, but no serial port console - jsonModeCallback (which I do see in Chrome).

Nothing happens when I press Disconnect from serial port server for example. In Chrome the old version message disappears. In Chrome I also get WebSocket connection to 'ws://10.0.0.29:8989/ws' failed: WebSocket is closed before the connection is established. VM252:339 in my console, while in Firefox I get nothing.

peteruithoven avatar Sep 03 '14 19:09 peteruithoven

Which workspace are you using? Are you seeing this error in both Chrome AND Firefox? I just tried loading the TinyG workspace in Firefox and there is an error. Can't hunt it down until later. There seems to be no error in Chrome for the TinyG workspace. Did not try the Grbl workspace.

chilipeppr avatar Sep 03 '14 20:09 chilipeppr

In the GRBL workspace, in Firefox I get the ReferenceError: Zw is not defined error. I also get an error with the message :, coming from `jquery-2.1.0.min.js line 2 > eval:900'.

In the TinyG workspace, in Firefox, I only see the : error.

I'm not logged in btw, not sure if that manners.

peteruithoven avatar Sep 03 '14 20:09 peteruithoven

On my laptop it loads fine in Firefox and Chrome. Here's a shot of Firefox. However, I'm finding on my desktop at work it seems to run into an issue. If you don't get the 3D Viewer control panel in the center area then you know the Javascript died somewhere in the initting stage. I didn't try wiping my Firefox browser cache, but could try that. I tried it without being logged in as well and that doesn't seem to matter. You'll also notice the Zipwhip module is out of the workspace momentarily to make sure it wasn't that, but it doesn't seem to be the area.

image

Also, what can help is if you try to quickly turn on console logging as the page is loading. You have to be quick though. It's in the upper right pulldown menu inside ChiliPeppr to the right of your login.

image

chilipeppr avatar Sep 04 '14 06:09 chilipeppr

Ah interesting! When I, in Firefox, press the disconnect button in the Serial Port window I get:

"closing websocket:" null

When I do the same in Chrome I get:

closing websocket: WebSocket {binaryType: "blob", onmessage: function, protocol: "", extensions: "", onclose: function…}

When I, in Firefox, press the connect button under Connect to a local or remote host here. I get no logs. When I try the same in Chrome I get:

WebSocket {binaryType: "blob", onmessage: null, protocol: "", extensions: "", onclose: null…}URL: "ws://10.0.0.29:8989/ws"binaryType: "blob"bufferedAmount: 0extensions: ""onclose: function (evt) {onerror: function (evt) {onmessage: function (evt) {onopen: function (evt) {protocol: ""readyState: 3url: "ws://10.0.0.29:8989/ws"__proto__: WebSocket VM95:901

(Basically a reference to a websocket)

Trying to start a network scan in Firefox I get no logs, Chrome I get:

Starting scan of network for serial port servers...

peteruithoven avatar Sep 04 '14 09:09 peteruithoven

In the serialport widget, when running it in Firefox the chilipeppr object is undefined, while when I'm it it in Chrome it isn't. I'm trying it in the init function, see: http://jsfiddle.net/1zc67gbu/1/ Maybe I need to learn more about require.js but currently I don't understand where chilipeppr is coming from. I find it very hard to debug in JSFiddle, I'm doubting whether is was meant for so much code. Searching (using the browser) for example somehow doesn't work through the whole code. Is there a workflow I'm missing?

peteruithoven avatar Sep 15 '14 00:09 peteruithoven

Want to jump on a Google Hangout and walk through it?

chilipeppr avatar Sep 15 '14 00:09 chilipeppr

I just tried loading your fiddle in Firefox and Chrome and they both seem to work. So, I'd love to see this on your computer to see if we can find anything suspect.

chilipeppr avatar Sep 15 '14 00:09 chilipeppr

Ah seeing that it worked on your firefox I checked my addons. chilipeppr is defined when I disable Disconnect, HTTPS Everywhere and AdBlock Edge. I'll try to figure out which request is being blocked.

peteruithoven avatar Sep 15 '14 07:09 peteruithoven

I use Google App Engine and getting HTTPS going is actually not easy, so I’ve punted on it. That’s probably it.

From: Peter Uithoven [mailto:[email protected]] Sent: Monday, September 15, 2014 12:37 AM To: chilipeppr/tinyg Cc: John Lauer Subject: Re: [tinyg] Can't connect to SPSJ on Firefox (#3)

Ah seeing that it worked on your firefox I checked my addons. chilipeppr is defined when I disable Disconnect, HTTPS Everywhere and AdBlock Edge. I'll try to figure out which request is being blocked.

— Reply to this email directly or view it on GitHubhttps://github.com/chilipeppr/tinyg/issues/3#issuecomment-55560142.

chilipeppr avatar Sep 15 '14 15:09 chilipeppr

It looks like Disconnect doesn't like requests like: http://chilipeppr.com/geturl?url=http://fiddle.jshell.net/chilipeppr/2H9us/show/light/ When I just whitelist Google related requests everything works fine, see: screen shot 2014-09-15 at 21 22 57 Are these geturl requests handled by the Google App Engine?

peteruithoven avatar Sep 15 '14 19:09 peteruithoven

Disconnect on Google doesn't seem to have a problem with the requests.

peteruithoven avatar Sep 15 '14 19:09 peteruithoven