Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadProhibited exception in SSL_pending when delivery page from SPIFFS #167

Open
dmarc1234 opened this issue Nov 16, 2022 · 1 comment
Open

Comments

@dmarc1234
Copy link

I have an issue where delivering pages results in a LoadProhibited exception on a pretty constant basis, the decoded exception results are as follows:

Decoding stack results
0x40193c9d: SSL_pending at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/openssl/library/ssl_lib.c line 574
0x400d9459: httpsserver::HTTPSConnection::pendingByteCount() at C:/Users/DavidMain/.arduinocdt/libraries/ESP32_HTTPS_Server/1.0.0/src/HTTPSConnection.cpp line 116
0x400d6d27: httpsserver::HTTPConnection::pendingBufferSize() at C:/Users/DavidMain/.arduinocdt/libraries/ESP32_HTTPS_Server/1.0.0/src/HTTPConnection.cpp line 258
0x401917d6: httpsserver::HTTPRequest::requestComplete() at C:/Users/DavidMain/.arduinocdt/libraries/ESP32_HTTPS_Server/1.0.0/src/HTTPRequest.cpp line 109
0x400d7e4d: httpsserver::HTTPConnection::loop() at C:/Users/DavidMain/.arduinocdt/libraries/ESP32_HTTPS_Server/1.0.0/src/HTTPConnection.cpp line 515
0x400d96be: httpsserver::HTTPServer::loop() at C:/Users/DavidMain/.arduinocdt/libraries/ESP32_HTTPS_Server/1.0.0/src/HTTPServer.cpp line 122
0x400d25e3: ethernet_task() at ../../src/ethernet_handler.cpp line 268
0x400d1f29: ethernet_thread(void*) at ../../main.cpp line 407
0x40089af1: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

This happens when delivering synchronously or asynchronously (using a task wrapper).

The pages are 5~15K in length and also call css and js functions so it could be that buffer is not long enough somewhere.

Any ideas ?

@dmarc1234
Copy link
Author

I have managed to overcome the above issue by reducing the size of the buffer used to write to the HTTPS response through res->write().

However, there is still something not working correctly as I am not getting all the web page files being delivered to the browser, Chrome or Firefox:

image

If I re-order the CSS file loading in the HTML webpage the later ones are the ones not delivered so it looks like the library is able to deliver a certain amount of data before falling over. I am still getting a lot of:

[HTTPS:I] New connection. Socket FID=63
[HTTPS:E] SSL_accept failed. Aborting handshake. FID=63
[HTTPS:I] Connection closed. Socket FID=63

Errors but these don't seem to be related to the files not being delivered but to the ones that are ie. re-tries.

Has anyone managed to deliver complex HTML pages though this library and if so then how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant