Issues while trying to setup ESP8266 NodeMCU

Hello Im working on a project and i want to connect to firebase but each time i try to compile I get those error messages, I added the library or Json 6.x and Firebase yet I still get those errors and idk what the issue is.

I want to upload it to a NodeMCU V3 not v1 but I cant seem to find a board option for it.

Thank you for any help in advance I almost am clueless with arduino I'm still a beginner but I have to use it for a project I'm working on. so please try to make it as easy as possible :')...

Arduino: 1.8.8 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Program Files (x86)\Arduino\libraries\firebase-arduino-master\src/Firebase.h:30:0,

from C:\Program Files (x86)\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22,

from C:\Users\Silver\AppData\Local\Temp\arduino_modified_sketch_610867\FirebaseDemo_ESP8266.ino:23:

C:\Program Files (x86)\Arduino\libraries\firebase-arduino-master\src/FirebaseObject.h:109:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6

std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;

^

In file included from C:\Program Files (x86)\Arduino\libraries\firebase-arduino-master\src/FirebaseArduino.h:22:0,

from C:\Users\Silver\AppData\Local\Temp\arduino_modified_sketch_610867\FirebaseDemo_ESP8266.ino:23:

C:\Program Files (x86)\Arduino\libraries\firebase-arduino-master\src/Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6

std::shared_ptr<StaticJsonBuffer<FIREBASE_JSONBUFFER_SIZE>> buffer_;

^

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

The errors are a bit confusing:

SphinixLike:
C:\Program Files (x86)\Arduino\libraries\firebase-arduino-master\src/Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6

You interpreted that to mean that you need to use ArduinoJson library 6.x, but that's not correct. What it really means is that the Firebase library was written for ArduinoJson 5.x and is not compatible with ArduinoJson 6.x. The authors of the ArduinoJson library wrote that warning to recommend that you update the code to be compatible with ArduinoJson 6.x. That is possible, but it's a bit complex and really that's a job for the authors of the Firebase library, not for a beginner. For you, I recommend a much more simple solution, which is to use the version of the ArduinoJson library that the Firebase library was written for:

  • Sketch > Include Library > Manage Libraries...
  • Wait for the download to finish.
  • In the "Filter your search..." field, type "arduinojson".
  • Press "Enter".
  • From the search results, click on "ArduinoJson by Benoit Blanchon".
  • From the dropdown version menu, select 5.13.5.
  • Click the "Install" button.
  • Wait for the installation to finish.
  • Click the "Close" button.

After doing that, the errors should no longer occur.

If you have that feature enabled, the Arduino IDE will occasionally notify you that a newer version of the ArduinoJson library is available. You will need to refrain from updating back to the 6.x version of the library, otherwise the error will come back.

1 Like