[ESP32][CaptivePortal] - Guru Meditation Error LoadProhibited when using Captive Portal

If you are asking a question, please follow this template:

1. My goal is: [describe your goal]
Make captive portal (https://github.com/tripflex/captive-portal-wifi-stack) work properly on esp32

2. My actions are: [describe your actions - code, commands, etc]

  1. Installed captive portal as described in demo application https://github.com/tripflex/captive-portal-wifi-stack-demo
  2. Flashed program into esp32
  3. started application
  4. selected esp32 WIFI SSID
  5. inserted my wifi details (the wifi the esp32 should use)
  6. pressed save

3. The result I see is: [show the result - log, etc]
As I save the ssid details, esp32 goes in panic error as below

stacktrace shows this:

It looks a problem of esp32_wifi.c

4. My expectation & question is: [describe your expectation and your question]

Do you have any clue on why is this happening?

Thanks a lot for your precious support!
Marco

The wifi library 2.16 added esp_wifi_set_protocol, but did not check if protocol was not NULL.
The captive-portal-wifi-setup is not aware of this new feature and does not set the protocol field of struct mgos_config_wifi_sta.

Update mos to latest and it will be ok.

Wonderful! thanks @nliviu. You solved my problem!

Best
Marco