Problem with ArduinoJson and UniversalTelegramBot

In file included from C:\Users\User\Documents\Arduino\libraries\IOXhop_FirebaseESP32-master/IOXhop_FirebaseESP32.h:8,
from D:\SEM 4\Mobile App\Firebase\Firebase.ino:2:
C:\Users\User\Documents\Arduino\libraries\IOXhop_FirebaseESP32-master/IOXhop_FirebaseStream.h:14:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6
StaticJsonBuffer<STREAM_JSON_BUFFER_SIZE> jsonBuffer;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\User\Documents\Arduino\libraries\IOXhop_FirebaseESP32-master/IOXhop_FirebaseESP32.h:8,
from D:\SEM 4\Mobile App\Firebase\Firebase.ino:2:
C:\Users\User\Documents\Arduino\libraries\IOXhop_FirebaseESP32-master/IOXhop_FirebaseStream.h:65:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see Redirecting… to learn how to upgrade your program to ArduinoJson version 6
return StaticJsonBuffer<STREAM_JSON_DATA_BUFFER_SIZE>().parseObject(_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

I moved your topic to an appropriate forum category @latip.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Hi @latip. This error means you're using a version of the "ArduinoJson" library that is not compatible with this code. The ArduinoJson library 6.x.x versions have breaking changes that make them not work with code written for the ArduinoJson 5.x.x versions.

The recommended solution is to roll back to the newest 5.x.x release of ArduinoJson. I'll provide instructions you can follow to do that:

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
  2. Type arduinojson in the "Filter your search..." field.
  3. Scroll down through the list of libraries until you see the "ArduinoJson by Benoit Blanchon" entry.
  4. You will see a drop-down version menu at the bottom of the entry. Select "5.13.5" from the menu.
  5. Click the "INSTALL" button at the bottom of the entry.
  6. Wait for the installation to finish.

Now try compiling or uploading your sketch again. The error should no longer occur.


The alternative solution is to update the code to work with the 6.x.x versions of the ArduinoJson library. You will find a guide to this here:


Reference:

https://arduinojson.org/v5/faq/error-jsonbuffer-was-not-declared-in-this-scope/