Comments (6)
Having exactly the same issue here. Have you found any solution?
from pysher.
I haven't found the time to look into this yet, unfortunately. Anyone else ?
from pysher.
I also encountered this bug. It seems to happen in the connection class when it executes _connect(self)
after handling an error and it tries to reconnect. My theory is that the thread fails because self.socket.run_forever(**self.socket_kwargs)
gets executed for a second time in the while self.needs_reconnect and not self.disconnect_called:
loop ( because self.needs_reconnect
is set to True by calling reconnect(..)
)
I'll take a look into it at a later moment because I need to familiarize myself a bit more with the code to understand how to fix it properly (and find out if that is indeed the cause of the bug)
from pysher.
Met same issue. It looks like the bug from websocket-client. I don't know why the latest version of pysher need requirements = ["websocket-client<=0.48"]. I had compare the 0.48 with the latest version of websocket-client at _app.py(start from line 155, function close). In the old version it doesn't set the self.sock = None
after self.sock.close(**kwargs)
, but latest websocket-client did(at line 164 in _app.py). Which is the reason WebSocketException raise during reconnect.
So @nlsdfnbch, could you help to update the websocket-client to fix this bug? Thanks.
from pysher.
I currently cannot! But you can! We can't upgrade the websocket version until the _on_*
methods are made compatible with the new version - since the websocket client doesn't use semantic versioning, the version doesn't show the incompatibility issue with those.
It's a small change, and should be easily resolved. However, I became a dad a few days ago and am otherwise occupied :)
from pysher.
@nlsdfnbch Congratulations!!!
I had submit the merge request to you. Two issues are fixed in this request: 1. Support the latest version of websocket-client. 2. Call reconnect_handler in function _connect_handler. Could you please help to merge and release a new version? I don't want to build my version on pypi.
But the underlying reason that cause error 4201 looks like the pysher will miss the pusher:ping when the server flooding the channel with a mass of data. Which cause the pusher server think that the client was died.
from pysher.
Related Issues (20)
- Consumer example not working HOT 1
- Since Version 1.0.2 the script never connect HOT 2
- Error HOT 10
- Unsatisfied requirements when upgrading to 1.0.4 from 0.5.0 HOT 1
- Getting initial socket_id for auth endpoint - Docs request HOT 5
- Closed socket from time to time
- How to set channel authorization endpoint? HOT 2
- 1.0.5 Install error
- .
- Is it possible to set this up with a Flask / Hug server?
- Release tag for 1.0.1 missing
- Support websocket path for custom host HOT 1
- Is it possible to connect Pysher to a Laravel-Websockets server HOT 5
- Pysher 1.0.6 not compatible with websocket-client==0.58.0 HOT 3
- How to get up and running? HOT 1
- Reconnect after receive Error 4201 HOT 2
- Cut a new release HOT 1
- Client Events HOT 1
- Soketi Support/disconnection error HOT 1
- sorry. please delete this issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysher.