New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeating Error Code -3, Not Connected using v4.3.3 #468
Comments
The library works normally and there is nothing updated that involved this issue. |
I will check again and update. |
I'm seeing a clear difference between 4.3.2 & 4.3.3 here's serial log using 4.3.2 Connected with IP: 10.0.0.121 Current Boot Time (EDT): 01/21/2023 05:37:03 PMFirebase Client v4.3.2 01/21/2023 05:37:03 PM 01/21/2023 05:37:08 PM RTDB User Path: /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx 01/21/2023 05:37:09 PM sream path, /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx Pretty printed JSON data: 0, Type: object, Name: dht, Value: {"humitity":"19%","lastUpdated":1674330519425,"temperature":"71°F"} Received stream payload size: 147 (Max. 147) 01/21/2023 05:37:39 PM 01/21/2023 05:38:09 PM 01/21/2023 05:38:14 PM 01/21/2023 05:38:14 PM 01/21/2023 05:38:39 PM 01/21/2023 05:39:09 PM 01/21/2023 05:39:15 PM 01/21/2023 05:39:20 PM same code after clean install of 4.3.3 Connected with IP: 10.0.0.121 Current Boot Time (EDT): 01/21/2023 05:42:07 PMFirebase Client v4.3.3 01/21/2023 05:42:07 PM 01/21/2023 05:42:08 PM RTDB User Path: /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx 01/21/2023 05:42:09 PM sream path, /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx Pretty printed JSON data: 0, Type: object, Name: dht, Value: {"humitity":"19%","lastUpdated":1674330519425,"temperature":"71°F"} Received stream payload size: 147 (Max. 147) 01/21/2023 05:42:13 PM error code: -3, reason: not connected 01/21/2023 05:42:19 PM error code: -3, reason: not connected Port open 01/21/2023 05:42:30 PM RTDB User Path: /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx Pretty printed JSON data: 0, Type: object, Name: dht, Value: {"humitity":"19%","lastUpdated":1674330519425,"temperature":"71°F"} Received stream payload size: 147 (Max. 147) 01/21/2023 05:42:31 PM error code: -3, reason: not connected 01/21/2023 05:42:31 PM error code: -3, reason: not connected 01/21/2023 05:42:36 PM error code: -3, reason: not connected 01/21/2023 05:42:39 PM error code: -3, reason: not connected 01/21/2023 05:42:45 PM error code: -3, reason: not connected 01/21/2023 05:42:49 PM error code: -3, reason: not connected 01/21/2023 05:42:53 PM error code: -3, reason: not connected 01/21/2023 05:42:58 PM error code: -3, reason: not connected 01/21/2023 05:43:01 PM error code: -3, reason: not connected |
The library update is available, please update. |
After initial connection to RTDB using v4.3.3 i'm repeatedly getting "stream timed out, resuming..." followed by "error code: -3, reason: not connected" every 3 seconds. As you'll see in my example code, Firebase.ready() is being called repeatedly.
Opening port
Port open
Connecting to Wi-Fi.
Connected with IP: 10.0.0.121
Current Boot Time (EDT): 01/21/2023 04:11:37 PM
Firebase Client v4.3.3
01/21/2023 04:11:37 PM
Token info: type = id token (GITKit token), status = on request
01/21/2023 04:11:38 PM
Token info: type = id token (GITKit token), status = ready
RTDB User Path: /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx
01/21/2023 04:11:38 PM
01/21/2023 04:11:39 PM
stream timed out, resuming...
sream path, /users/xxxxxxxxxxxxxxxxxxxxxxxxxxxx
event path, /
data type, json
event type, put
Pretty printed JSON data:
{
"dht": {
"humitity": "19%",
"lastUpdated": 1674330519425,
"temperature": "71°F"
},
"serverTimeStamp": 1674333984382
}
Iterate JSON data:
0, Type: object, Name: dht, Value: {"humitity":"19%","lastUpdated":1674330519425,"temperature":"71°F"}
1, Type: object, Name: humitity, Value: "19%"
2, Type: object, Name: lastUpdated, Value: 1674330519425
3, Type: object, Name: temperature, Value: "71°F"
4, Type: object, Name: serverTimeStamp, Value: 1674333984382
Received stream payload size: 147 (Max. 147)
01/21/2023 04:11:43 PM
stream timed out, resuming...
error code: -3, reason: not connected
01/21/2023 04:11:46 PM
stream timed out, resuming...
error code: -3, reason: not connected
01/21/2023 04:11:50 PM
stream timed out, resuming...
error code: -3, reason: not connected
01/21/2023 04:11:53 PM
stream timed out, resuming...
error code: -3, reason: not connected
01/21/2023 04:11:56 PM
stream timed out, resuming...
error code: -3, reason: not connected
`/**
*/
#include <FB_Const.h>
#include <FB_Error.h>
#include <FB_Network.h>
#include <FB_Utils.h>
#include <Firebase.h>
#include <FirebaseFS.h>
#include <HttpsOTAUpdate.h>
#include <Update.h>
#include <esp_crt_bundle.h>
#include <ssl_client.h>
#include <WiFiClientSecure.h>
#include <ETH.h>
#include <SPI.h>
#include <SD.h>
#include <sd_defines.h>
#include <sd_diskio.h>
#include <FS.h>
#include <FSImpl.h>
#include <vfs_api.h>
#include <SPIFFS.h>
#include <MB_NTP.h>
#include <Arduino.h>
#if defined(ESP32) || defined(PICO_RP2040)
#include <WiFi.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#endif
#include <Firebase_ESP_Client.h>
// Provide the token generation process info.
#include <addons/TokenHelper.h>
// Provide the RTDB payload printing info and other helper functions.
#include <addons/RTDBHelper.h>
/* 1. Define the WiFi credentials */
#define WIFI_SSID "WIFI_AP"
#define WIFI_PASSWORD "WIFI_PASSWORD"
// For the following credentials, see examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino
/* 2. Define the API Key */
#define API_KEY "API_KEY"
/* 3. Define the RTDB URL */
#define DATABASE_URL "URL" //.firebaseio.com or ..firebasedatabase.app
/* 4. Define the user Email and password that alreadey registerd or added in your project */
#define USER_EMAIL "USER_EMAIL"
#define USER_PASSWORD "USER_PASSWORD"
// Define Firebase Data object
FirebaseData stream;
FirebaseData fbdo;
FirebaseAuth auth;
FirebaseConfig config;
unsigned long sendDataPrevMillis = 0;
int count = 0;
volatile bool dataChanged = false;
String fbDbPath;
void streamCallback(FirebaseStream data)
{
Serial.printf("sream path, %s\nevent path, %s\ndata type, %s\nevent type, %s\n\n",
data.streamPath().c_str(),
data.dataPath().c_str(),
data.dataType().c_str(),
data.eventType().c_str());
printResult(data); // see addons/RTDBHelper.h
Serial.println();
}
void streamTimeoutCallback(bool timeout)
{
Serial.println("***************");
printCurrentTime(true);
if (timeout)
Serial.println("stream timed out, resuming...\n");
}
void setup()
{
}
void loop()
{
}
void my_tokenStatusCallback(TokenInfo info)
{
/** fb_esp_auth_token_status enum
* token_status_uninitialized,
* token_status_on_initialize,
* token_status_on_signing,
* token_status_on_request,
* token_status_on_refresh,
* token_status_ready,
* token_status_error
*/
}
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 18000;
const int daylightOffset_sec = 3600;
#define TZ "EST5EDT,M3.2.0,M11.1.0"
void ntpInit() {
configTime(0, 0, ntpServer); // 0, 0 because we will use TZ in the next line
setenv("TZ", TZ, 1); // Set environment variable with your time zone
tzset();
}
void printCurrentTime(bool newLine) {
time_t now;
struct tm timeinfo;
}
`
The text was updated successfully, but these errors were encountered: