Repository navigation
Compiler Error while Update from 2.0.3 to 2.2.9 #329
|
HI I seems there is a missing definition of FIREBASE_SSE_TIMEOUT_MS in in my code i have the includes so what is going wrong ? |
Replies: 3 comments 11 replies
|
Thanks for reporting this issue. The library is now updated to v2.2.10 that fixes this issue. |
|
You should clean your project or delete I have tested with the following platformio.ini and code. Everything works fine platformio.ini [env:esp32dev]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
board = esp32dev
framework = arduino
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
lib_deps = mobizt/FirebaseClient
build_flags =
-D ENABLE_DATABASE
-D ENABLE_MESSAGING
-D ENABLE_SERVICE_AUTHCode #define WIFI_SSID "WIFI_AP"
#define WIFI_PASSWORD "WIFI_PASSWORD"
#define FIREBASE_PROJECT_ID "PROJECT_ID"
#define FIREBASE_CLIENT_EMAIL "CLIENT_EMAIL"
const char PRIVATE_KEY[] PROGMEM = "-----BEGIN PRIVATE KEY-----XXXXXXXXXXXX-----END PRIVATE KEY-----\n";
#define DATABASE_URL "URL"
#include <WiFi.h>
#include <FirebaseClient.h>
#include <ESP_SSLClient.h>
#include "ExampleFunctions.h"
void processData(AsyncResult &aResult);
void getMsg(Messages::Message &msg);
ServiceAuth sa_auth(FIREBASE_CLIENT_EMAIL, FIREBASE_PROJECT_ID, PRIVATE_KEY, 3000);
FirebaseApp app;
// WiFiClientSecure ssl_client;
WiFiClient wifi_client;
ESP_SSLClient ssl_client;
using AsyncClient = AsyncClientClass;
AsyncClient aClient(ssl_client);
RealtimeDatabase Database;
Messaging messaging;
bool onetimeTest = false;
void setup()
{
Serial.begin(115200);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
Firebase.printf("Firebase Client v%s\n", FIREBASE_CLIENT_VERSION);
// In case WiFiClientSecure is used.
// set_ssl_client_insecure_and_buffer(ssl_client);
ssl_client.setBufferSizes(2048, 1024);
ssl_client.setInsecure();
ssl_client.setClient(&wifi_client);
app.setTime(get_ntp_time());
Serial.println("Initializing app...");
initializeApp(aClient, app, getAuth(sa_auth), auth_debug_print, "🔐 authTask");
app.getApp<RealtimeDatabase>(Database);
app.getApp<Messaging>(messaging);
Database.url(DATABASE_URL);
}
void loop()
{
app.loop();
if (app.ready() && !onetimeTest)
{
onetimeTest = true;
Database.set<object_t>(aClient, "/examples/data/set", object_t("{\"title\":\"Greeting!\",\"message\":\"Hi, I'm JSON.\"}"), processData, "RealtimeDatabase_SetTask");
Messages::Message msg;
getMsg(msg);
messaging.send(aClient, Messages::Parent(FIREBASE_PROJECT_ID), msg, processData, "Messaging_SendMessageTask");
}
}
void processData(AsyncResult &aResult)
{
if (!aResult.isResult())
return;
if (aResult.isEvent())
Firebase.printf("Event task: %s, msg: %s, code: %d\n", aResult.uid().c_str(), aResult.eventLog().message().c_str(), aResult.eventLog().code());
if (aResult.isDebug())
Firebase.printf("Debug task: %s, msg: %s\n", aResult.uid().c_str(), aResult.debug().c_str());
if (aResult.isError())
Firebase.printf("Error task: %s, msg: %s, code: %d\n", aResult.uid().c_str(), aResult.error().message().c_str(), aResult.error().code());
if (aResult.available())
Firebase.printf("task: %s, payload: %s\n", aResult.uid().c_str(), aResult.c_str());
}
void getMsg(Messages::Message &msg)
{
msg.topic("test");
Messages::Notification notification;
notification.body("Notification body").title("Notification title");
msg.notification(notification);
}
|
|
Hello This means, the implementation of JWT will be included by In Version 2.0.3 I can include firebaseClient.h in several cpp modules but not in Version 2.2.10 |
I already update the library to v2.2.12, please try.