Giter Club home page Giter Club logo

pusher-client-node's People

Contributors

arnihermann avatar dirkbonhomme avatar enginoid avatar jbcpollak avatar pauliusuza avatar shimondoodkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pusher-client-node's Issues

How to handle errors

I have a long-running instance of a pusher client. I'm trying to figure out how best to deal with dropped connections. In my logs I see things like this:

Error { type: 'WebSocketError',
  error: 'Please reconnect immediately' }

I haven't been able to recreate that message in a debugging environment - but I can easily get connection errors by disabling my internet connection:

Error { type: 'WebSocketError',
  error: 'Unknown socket error: ENOENT getaddrinfo' }

As far as I've been able to tell - there are no events or public functions for me to be able to monitor pusher error messages. Am I missing something?

Unable to set proxy

Hello,

The reason I'm submitting this as an issue is that you want to maintain compatibility to the official pusher client, and pusher-client-node does not allow for setting a proxy. Since I work behind a corportate proxy, this has been a real headache, and I bet there are more people in the same situtation. I gave it a shot myself but I am not that knowledgeable.

Thanks in advance,
Pimeau

Account over quota trying to connect to pusher

hello. here is what i did:

i have tried to mimic this webpage that use the pusher-client for webbrowser : https://www.bitstamp.net/s/examples/live_diff_order_book.html

var Pusher = require('pusher-client');
var pusher = new Pusher('de504dc5763aeef9ff52');
var bitstamp_orderbook_channel = pusher.subscribe('diff_order_book');

what i get { event: 'pusher:error', data: { code: 4004, message: 'Account over quota' } } trying connecting to pusher on - wss://ws.pusherapp.com:443/app/cb65d0a7a72cd94adf1f?client=node-pusher-server&version=0.0.1&protocol=5&flash=false

How to disconnect and exit?

Hi.

I have something like this.

var socket = new Pusher('abc');
socket.disconnect();

But it's preventing Node from exiting. Is there a way to terminate?

Suddenly disconnects on Raspberry Pi 3

Using the library pusher-client-node gives some problems on a Raspberry Pi 3.

You can see after a while that the connection is lost on the Pusher dashboard. Nothing logs in the Raspberry terminal. After that, if you send a message via the PHP library, the Raspberry terminal will log a ws error 1006. Which means abnormal disconnection.

I tried the same script on my laptop at the same time with the Raspberry and it never loses the ws connection. I am using the same node version in both platforms.

I've been debuging for two days until I found it was a problem of the Raspberry.

What do you suggest I can do to help debug this?

Suddenly disconnection

Hello,
I am trying to keep the script running for a long period, but I am getting disconnections. The disconnection usually happens after 1-2 dyas. I followed the advices from the other issue related with the raspberry. Here is the trace I am getting:

Error { type: 'WebSocketError', error: 'close code 1006' }
{ type: 'WebSocketError', error: 'close code 1006' }
Error { type: 'WebSocketError',
error: 'Unknown socket error: ENOTFOUND getaddrinfo' }
{ type: 'WebSocketError',
error: 'Unknown socket error: ENOTFOUND getaddrinfo' }

Many thanks!

Handling Error 1006

Hi,

I've recently seen that I hit the pusher error 1006:

Error { type: 'WebSocketError', error: 'close code 1006' }

I no longer seem to receive any messages after this event occurs so I took a look at the code and found that you've chosen not to handle this error with a retry:
https://github.com/dirkbonhomme/pusher-client-node/blob/master/lib/connection.js#L124
https://github.com/dirkbonhomme/pusher-client-node/blob/master/lib/connection.js#L128

I'm just wondering why this isn't included as part of the range you would like to retry on?

Also is there a way I can actively recover from such a disconnection?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.