Repository navigation
Description
Describe the bug
Running firmware v4.1.0b3 on City Hub, there is no terminal input or output: print() output does not appear, "Program stopped" is not shown, and the REPL does not start.
This reproduces both in the code and beta.pybricks.com web IDE and via pybricksdev over BLE.
Move Hub, Robot Inventor Hub, and Prime Hub are unaffected on the same firmware version (Move Hub has no REPL regardless, so that part is not applicable there, but its print output works fine).
Technic Hub has the same or similar problem. Difference is that the City Hub does not power-off and shows it is ready to connect. But the Technic Hub powers off at once.
Summary
| Hub | Firmware | print/REPL via web IDE | pybricksdev run ble |
|---|---|---|---|
| City Hub | v4.1.0b3 | No output, no REPL | Disconnects unexpectedly (HubDisconnectError) |
| City Hub | v4.1.0b2 | Works | Works |
| Prime Hub | v4.1.0b3 | Works | Works |
| Move Hub | v4.1.0b3 | Works (no REPL support, by design) | Works |
| Technic Hub | v4.1.0b2 | Works | Works |
| Technic Hub | v4.1.0b3 | No output, no REPL | Disconnects like the City Hub |
To reproduce
- Go to beta.pybricks.com
- Install firmware v4.1.0b3 on a City Hub
- Run the sample program below (or any program that prints)
- Observe: no print output appears, and starting the REPL has no effect
A screenshot can't demonstrate an absence of output, so there's nothing useful to attach here — the terminal simply stays empty where output is expected.
Running the same program via pybricksdev run ble (see below) shows the City Hub disconnecting on its own partway through, which is a more concrete symptom than the blank web IDE terminal.
Expected behavior
Print output, tracebacks, and REPL access should work as they do on Move Hub, Robot Inventor Hub, and Prime Hub. (No REPL on the movehub of course)
sample test program clear_terminal.py
# clear screen and traceback buffer
print(end="\x1b[H\x1b[2J\x1b[3J")
from pybricks import version
print(version, "\n\t", version[0], "\n\t", version[1], "\n\t", version[2])
hw_type = version[0]
print("hw_type", hw_type)
Extra info
Have no v4.1.0b2 firmware saved here to test if the city hub did OK on v4.1.0b2, like the Technic Hub.
[EDIT] Downloaded cityhub v4.1.0b2 and tested.
Extra info — comparison across hubs via pybricksdev
City Hub — disconnects on its own during the run; this disconnect was not user-initiated (no button press, no manual stop) and I did not close the connection myself:
pybricksdev run ble \users\bert\py\pybricks\beta.pybricks.backup\clear_terminal.py
Searching for any hub with Pybricks service...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:00<00:00, 878B/s]
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Python311\Scripts\pybricksdev.exe\__main__.py", line 6, in <module>
File "C:\Python311\Lib\site-packages\pybricksdev\cli\__init__.py", line 620, in main
asyncio.run(subparsers.choices[args.tool].tool.run(args))
File "C:\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pybricksdev\cli\__init__.py", line 240, in run
await hub.run(script_path, args.wait or args.stay_connected)
File "C:\Python311\Lib\site-packages\pybricksdev\connections\pybricks.py", line 629, in run
await self._wait_for_user_program_stop()
File "C:\Python311\Lib\site-packages\pybricksdev\connections\pybricks.py", line 813, in _wait_for_user_program_stop
is_running = await self.race_disconnect(user_program_running.get())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pybricksdev\connections\pybricks.py", line 374, in race_disconnect
raise HubDisconnectError("disconnected during operation")
pybricksdev.connections.pybricks.HubDisconnectError: disconnected during operation
TechnicHub disconnects (and innediate poweroff):
pybricksdev run ble \users\bert\py\pybricks\beta.pybricks.backup\clear_terminal.py
Searching for any hub with Pybricks service...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:00<00:00, 890B/s]
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Python311\Scripts\pybricksdev.exe\__main__.py", line 6, in <module>
File "C:\Python311\Lib\site-packages\pybricksdev\cli\__init__.py", line 620, in main
asyncio.run(subparsers.choices[args.tool].tool.run(args))
File "C:\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pybricksdev\cli\__init__.py", line 240, in run
await hub.run(script_path, args.wait or args.stay_connected)
File "C:\Python311\Lib\site-packages\pybricksdev\connections\pybricks.py", line 629, in run
await self._wait_for_user_program_stop()
File "C:\Python311\Lib\site-packages\pybricksdev\connections\pybricks.py", line 813, in _wait_for_user_program_stop
is_running = await self.race_disconnect(user_program_running.get())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pybricksdev\connections\pybricks.py", line 374, in race_disconnect
raise HubDisconnectError("disconnected during operation")
pybricksdev.connections.pybricks.HubDisconnectError: disconnected during operation
Cityhub on v4.1.0b2 — works OK:
('cityhub', '4.1.0b2', 'ci-build-4925-v4.1.0b2 on 2026-07-14')
cityhub
4.1.0b2
ci-build-4925-v4.1.0b2 on 2026-07-14
hw_type cityhub
Prime Hub — w orks correctly:
pybricksdev run ble \users\bert\py\pybricks\beta.pybricks.backup\clear_terminal.py
Searching for any hub with Pybricks service...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:00<00:00, 4.91kB/s]
('primehub', '4.1.0b3', 'ci-release-105-v4.1.0b3 on 2026-08-27')
primehub
4.1.0b3
ci-release-105-v4.1.0b3 on 2026-08-27
hw_type primehub
Movehub — works correctly:
pybricksdev run ble \users\bert\py\pybricks\beta.pybricks.backup\clear_terminal.py
Searching for any hub with Pybricks service...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:00<00:00, 443B/s]
('movehub', '4.1.0b3', 'ci-release-105-v4.1.0b3 on 2026-08-27')
movehub
4.1.0b3
ci-release-105-v4.1.0b3 on 2026-08-27
hw_type movehub
Activity
Sirus-7 commentedon Aug 30, 2026
Pybricks Beta v3.1.0-beta.4 with firmware v4.1.0b3 runs correctly on the EV3.
On TechnicHub as described by Bert.
laurensvalk commentedon Sep 9, 2026
A patch for this is coming this Friday. Thanks @BertLindeman. Some other pull requests won't work for City Hub and Technic Hub for this reason. Thanks for your patience!
BertLindeman commentedon Sep 9, 2026
😁 Patience? I have been sniffing all along ;-)
laurensvalk commentedon Sep 21, 2026
Fixed by pybricks/pybricks-micropython@c9fcd51 and pybricks/pybricks-micropython@f52a88c