jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
639 stars 115 forks source link

POST and WebSocket does not work :-( #10

Closed vrubel closed 6 years ago

vrubel commented 6 years ago

Examples from the delivery were used

On POST: 500 Internal Server Error Server got itself in trouble

On MicroWebSocket Test: ERROR : undefined

-- DISCONNECTED --

Client - Firefox 57.0.4

P.S. GET - OK test.pyhtml - OK

jczic commented 6 years ago

Hello, What's your microcontroller ? That's works on firefox for pycom and ESP32 normally. It's maybe an out of memory internal error ? MicroWebSrv with all modules requires a lot of memory.

2018-01-27 15:52 GMT+01:00 vrubel notifications@github.com:

Examples from the delivery were used

On POST: 500 Internal Server Error Server got itself in trouble

On MicroWebSocket Test: ERROR : undefined

-- DISCONNECTED --

Client - Firefox 57.0.4

P.S. GET - OK test.pyhtml - OK

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jczic/MicroWebSrv/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAegLN8G6zFstijGYzRYzbtDHoXI_o_Bks5tOzgYgaJpZM4RvUU0 .

--

Sincèrement,

vrubel commented 6 years ago

I use LOLIN32 Pro and micropython from loboris

I do not think that the reason is lack of memory:

>>> micropython.mem_info()
stack: 752 out of 19456
GC: total: 3201728, used: 13152, free: 3188576
 No. of 1-blocks: 162, 2-blocks: 27, max blk sz: 324, max free sz: 199222
>>> machine.heap_info()
Heap outside of MicroPython heap:
---------------------------------
              Free: 166892
         Allocated: 92040
      Minimum free: 166748
      Total blocks: 229
Largest free block: 113804
  Allocated blocks: 225
       Free blocks: 4

SPIRAM info:
------------
              Free: 913448
         Allocated: 3280672
      Minimum free: 910004
      Total blocks: 37
Largest free block: 912776
  Allocated blocks: 32
       Free blocks: 5

In addition, the most memory-intensive task (rendering pyhtml) - is working ok.

Liberasys commented 6 years ago

Loboris has kindly updated MicroWebSrv after my request. See : https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/issues/39 Now websocket example is working with Loboris ESP32 firmware. NB : websocket server in menuconfig is not the one that comes with MicroWebSrv.

vrubel commented 6 years ago

I used MicroWebSrv code from your repository. (and not in menuconfig). Thank you. I will try again. I'll build the last version of the micropython from Loboris.

vrubel commented 6 years ago

I confirm. Everything worked. Thank you so much.

jczic commented 6 years ago

Thank you guys :)

2018-01-29 14:30 GMT+01:00 vrubel notifications@github.com:

Closed #10 https://github.com/jczic/MicroWebSrv/issues/10.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jczic/MicroWebSrv/issues/10#event-1446306273, or mute the thread https://github.com/notifications/unsubscribe-auth/AAegLKh03Qbk9PBPiQRL_EOPkBsWlqEMks5tPcgQgaJpZM4RvUU0 .

--

Sincèrement,