port forwarding does not work if use_reloader=True
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
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 set use_reloader=False it works as expected.
- results of
conda list | grep dashbelow
dash 1.7.0 pypi_0 pypi
dash-bio 0.4.6 pypi_0 pypi
dash-bootstrap-components 0.8.1 pypi_0 pypi
dash-core-components 1.6.0 pypi_0 pypi
dash-cytoscape 0.1.1 pypi_0 pypi
dash-dangerously-set-inner-html 0.0.2 pypi_0 pypi
dash-daq 0.2.1 pypi_0 pypi
dash-html-components 1.0.2 pypi_0 pypi
dash-renderer 1.2.2 pypi_0 pypi
dash-table 4.5.1 pypi_0 pypi
-
I guess it is not system related but here it is
- Remote System CentOS Linux release 7.5.1804 (Core); Python 3.6.9
- Local System: Windows 10 (Browser: Brave,Chrome & Firefox)
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:
if __name__ == '__main__':
app.run_server(debug=True)
Below does work:
if __name__ == '__main__':
app.run_server(debug=True, use_reloader=False)
Port forwarding in both cases
Remote: python3 app.py & ssh -NfR 8050:localhost:8050 user@system
Local: python3 app.py & ssh -NfL 8050:localhost:8050 user@system
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 setting use_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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior from app.py with app.run_server(debug=True), then repeat with use_reloader=False using the supplied SSH port-forwarding commands. Compare the two runs and trace how the reloader affects the forwarded connection; done means the forwarded app loads correctly with the default reloader behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100