mnutt / hummingbird

Real time web analytics using node.js and web sockets
http://mnutt.github.com/hummingbird
MIT License
2.92k stars 15 forks source link

Firefox can only update a single hummingbirdGraph #47

Closed liblfds closed 11 years ago

liblfds commented 11 years ago

I have three web-pages, where each shows a hummingbirdGraph, where each runs off a metric which is a copy of add_cart - each page/graph/metric is identical but has a different ID, so they're all separate, e.g. campaign_333, campaign_666, campaign_999.

So I load up each page and then I can fire trigger pixels into the server for each graph.

This works as expected on Chrome 24.0.1312.52m and IE9. All three graphs load, run, update and respond.

On Firefox 18, only one graph will update its display; they all seem to be polling okay. Of the three graphs, it is campaign_999 which updates, e.g. I load one tab with 333, it doesn't update, I make a second tab and load with 666 and it doesn't update, I make another tab and load with 999 and it does update.

Wierd city.

999 responds as expected to pixel triggers.

There are no errors in the developer console in FF.

I replaced the jQuery from github (1.7) with the latest (1.9) but this didn't fix the problem.

mnutt commented 11 years ago

This is weird and I'm looking into it.

I'm not sure if it's causing your problem, but at the moment the "test open" and "test add cart" buttons don't work properly on FF 18. They get cached and so can only make one test request per page load. If you're using the test buttons, can you try appending something like:

img.src = "/tracking_pixel.gif?event=cart_add&_=" + Math.random();
liblfds commented 11 years ago

Hi again -

I debugged and found and fixed the problem (in a manner of speaking...)

For some reason - and it was not me - firefox was CONFIGURED to disable websockets.

Using about:config I reset this setting to its default value and all was then well.

What was happening was that where websockets was disabled XMLHTTPRequest had been fallen back to and this was having trouble with multiple graphs - I know not how. So there is still a problem - but it's with websockets and when they fall back.

liblfds commented 11 years ago

I'm happy to close this issue now, unless you'd like it left open.

liblfds commented 11 years ago

Do it.