Open IvoLeist opened 4 years ago
I have the same issue. I don't know if you've found a way to get code reloading to work, but it has to do with the following (from dash documentation):
A caveat of Code Reloading is that your app code is run twice when starting: once to start the parent process and another time to run the child process that gets reloaded.
So if you have multiple instances of an ssh tunnel, your code will cause an error trying to open 2 tunnels using the same port at the same time.
Describe your context I am used to developing my dash apps remotely where I use port forwarding from a linux to a win10 machine. When building a new one I realized the odd behaviour that omitting
use_reloader
leads to a never stop loading dash app on the local system but if I setuse_reloader=False
it works as expected.conda list | grep dash
belowI guess it is not system related but here it is
Describe the bug
It is not really a bug since I already found a solution for it but if you want to reproduce it: Below does not work:
Below does work:
Port forwarding in both cases
Expected behavior Not sure what
use_reloader
does explicitly but I just would expect that the port forwarding should not be affected by it? On the remote system's browser the app works despite not settinguse_reloader=False
Screenshots I guess it would not help on the local system's browser there is just a spinning loading wheel in the taskbar and a completely white screen.
If this is kinda an expected behavior feel free to close this issue. I just wanted to share it because I was frustrated for over an hour why the new app just did not show up on my local system. Till code comparisons with my working app finally resolved it. So maybe this issue helps someone in the future why the port forwarding does not work.
Best, Ivo