Closed ChrSchultz closed 5 years ago
@ChrSchultz, this looks like a 3rd-party library issue. Your best best for help is to get in touch with the TinyGSM author for assistance, or try https://www.esp8266.com forums.
no I don't think that this is relatet to 3rd party lib. with esp8266-2.4.2it works fine and compilation runs. The error occurs after updating esp8266 bord-lib to 2.5.0-beta3(latest)
ArduinoHttpClient
isn't the same as our WiFiClient
and it looks like it has a function definition problem from what I see.
I'll reopen as maybe this was due to a change in our code. @d-a-v, did we do any signature changes in the Client
class?
The signature for flush() did change in its return value.
Having said that, this line:
virtual void flush() { return iClient->flush(); };
makes no sense. While it is legal to return a void value in a function declared with return void, I believe there is only one case where implementing in that way makes sense: template functions/methods, where the return type is a template parameter, and the return type of the called method must be the same as the return type of the caller method, and that parameter could potentially be void type. This is not the case here.
A method with return void like in the case shown should be implemented like this:
virtual void flush() { iClient->flush(); };
or this:
virtual void flush() { (void)iClient->flush(); };
or at worst this:
virtual void flush() { return (void)iClient->flush(); };
The ArduinoHttpClient library should be fixed to decouple the return types as above.
In addition, the ArduinoHttpClient library used is the one from arduino-libraries, and its implementation does not state explicitly that it supports the ESP. There could be hidden issues, such as timing, because standard implementations from arduino are not under the same timing restrictions as code for the ESP. I suggest either looking for an implementation that explicitly states ESP support, or using our ESP8266HttpClient.
@ChrSchultz Dear Christoph, Could you please let me know how to roll back to version 2.4.2? I use PlatformIO but for the life of me I can't figure out how to do this. I've perused the docs but to no avail. Many thanks!
It wIll be fixed with #5749
@d-a-v Regardless of #5749, could you please point me into the right direction on how to downgrade to a custom esp8266/Arduino firmware? I'd greatly appreciate it. Thanks!
@pfabri regardles the coming bugfix you can roll back platformio platform espressif8266 to 2.0.0 with:
pio platform install espressif8266@2.0.0
what maches esp8266 version 4.2.4 see
https://github.com/platformio/platform-espressif8266
and have a look on the releases.
@ChrSchultz Many thanks!
Can you send please working example of ssl with tinyGSM?
If I try to compile the TinyGSM-example forHttpClient (see file) test.ino.txt rename to .ino. I got the following errors:
If i use esp8266 library 4.2.4 (stable) compilation will work fine. so I think, the TinyGSM-library is working.
Arduino-IDE 1.8.8 windows-store Win10-64bit, TinyGSM, ESP8266-2.5.0-beta3 Lolin D1 mini.