• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

class FirebaseStream has no member named ‘to’

Q&A Forum › Category: ESP32 › class FirebaseStream has no member named ‘to’
0 Vote Up Vote Down
Pete Partee asked 4 years ago

Working through the examples from Firebase Web App with ESP32 and ESP8266 ebook and came across the following compilation error in Streaming_Database_ESP32_Arduino_IDE.ino:
‘class FirebaseStream’ has no member named ‘to’
Same error with the Streaming_Database_ESP8266_Arduino_IDE.ino file.

Here is the code segment, last line is where the error occurs:

// Callback function that runs on database changes
void streamCallback(FirebaseStream data){
Serial.printf(“stream 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();

// Get the path that triggered the function
String streamPath = String(data.dataPath());

/* When it first runs, it is triggered on the root (/) path and returns a JSON with all key
and values of that path.So, we can get all values from the database and updated the GPIO
states, PWM, and message on OLED*/
if (data.dataTypeEnum() == fb_esp_rtdb_data_type_json){
FirebaseJson *json = data.to<FirebaseJson *>();

Typo?

6 Answers
0 Vote Up Vote Down
Prakash answered 4 years ago

Yes. This happened me after copy paste, First bring Serial.printf code in one line and then split.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
What is the Firebase library version you have installed in your Arduino IDE?
Regards,
Sara

0 Vote Up Vote Down
Pete Partee answered 4 years ago

I’ve resolved the issue. I had installed version 2.3.7 of the of the Firebase library, as illustrated on page 41 of the Firebase Web App eBook. Everything worked fine until I tried to compile the Streaming_Database_ESP32_Arduino_IDE.ino example. 
After upgrading the library to the latest version, 2.6.2, the example compiles with no errors. 
Love your site and you’re examples always excellent! Keep up the good work.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great!

I’m glad the issue is solved.

Thanks for following and supporting our work.

I’ll mark this issue as resolved.

If you need further help, you just need to open a new question in our forum.

Regards,
Sara

0 Vote Up Vote Down
Philip Hart answered 4 years ago

Hi latest v2.6.4 resolved the issue for me too.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Yes, it is an issue related to the Library version.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.