-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS problem on start #374
Comments
More to say. Even if I did not change my code at all and just restart the app, then sometimes this errors appear. |
The spew of Does it also happen when you press F5 while keeping the Python process, or only with a Python restart with a browser refresh? |
@almarklein actually, I missed one big detail. I'm trying this out with asyncio loop as mentioned in #373. Problems can go from here.
I tried wireshark to see what breaks, but packets are identical by order in all cases. It looks like races or even more looks like "dict order randomness" bug. I saw this few times, when code breaks if keys in dict are in some «unexpected» order.
If I start python process «unsuccessfully», then page will never load. Any F5 hit will cause same error to console. Same with successful start, if I start process and page is ok, then I can refresh it as much as I want, everything is fine. |
Ok, I bisect the problem. And it is not about asyncio. The problem is custom widgets and subclass. from flexx import ui, app
class TimePlot(ui.PlotWidget):
pass
class NetSpeedPlot(TimePlot):
pass
class Foo(ui.Widget):
def init(self):
ui.Label(text="foo")
def main():
app.App(Foo).serve()
try:
app.start()
except KeyboardInterrupt:
app.stop()
if __name__ == "__main__":
main() If you run this code couple of times, then you see, that half of times you will not see "foo" label and console will show you
But, if you comment |
Closing this, because #408 changed a lot in the code related to this issue, and everything seems to be working. Please re-open if it persists. |
Ubuntu 16.04 x64, Firefox, flexx-master
My develop flow with flexx right now is:
But at some point when I hit F5 in browser after app restart my app won't start and I see in python console:
And so on. Big list of identical errors about my widgets(?). In browser console I see:
The problem is coming and going away with unknown reasons, definitely this does not depends of my python code, since sometimes it goes away without any code changes.
The text was updated successfully, but these errors were encountered: