Git Product home page Git Product logo

Comments (3)

mobizt avatar mobizt commented on June 24, 2024

The bad request is from many reasons:

  • FIREBASE_HOST is not valid. Check it should not end with / and should not start with http://
  • FIREBASE_AUTH is not valid.
  • You set or push the JSON serialized string which contains some invalid tokens or invalid characters that cause the invalid JSON.
  • The node path parameter contains invalid tokens or empty.

The above list is total possible reasons of this error.

It's better to post the code here to check.

from firebase-arduino-wifi101.

hetkpatel avatar hetkpatel commented on June 24, 2024

Yea, here's the code:

#include "Firebase_Arduino_WiFi101.h"

FirebaseData firebaseData;

void setup() {
    Serial.begin(115200);
    delay(30000);
    Serial.println("Starting program");
    int status = WL_IDLE_STATUS;
    while (status != WL_CONNECTED){
        status = WiFi.begin(WIFI_SSID, WIFI_PASS);
        delay(300);
    }
    Firebase.begin(FIREBASE_URL, FIREBASE_TOKEN, WIFI_SSID, WIFI_PASS);

    String firstName;
    if (Firebase.getString(firebaseData, "firstName")) {
        firstName = firebaseData.stringData();
        Serial.println(firstName);
    } else {
        Serial.println(firebaseData.errorReason());
    }
}

void loop() {}

Things I've check so far:

  1. FIREBASE_URL starts with https and does not include a trailing /
  2. I assume FIREBASE_AUTH is my FIREBASE_TOKEN which is valid.
  3. I've tried connecting it to other WiFi sources like my phone's hotspot but still returns the same error.

from firebase-arduino-wifi101.

hetkpatel avatar hetkpatel commented on June 24, 2024

Solved it! Thanks.

from firebase-arduino-wifi101.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.