Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Fairebase.failed() is always true with empty Firebase.error #474

@vodibe

Description

@vodibe

Hey, I can't connect to firebase, after any kind of commands (setInt, setFloat, getString ...), firebase.failed() method always returns true with an empty error. Here is what i tried to do:

  • I'm using a NodeMCU v3

  • Firebase database settings:
    { "rules": { ".read": true, ".write": true } }

  • Version of Firebase Arduino Library: 0.3

  • Version of ArduinoJson: 5.13.1

  • Double checked Firebase_Host, Firebase_Auth, Wifi_SSID, Wifi_PASSWORD

  • Here is my code:

#include <Firebase.h>
#include <FirebaseArduino.h>
#include <FirebaseCloudMessaging.h>
#include <FirebaseError.h>
#include <FirebaseHttpClient.h>
#include <FirebaseObject.h>

#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <String.h>

//VARIABILI FIREBASE
#define FIREBASE_HOST "myproj.firebaseio.com/"
#define FIREBASE_AUTH "xxxx"

//VARIABILI ESP8266
#define WIFI_SSID "wifi"
#define WIFI_PASSWORD "password"

String passcode = "";
void setup()
{
Serial.begin(9600);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(500);
}
Serial.print("\nconnected: ");
Serial.println(WiFi.localIP());

//////////////////////////////////
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
delay(500);
}

void loop()
{
passcode = Firebase.getString("user1");
if (Firebase.failed())
{
Serial.println("errore>>");
Serial.println(Firebase.error());
Serial.print(";;"+passcode);
Serial.println("<<");
}

if(Firebase.success())
{
Serial.print("\nserver = "+passcode);
Serial.print("\n###############");
}

delay(2500);
}
Cattura

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions