thorrak / tiltbridge

Tilt Hydrometer to WiFi Bridge
http://www.tiltbridge.com/
Other
61 stars 27 forks source link

Refactor https #132

Closed lbussy closed 3 years ago

lbussy commented 3 years ago

Probable help for #128 and #129. Still occasionally panics within HTTPClient::sendRequest() but I'm beating on it pretty hard (four sheets every 10 seconds.)

Removes SecureWithRedirects completely since HTTPClient::setFollowRedirects() is now a thing.

Have also moved back to the regular WiFiManager and AsyncWebServer since they seem to now work well together.

Additionally, I have removed the DHCP hack since that kills the stack with the current arduino-esp32 packages.

lbussy commented 3 years ago

The crash I am getting seems to be upstream in HTTPClient::~HTTPClient():

Backtrace: 0x4008f1e0:0x3ffcdaa0 0x4008f45d:0x3ffcdac0 0x401bd6e3:0x3ffcdae0 0x401bd72a:0x3ffcdb00 0x401bca53:0x3ffcdb20 0x40123265:0x3ffcdb40 0x400e3dc9:0x3ffcdb60 0x400e69ef:0x3ffce3a0 0x400de7ca:0x3ffce3c0 0x4012809d:0x3ffce3e0 0x400903f6:0x3ffce400
  #0  0x4008f1e0:0x3ffcdaa0 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x4008f45d:0x3ffcdac0 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x401bd6e3:0x3ffcdae0 in __cxxabiv1::__terminate(void (*)()) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:112
  #3  0x401bd72a:0x3ffcdb00 in std::terminate() at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:112
  #4  0x401bca53:0x3ffcdb20 in __cxa_pure_virtual at ??:?
  #5  0x40123265:0x3ffcdb40 in HTTPClient::~HTTPClient() at C:\Users\lee\.platformio\packages\framework-arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6\libraries\HTTPClient\src/HTTPClient.cpp:794
  #6  0x400e3dc9:0x3ffcdb60 in dataSendHandler::send_to_google() at src/sendData.cpp:148
  #7  0x400e69ef:0x3ffce3a0 in dataSendHandler::process() at src/sendData.cpp:630
  #8  0x400de7ca:0x3ffce3c0 in loop() at src/main.cpp:64
  #9  0x4012809d:0x3ffce3e0 in loopTask(void*) at C:\Users\lee\.platformio\packages\framework-arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6\cores\esp32/main.cpp:23
  #10 0x400903f6:0x3ffce400 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

Someone posted what they think fixes it here but I'm not sure if it happens enough to hack the arduino-esp32 code.