Comments (6)
That error originates here:
Lines 601 to 612 in 7461524
An incoming connection asks the manager to find the corresponding session. In this case it fails, because it looks in the pending sessions, and it's not there.
The session lifetime has a few stages:
Line 70 in 7461524
I think we'd need to add another stage, maybe LOST
, from which we can reconnect. The manager will also have to keep track of lost sessions in its _appinfo
data structure. Though we'd also need a mechanism to purge LOST sessions once they're lost for too long.
I hope this helps ...
from flexx.
I'm not sure, but it could be worth a try ...
from flexx.
Websockets are indeed more susceptible to connection problems. Technically it should be possible to restore the connection, but I fear that would involve substantial changes to the Flexx internals, because the session is very much tied to the websocket connection right now ...
from flexx.
No problem, was just wondering if there was a simple workaround.
Thanks for the information.
from flexx.
Hey @almarklein ,
I looked at some of the source and there are quite a few self.ws
or self._ws
references.
If I would update all of those references with a new WebSocket when on_ws_close
(flexx/app/_clientcore.py
line 347
) is called, would that work?
from flexx.
Hey @almarklein
I tried a bit of fiddling around, but now I'm getting the error Asked for session id X, but could not find it
when trying to reconnect the socket.
My main problem is that I do not have an idea of how the websocket initialization chain is processed. Could you give me a point-by-point description of the websocket initialization order of the methods needed to initialize and then communicate with the JS side?
Thanks
from flexx.
Related Issues (20)
- how to set a timer HOT 10
- the pycomponents has conflicts with js? HOT 8
- Run as a desktop app, how to close the incognito window? HOT 1
- How to Change the "Starting Flexx App"? HOT 2
- Run as a desktop app, how to hide or remove the close button on the browser ? HOT 1
- Trying to build a SPA / Saas with Flexx HOT 1
- Flexx lacks of a lot of features HOT 4
- I couldn't find any example of sending ajax request and getting response HOT 1
- PlotlyWidget in offline mode HOT 2
- Is there a way to send data from my client side js widget to server side (for example images, videos)? HOT 5
- 使用freeze失败
- Error 404 on leaflet.py example HOT 9
- _mutate_xxx‘s bug or for some other reason HOT 2
- No certificate found HOT 2
- Lost connection with server: message too big (1009) HOT 1
- ui css:max-height < min-height HOT 6
- 'Too many open files' error HOT 14
- Use flx.create_element to create a label in the for loop, bind the onclick event, and dynamically transfer parameters. lambda fun error HOT 1
- use multiprocessing in flexx after freeze, The window keeps popping up HOT 8
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 flexx.