Skip to content

http request for non existent URL occurs error in onWritable() of httpserver.js #129

@kitazaki

Description

@kitazaki

I updated Node-RED MCU Edition from Moddable SDK 5.3.3 to 5.4.1, I have an issue on http-in and http-response node.

Environment (OK)
Moddable SDK 5.3.3
with Node-RED 3.1.15 and 4.0.8
Device: esp32/xiao_esp32s3_sense

Environment (NG)
Moddable SDK 5.4.1
with Node-RED 3.1.15 and 4.0.8
Device: esp32/xiao_esp32s3_sense

I tried camera server with Node-RED MCU Edition using mcu-camera node with http-in and http-response nodes.

https://github.com/kitazaki/node-red-contrib-mcu-camera

Image

Image

If I accessed camera URL and photo image was displayed in browser, but I have an error with xsbug CONSOLE error message.

Image

xsbug CONSOLE

node-red-mcu/nodes/network/httpserver/httpserver.js (140) # Break: TypeError: cannot coerce undefined to object (in onWritable)!

Image

I found the reason why this error is occured from the activity of the browser requests favicon.ico (/favicon.ico) otherwise the requested URL (/camera).

Image

The response of HTTP 404 from the device with no error in Moddable SDK 5.3.3, but with error in Moddable SDK 5.4.1.
Is there any work around or the fix code in httpserver.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions