Skip to content

ESP32 library missing WebServerSecure ? #3902

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

Closed
Twilight-Logic opened this issue Apr 12, 2020 · 37 comments
Closed

ESP32 library missing WebServerSecure ? #3902

Twilight-Logic opened this issue Apr 12, 2020 · 37 comments
Labels
Type: Feature request Feature request for Arduino ESP32

Comments

@Twilight-Logic
Copy link

Twilight-Logic commented Apr 12, 2020

Hardware:

Board: ESP32 Devkit V1, NodeMCU-32s compatible
ESP32 WROOM-32 WiFi module
Core Installation version: 1.0.4
IDE name: Arduino IDE 1.8.10, 1.8.12
Flash Frequency: not sure
PSRAM enabled: not sure
Upload Speed: 115200
Computer OS: Windows 7, Linux Mint 19.2

Description:

On the ESP32, WebServer corresponds to the ESP8266WebServer module. However, I am puzzled by the fact that when I type in #include <WebServerSecure.h> it turns bold red as though it was a recognized module, but I then get a compiler error telling me:

WebServerSecure.h: No such file or directory
Investigating further, the corresponding paths in each library were compared:

~/.arduino15/packages/esp8266/hardware/esp8266/2.6.3/libraries/ESP8266WebServer

and

~/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer

Among other things, these paths contains a file called keywords.txt. The ESP32 version contains as follows:

Code: [Select]

#######################################

Datatypes (KEYWORD1)

#######################################

WebServer KEYWORD1
WebServerSecure KEYWORD1
HTTPMethod KEYWORD1

So clearly 'WebServerSecure' is present as a defined keyword. However, although the ESP8266 path contains ESP8266WebServerSecure.h the ESP32 path does NOT contain a corresponding WebServerSecure.h as perhaps might be expected. Furthermore, the path ~/.arduino15/packages/esp8266/hardware/esp8266/2.6.3/libraries/ESP8266WiFi/src contains WiFiServerSecure.h, whereas the equivalent ESP32 library does not.

Having had a look at the ESP32 Git repository I discover the same.

Can anyone shed any light on this? Is this a file omission from the library, or was the secure version never implemented?

Sketch:

n/a

//Change the code below by your sketch
#include <Arduino.h>
#include <WebServer.h>
#include <WebServerSecure.h>

void setup() {
}

void loop() {
}

Debug Messages:

Arduino: 1.8.12 (Linux), Board: "NodeMCU-32S, 80MHz, 921600"

Multiple libraries were found for "WiFi.h"
AR488-ESP32-test2:73:33: fatal error: WebServerSecure.h: No such file or directory
 Used: /home/johnc/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
compilation terminated.
 Not used: /opt/arduino/libraries/WiFi
exit status 1
WebServerSecure.h: No such file or directory

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


@stale
Copy link

stale bot commented Jun 13, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Jun 13, 2020
@Twilight-Logic
Copy link
Author

Could we have a reply to this please?

@stale
Copy link

stale bot commented Jun 14, 2020

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Jun 14, 2020
@OBorce
Copy link

OBorce commented Aug 1, 2020

+1 for WebServerSecure

@Twilight-Logic
Copy link
Author

Still waiting for a reply from the devs?

@luc-github
Copy link
Contributor

@Twilight-Logic
Copy link
Author

Tried that. I did spend a few days re-developing my code for this library and even contacted the author because I had some issues with it which he was able to help me resolve. However, this library is completely different, MUCH bigger in terms of code size and memory usage, much more complex, and seems VERY slow. Furthermore this library is not available for the ESP8266 so this means I would have to support two separate code bases for the ESP8266 and ESP32 when surely a compatible and consistent approach could have been implemented?

@luc-github
Copy link
Contributor

luc-github commented Aug 3, 2020

@Twilight-Logic
Copy link
Author

Twilight-Logic commented Aug 3, 2020

I had not noticed the esp32_https_server_compat library before. Thanks for pointing it out. This does add another layer and hence further overhead and the quoted inefficiency of POST handling and support for Basic authentication only might be issues, but still worth a test perhaps. I will have a look at it.

@luc-github
Copy link
Contributor

Looking at https://github.com/fhessel/esp32_https_server_compat#state-of-development still some work need to be done so not sure it will meet your expectation anyway

For what it worth, on my side, I have noticed arduino Esp32 core webserver is slower than esp8266 so I do not think https version will be faster - I did not tested esp32_https_server yet but got good feedback and it is actively maintained

Another solution would be to use the native http / https from IDF - it is async and looks faster as it is used for camera but API is limited and need to be ported :

https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/esp_http_server/esp_http_server.h / https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/include/esp_https_server

@stale
Copy link

stale bot commented Oct 3, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Oct 3, 2020
@ZakCodes
Copy link

ZakCodes commented Oct 3, 2020

I think this should stay opened

@stale
Copy link

stale bot commented Oct 3, 2020

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Oct 3, 2020
@Twilight-Logic
Copy link
Author

Twilight-Logic commented Oct 5, 2020

I think they are probably expecting us to use the incompatible fhessel library but it would be helpful to hear from the devs and have this confirmed please.

@stale
Copy link

stale bot commented Dec 4, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Dec 4, 2020
@Twilight-Logic
Copy link
Author

Ok, looks like we are not going to get any reply to this then.

@stale
Copy link

stale bot commented Dec 5, 2020

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Dec 5, 2020
@Rp777
Copy link

Rp777 commented Dec 15, 2020

+1 for WebServerSecure
@me-no-dev Could we have a reply on this issue?

@stale
Copy link

stale bot commented Feb 13, 2021

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Feb 13, 2021
@ZakCodes
Copy link

let's keep this open

@stale
Copy link

stale bot commented Feb 13, 2021

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Feb 13, 2021
@FotoFieber
Copy link
Contributor

+1 for WebServerSecure

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 21, 2021
@ZakCodes
Copy link

Let's keep this open

@stale
Copy link

stale bot commented Aug 21, 2021

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Aug 21, 2021
@VojtechBartoska
Copy link
Contributor

Hello @Twilight-Logic , sorry for late reply. Are you able to test your issue on development version 2.0.3-RC1 to check if this is still valid? You can take a look on Docs where is explained how to choose development release version in Arduino IDE.

@VojtechBartoska VojtechBartoska added Resolution: Awaiting response Waiting for response of author Status: To be implemented Selected for Development labels Mar 30, 2022
@Twilight-Logic
Copy link
Author

Twilight-Logic commented Mar 30, 2022

Thank you for your response. I have tried both versions 1.8.19 and 2.0.0 rc5 of the IDE:

Arduino: 1.8.19 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"



AR488-ESP32-test2:80:33: fatal error: WebServerSecure.h: No such file or directory
 Used: /home/johnc/.arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/WiFi
compilation terminated.
 Not used: /opt/arduino/libraries/WiFi
exit status 1
WebServerSecure.h: No such file or directory


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

IDE2.0 rc5
/mnt/ntfs/Data/Data/Arduino/AR488/AR488-ESP32-test2/AR488-ESP32-test2.ino:80:33: fatal error: WebServerSecure.h: No such file or directory
compilation terminated.
Multiple libraries were found for "WiFi.h"
  Used: /home/johnc/.arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/WiFi
  Not used: /opt/arduino/libraries/WiFi
Compilation error: exit status 1

I am not really sure how the version of the IDE would have a bearing on a missing component of a library though? As might be expected, both versions here report the same problem.

@VojtechBartoska VojtechBartoska added Status: Awaiting triage Issue is waiting for triage and removed Resolution: Awaiting response Waiting for response of author labels Mar 31, 2022
@VojtechBartoska
Copy link
Contributor

Thanks, we will investigate this further.

@igrr igrr added Type: Feature request Feature request for Arduino ESP32 Status: Opened and removed Status: To be implemented Selected for Development Status: Awaiting triage Issue is waiting for triage labels Apr 5, 2022
@igrr
Copy link
Member

igrr commented Apr 5, 2022

Let's keep this feature request open.

@Twilight-Logic
Copy link
Author

Twilight-Logic commented Apr 6, 2022

Than you.

(If anyone has manually added the original ESP8266 WebseverSecure library - and I have heard that is has been done - I would be interested to know how it was done? The ESP32 library seems to have a somewhat different folder structure.)

Thank you for the links quoted earlier:
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/esp_http_server/esp_http_server.h / https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/include/esp_https_server
Unfortunately these are giving me a 404 error.

I found the first one here:
https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/esp32/include/esp_http_server/include/esp_http_server.h
The second one was here:
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32c3/include/esp_https_server/include/esp_https_server.h
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32s2/include/esp_https_server/include/esp_https_server.h
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32s3/include/esp_https_server/include/esp_https_server.h
I am not sure of the significance of c3, s2 or s3?
Shouldn't there also be a corresponding .cpp file?

It appreas to be possible to include this file in the project, however although it implements a HTTPS server config struct, it does not appear to implement a HTTPS server class object.

@hemangjoshi37a
Copy link

has this been solved yet ?

@Parsaabasi Parsaabasi removed the Status: Needs investigation We need to do some research before taking next steps on this issue label Jan 16, 2025
@Parsaabasi
Copy link

Hello,

Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature request Feature request for Arduino ESP32
Projects
Development

No branches or pull requests