tobiasschuerg / InfluxDB-Client-for-Arduino

Simple library for sending measurements to an InfluxDB with a single network request. Supports ESP8266 and ESP32.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library error

Ursu-Alex opened this issue · comments

Same issue, version 3.0.0 of the esp32 core has broken it, need to fix the library or roll back.

And how to fix the library ?

Someone will have to make changes to the library, or create a pull request.

Library migration guide: https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

In Arduino (and other frameworks) the method named flush() is intended to send out the transmit buffer content. WiFiClient and WiFiUDP method flush() won’t clear the receive buffer anymore. A new method called clear() is now used for that. Currently flush() does nothing in WiFiClient, WiFiClientSecure and WiFiUDP.

WiFiServer has functions accept() and available() with the same functionality. In Arduino, available() should work differently so it is now deprecated.

WiFiServer had unimplemented write functions inherited from Print class. These are now removed. Also unimplemented method stopAll() is removed. The methods were unimplemented because WiFiServer doesn’t manage connected WiFiClient objects for print-to-all-clients functionality.

OK , thank you .

The first post didn't add any info about the cause of the problem. The required information in the template needs to be properly filled.
Thanks others for adding more info.

I'm on it, and it will be fixed soon.

I can confirm rolling back to 2.0.13 (ESP32 Core) is a workaround for now.

In file included from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxDbClient.h:31,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxDbClient.cpp:27:
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.h:87:5: error: 'WiFiClient' does not name a type
87 | WiFiClient *_wifiClient = nullptr;
| ^~~~~~~~~~
In file included from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxDbClient.h:31,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxData.h:27,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxData.cpp:27:
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.h:87:5: error: 'WiFiClient' does not name a type
87 | WiFiClient *_wifiClient = nullptr;
| ^~~~~~~~~~
In file included from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxDbClient.h:31,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxData.h:27,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxDb.h:30,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\InfluxDb.cpp:27:
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.h:87:5: error: 'WiFiClient' does not name a type
87 | WiFiClient *_wifiClient = nullptr;
| ^~~~~~~~~~
In file included from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\BucketsClient.h:30,
from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\BucketsClient.cpp:27:
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src/HTTPService.h:87:5: error: 'WiFiClient' does not name a type
87 | WiFiClient *_wifiClient = nullptr;
| ^~~~~~~~~~
In file included from C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:2:
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.h:87:5: error: 'WiFiClient' does not name a type
87 | WiFiClient _wifiClient = nullptr;
| ^~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp: In constructor 'HTTPService::HTTPService(ConnectionInfo
)':
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:37:5: error: 'WiFiClientSecure' was not declared in this scope; did you mean 'NetworkClientSecure'?
37 | WiFiClientSecure *wifiClientSec = new WiFiClientSecure;
| ^~~~~~~~~~~~~~~~
| NetworkClientSecure
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:37:23: error: 'wifiClientSec' was not declared in this scope
37 | WiFiClientSecure wifiClientSec = new WiFiClientSecure;
| ^~~~~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:37:43: error: 'WiFiClientSecure' does not name a type; did you mean 'NetworkClientSecure'?
37 | WiFiClientSecure wifiClientSec = new WiFiClientSecure;
| ^~~~~~~~~~~~~~~~
| NetworkClientSecure
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:47:5: error: '_wifiClient' was not declared in this scope
47 | _wifiClient = wifiClientSec;
| ^~~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:49:5: error: '_wifiClient' was not declared in this scope
49 | _wifiClient = new WiFiClient;
| ^~~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:49:23: error: 'WiFiClient' does not name a type
49 | _wifiClient = new WiFiClient;
| ^~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp: In destructor 'HTTPService::~HTTPService()':
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:64:6: error: '_wifiClient' was not declared in this scope
64 | if(_wifiClient) {
| ^~~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:65:12: error: type '' argument given to 'delete', expected pointer
65 | delete _wifiClient;
| ^~~~~~~~~~~
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp: In member function 'bool HTTPService::beforeRequest(const char
)':
C:\Users\alexu\Documents\Arduino\libraries\ESP8266_Influxdb\src\HTTPService.cpp:135:28: error: '_wifiClient' was not declared in this scope
135 | if(!_httpClient->begin(
_wifiClient, url)) {
| ^~~~~~~~~~~

exit status 1

Compilation error: exit status 1

Duplicate of #226. Fixed with #234.