Updated to latest Nightly and now it can't startup - RuntimeError: Added route will never be executed, method HEAD is already registered
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Expected Behavior
Running on a 5090/WSL2 - been using comfy on it 2 months without any issues. I didn't change anything, just ran 'Update All'
Running startup, it loads through everything exactly as normal - all custom nodes good - and then shuts down immediately.
### Actual Behavior
**** Updated All - restarted - immediate shutdown - every time I retry
### Steps to Reproduce
Update All - restart
### Debug Logs
```powershell
[2025-04-14 05:44:00.409] Traceback (most recent call last):
[2025-04-14 05:44:00.409] File "/home/ajo6268/comfyui/ComfyUI/main.py", line 308, in
[2025-04-14 05:44:00.409] event_loop, _, start_all_func = start_comfyui()
[2025-04-14 05:44:00.409] ^^^^^^^^^^^^^^^
[2025-04-14 05:44:00.413] File "/home/ajo6268/comfyui/ComfyUI/main.py", line 275, in start_comfyui
[2025-04-14 05:44:00.413] prompt_server.add_routes()
[2025-04-14 05:44:00.414] File "/home/ajo6268/comfyui/ComfyUI/server.py", line 732, in add_routes
[2025-04-14 05:44:00.414] self.app.add_routes(api_routes)
[2025-04-14 05:44:00.414] File "/home/ajo6268/envs/comfyui/lib/python3.12/site-packages/aiohttp/web_app.py", line 389, in add_routes
[2025-04-14 05:44:00.415] return self.router.add_routes(routes)
[2025-04-14 05:44:00.415] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2025-04-14 05:44:00.418] File "/home/ajo6268/envs/comfyui/lib/python3.12/site-packages/aiohttp/web_urldispatcher.py", line 1279, in add_routes
[2025-04-14 05:44:00.419] registered_routes.extend(route_def.register(self))
[2025-04-14 05:44:00.419] ^^^^^^^^^^^^^^^^^^^^^^^^
[2025-04-14 05:44:00.423] File "/home/ajo6268/envs/comfyui/lib/python3.12/site-packages/aiohttp/web_routedef.py", line 76, in register
[2025-04-14 05:44:00.423] return [reg(self.path, self.handler, **self.kwargs)]
[2025-04-14 05:44:00.423] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2025-04-14 05:44:00.427] File "/home/ajo6268/envs/comfyui/lib/python3.12/site-packages/aiohttp/web_urldispatcher.py", line 1240, in add_get
[2025-04-14 05:44:00.428] resource.add_route(hdrs.METH_HEAD, handler, **kwargs)
[2025-04-14 05:44:00.428] File "/home/ajo6268/envs/comfyui/lib/python3.12/site-packages/aiohttp/web_urldispatcher.py", line 365, in add_route
[2025-04-14 05:44:00.428] raise RuntimeError(
[2025-04-14 05:44:00.428] RuntimeError: Added route will never be executed, method HEAD is already registered
[2025-04-14 05:44:00.458] Cannot connect to comfyregistry.
[2025-04-14 05:44:00.480] FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json[ComfyUI-Manager] Due to a network error, switching to local mode.
=> custom-node-list.json
=> cannot schedule new futures after shutdown
[2025-04-14 05:44:00.482] FETCH DATA from: /home/ajo6268/comfyui/ComfyUI/custom_nodes/comfyui-manager/custom-node-list.json [DONE]
[2025-04-14 05:44:00.494] [ComfyUI-Manager] All startup tasks have been completed.
[comfyui_8188.log](https://github.com/user-attachments/files/19729759/comfyui_8188.log)
```
### Other
### chatGPT says:
**What's Going On?**
Automatic HEAD Registration in aiohttp
In aiohttp, whenever you register a GET route, it automatically adds a matching HEAD route. This is a convenience feature so that you don’t have to do it manually. However, if your code (or one of the modules you’re using) tries to register a HEAD route explicitly for a path that already has a GET route, aiohttp complains—and that’s exactly what’s happening.
**Route Conflict**
The traceback points to the function where routes are added. The error message indicates that the server is trying to add a HEAD route for a path that already has an implicit HEAD (from the GET route). This results in the runtime error:
"Added route will never be executed, method HEAD is already registered"
**Cascading Issues**
Following this, you see messages like
"cannot schedule new futures after shutdown"
These likely occur because the route conflict is causing the application to shut down abruptly, which then leads to tasks being scheduled after the event loop has closed.
**Network/Registry Connection Issues**
There’s also a separate log message about:
"Cannot connect to comfyregistry"
…and a fallback to a local mode for fetching the custom node list. This isn’t directly related to the routing error; it simply indicates that the UI manager couldn’t reach its online registry, so it switched to local resources.
I also tried updating aiohttp to the latest version but that made no difference
Contributor guide
Assessment
This issue has not been assessed yet.