← index #10508Issue #5266
Off-topic · high · value 0.677
QUERY · ISSUE

Timeout support for websocket/webrepl

openby jimmoopened 2023-01-16updated 2024-09-12
enhancement

Reported here: https://github.com/orgs/micropython/discussions/10444

Webrepl constructs a websocket with BLOCKING_WRITE set. There's no timeout, so prints can hang.

CANDIDATE · ISSUE

webrepl: Doesn't work from https site

closedby jimmoopened 2019-10-28updated 2022-07-23

webrepl serves on a unencrypted websocket, which means that it can't be accessed from a page served over https.

The simple workaround is to manually ensure that you use http://micropython.org/webrepl/ instead of https://micropython.org/webrepl/

Some ideas to improve this:

  • Make webrepl.py on the device support wss
  • Load the page from the device instead -- i.e. serve a bare-bones webrepl.html that includes all its resources and content from a remote site (this could be done in ~100 bytes or so... not much more than just a script tag).
  • Make https://micropython.org/webrepl/ redirect to http://micropython.org/webrepl/ (This is a bit backwards...given that we should be doing the exact opposite via things like HSTS these days).

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied