Debugging why browser is not getting data #24

Closed
kbaum opened this Issue Feb 5, 2014 · 8 comments

Projects

None yet

3 participants

@kbaum

I am trying to reintroduce the latest 0.13.0 pusher-fake into my project. I am at the point where i am getting no server errors and no javascript errors but no data is being sent to the client browser. I can see that the process is listening on the appropriate ports. Wanted to know where the best place is to debug from here. I have the following in my application.rb:

https://gist.github.com/kbaum/8833686

I am using pusher 2.1.6 from here:

http://js.pusher.com/2.1/pusher.min.js

thx!

-karl

@twalpole

Are you setting the relevant host/ports in the options passed to your JS call to new Pusher(key, options) ??

@kbaum

It seems to have the websocket port and host i set in ruby:

(function() {
  window.Viewthespace.createPusher = function() {
    return new Pusher("my_key",{"wsHost":"127.0.0.1","wsPort":7210});
  };

  window.Viewthespace.pusher = Viewthespace.createPusher();

}).call(this);

Is there anything it is missing?

thx!

@tristandunn
Owner

I don't see anything obviously wrong. Can you verify the state of the JS client? Should be able to do something like:

window.Viewthespace.pusher.connection.state

If that's connected then you might need to jump into the pusher-fake code for some debugging.

This might be a good reason for adding a verbose logging mode.

@kbaum

No idea what is going on, but i got home, tried again without changing anything and it worked.

@kbaum kbaum closed this Feb 6, 2014
@kbaum

Sorry to bother everyone!

@tristandunn
Owner

Glad to hear.

I still might consider adding a verbose logging option because it is kind of a pain to debug. Learned that recently while upgrading to use the latest client library that has the activity_timeout requirement.

@kbaum
@kbaum

One other thing. I actually added pusher-fake back to our project. It had been gone for a while. Believe it or not we were just making calls to pusher from our tests.. not proud. Anyway, i just tried adding pusher-fake back and i am getting some of my tests timing out. It seems like it is slower than actually using pusher. Not sure that makes sense and unfortunately i do not have too much time to debug right now but i thought i would pass along just in case you knew anything that changed on your end. I am fully aware that it should be on me to look into this more but unfortunately i dont have the time right now.

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment