← index #3621Issue #2590
Related · high · value 1.137
QUERY · ISSUE

webrepl crash - ESP8266

openby ds2k5opened 2018-02-16updated 2026-03-26
port-esp8266proposed-close

Hello,

Board: ESP8266 NodeMcu v3

wanna run the webrepl, but it crash if I open the URL with Bowser.


WebREPL daemon started on ws://0.0.0.0:8266
Started webrepl in normal mode
connecting to network...
Network configuration: ('192.168.1.246', '255.255.255.0', '192.168.1.1', '1.2.3.4')
WebREPL daemon started on ws://192.168.1.246:8266
Started webrepl in normal mode

MicroPython v1.9.3-8-g63826ac5c on 2017-11-01; ESP module with ESP8266
Type "help()" for more information.
>>> 
WebREPL connection from: ('192.168.1.114', 58848)
Traceback (most recent call last):
  File "webrepl.py", line 42, in accept_conn
  File "websocket_helper.py", line 34, in server_handshake
OSError: Not a websocket request

Here is the code: **


import machine
import socket
import webrepl

def do_connect():
    import network

    SSID = 'MyWIFI'
    PASSWORD = 'MyWiFIPassword'

    sta_if = network.WLAN(network.STA_IF)
    ap_if = network.WLAN(network.AP_IF)
    if ap_if.active():
        ap_if.active(False)
    if not sta_if.isconnected():
        print('connecting to network...')
        sta_if.active(True)
        sta_if.connect(SSID, PASSWORD)
        while not sta_if.isconnected():
            pass
    print('Network configuration:', sta_if.ifconfig())

do_connect()

webrepl.start()
sudo ampy --port /dev/ttyUSB0 ls
boot.py
webrepl_cfg.py
main.py  ** there is the CODE

sudo ampy --port /dev/ttyUSB0 get webrepl_cfg.py

show the password I set with: import webrepl_setup

What did I wrong ?

Thanks

CANDIDATE · ISSUE

webrepl error form esp8266

closedby skylin008opened 2016-11-02updated 2016-11-04

Hello,
when I use chrome and firefox web browser ,but error information show as below:

First-time WebREPL connection has been received. WebREPL initial setup

will now start over this connection. During setup, UART REPL will be
non-responsive. After setup finishes, the board will be rebooted. In
case of error during setup, current session will continue.

If you receive this message unexpectedly, it may mean that your WebREPL
connection is being hacked (power off board if unsure).

How to slove this issue.Thanks!

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