Replies: 1 comment 1 reply
-
I cannot help because of using third party library and you have to debug your code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ESP32 cannot connect to Firebase When I use WifiManager Setup
I get this error repeatedly
15:00:07.428 -> Token info: type = id token (GITKit token), status = on request
15:00:07.428 -> Token info: type = id token (GITKit token), status = error
15:00:07.475 -> Token error: code: -4, message: connection lost
this is my void Setup()
`void setup() {
Serial.begin(115200);
//------------------------------
initSPIFFS();
// Load values saved in SPIFFS
ssid = readFile(SPIFFS, ssidPath);
pass = readFile(SPIFFS, passPath);
ip = readFile(SPIFFS, ipPath);
gateway = readFile (SPIFFS, gatewayPath);
Serial.println(ssid);
Serial.println(pass);
Serial.println(ip);
Serial.println(gateway);
//----------------------------
// Initialize Outputs
pinMode(output1, OUTPUT);
pinMode(output2, OUTPUT);
pinMode(output3, OUTPUT);
// Assign the api key (required)
config.api_key = API_KEY;
// Assign the user sign in credentials
auth.user.email = USER_EMAIL;
auth.user.password = USER_PASSWORD;
// Assign the RTDB URL (required)
config.database_url = DATABASE_URL;
// Assign the callback function for the long running token generation task */
config.token_status_callback = tokenStatusCallback; //see addons/TokenHelper.h
// Assign the maximum retry of token generation
config.max_token_generation_retry = 5;
// Initialize the library with the Firebase authen and config
Firebase.begin(&config, &auth);
// Streaming (whenever data changes on a path)
// Begin stream on a database path --> board1/outputs/digital
if (!Firebase.RTDB.beginStream(&stream, listenerPath.c_str()))
Serial.printf("stream begin error, %s\n\n", stream.errorReason().c_str());
// Assign a calback function to run when it detects changes on the database
Firebase.RTDB.setStreamCallback(&stream, streamCallback, streamTimeoutCallback);
delay(2000);
}`
Beta Was this translation helpful? Give feedback.
All reactions