reflex: [REF-1842] `reflex run` hanging/lag when open localhost in browser
Describe the bug
A clear and concise description of what the bug is.
reflex run does not respond when live-reload and sometimes lagging when open localhost is browser
To Reproduce Steps to reproduce the behavior:
reflex init# choose blankreflex runhanging when opening link localhost:3000
Expected behavior A clear and concise description of what you expected to happen. Reflex running “fine” when live-reloading
Screenshots If applicable, add screenshots to help explain your problem.
Specifics (please complete the following information):
- Python Version:
3.12, 3.11, 3.10 - Reflex Version:
0.3.10a2, 0.3.9 - OS: Windows 11 and Windows 11 WSL 2 - Ubuntu 22.04 LTS “I try both”
- Browser (Optional): Brave Browser, Edge Browser
Additional context Add any other context about the problem here.
`reflex run --loglevel debug`
~\Projects\werna-web via v3.12.0 (.venv) ❯ reflex run --loglevel debug────────────────────────────────── System Info ──────────────────────────────────
Debug: Config file:
'C:\\Users\\Acer\\Projects\\werna-web\\.venv\\Lib\\site-packages\\reflex\\config.
py'
Debug: Config: app_name='werna_web' loglevel=<LogLevel.INFO: 'info'>
frontend_port=3000 frontend_path='' backend_port=8000
api_url='http://localhost:8000' deploy_url='http://localhost:3000'
backend_host='0.0.0.0' db_url='sqlite:///reflex.db' redis_url=None
telemetry_enabled=True
bun_path='C:\\Users\\Acer\\AppData\\Local\\reflex\\bun\\bin\\bun'
cors_allowed_origins=['*'] tailwind={} timeout=120 next_compression=True
event_namespace=None frontend_packages=[]
cp_backend_url='https://rxcp-prod-control-plane.fly.dev'
cp_web_url='https://control-plane.reflex.run'
gunicorn_worker_class='uvicorn.workers.UvicornH11Worker'
Debug: Running command:
['C:\\Users\\Acer\\AppData\\Local\\reflex\\fnm\\node-versions\\v18.17.0\\installa
tion\\node.exe', '-v']
Debug: Running command: ['C:\\Users\\Acer\\AppData\\Local\\reflex\\fnm\\fnm.exe',
'--version']
Debug: [Reflex 0.3.10a2 with Python 3.12.0 (PATH:
C:\Users\Acer\Projects\werna-web\.venv\Scripts\python.exe)]
Debug: [Node 18.17.0 (Expected: 18.17.0)
(PATH:C:\Users\Acer\AppData\Local\reflex\fnm\node-versions\v18.17.0\installation\
node.exe)]
Debug: [FNM 1.35.1 (Expected: 1.35.1) (PATH:
C:\Users\Acer\AppData\Local\reflex\fnm\fnm.exe)]
Debug: [OS Windows 10.0.22621]
Debug: Using package installer at:
C:\Users\Acer\AppData\Local\reflex\fnm\node-versions\v18.17.0\installation\npm
Debug: Using package executer at:
C:\Users\Acer\AppData\Local\reflex\fnm\node-versions\v18.17.0\installation\npm
Warning: Windows Subsystem for Linux (WSL) is recommended for improving initial
install times.
────────────────────────────── Starting Reflex App ──────────────────────────────
Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 15/15 0:00:00
Debug: Running command:
['C:\\Users\\Acer\\AppData\\Local\\reflex\\fnm\\node-versions\\v18.17.0\\installa
tion\\npm', 'run', 'next', 'telemetry', 'disable']
Debug: Running command:
['C:\\Users\\Acer\\AppData\\Local\\reflex\\fnm\\node-versions\\v18.17.0\\installa
tion\\node.exe', '-v']
────────────────────────────────── App Running ──────────────────────────────────
Debug: Running command:
['C:\\Users\\Acer\\AppData\\Local\\reflex\\fnm\\node-versions\\v18.17.0\\installa
tion\\npm', 'run', 'dev']
Debug: Starting frontend
Debug:
Debug: > dev
Debug: > next dev
Debug:
Debug: ▲ Next.js 14.0.1
Debug: - Local: http://localhost:3000
App running at: http://localhost:3000
Debug:
Debug: ✓ Ready in 8.8s
Debug: ○ Compiling / ...
Debug: ✓ Compiled / in 40.5s (1598 modules)
Debug: [?25h
Compiling: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 15/15 0:00:00
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 17 (1 by maintainers)
I believe
uvicorn-0.22.0broke windows reload support on python < 3.12. So it might be theoretically possible to use the newer uvicorn only on py3.12 if we can test sufficiently, and keep the older uvicorn for previous python versions.The team will keep an eye on this issue. Thanks for testing and reporting back.
IT WORKS! I tried with Python 3.11.7. Got the complied time and page auto reload is just fine: