Closed PaoMian0806 closed 2 years ago
Update Firebase library to latest version.
Don't include the FirebaseJson as it is already built in the Firebase library.
Edit, move these 2 lines, WiFiClientSecure.h and FBJS_ENABLE_WIFI_CLIENT_SECURE to the top of your sketch
#include <WiFiClientSecure.h>
#define FBJS_ENABLE_WIFI_CLIENT_SECURE
and delete this line
#include <FirebaseJson.h>
Thank you very much! now it can be compiled. But after connecting to HTTPS and sending a GET request there is another problem:
21:54:42.958 -> Connecting to Wi-Fi.........
21:54:45.678 -> Connected with IP: 192.168.0.100
21:54:45.678 ->
21:54:45.678 -> Firebase Client v3.12.7
21:54:45.678 ->
21:54:45.678 -> Token info: type = id token, status = on request
21:54:47.916 -> Token info: type = id token, status = ready
21:54:47.916 -> Connecting to server... ok
21:54:50.937 -> Send GET request...
21:54:50.937 -> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
21:54:50.971 -> Core 1 register dump:
21:54:50.971 -> PC : 0x400d5dd3 PS : 0x00060a30 A0 : 0x800d6a36 A1 : 0x3ffb1d40
21:54:50.971 -> A2 : 0x00000000 A3 : 0x3ffb1d64 A4 : 0x00000010 A5 : 0x00000010
21:54:50.971 -> A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x800d19d0 A9 : 0x3ffb1d30
21:54:50.971 -> A10 : 0x00000010 A11 : 0x3f40053b A12 : 0x00000010 A13 : 0x0000ff00
21:54:51.005 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000018 EXCCAUSE: 0x0000001c
21:54:51.005 -> EXCVADDR: 0x0000000c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
21:54:51.005 ->
21:54:51.005 -> ELF file SHA256: 0000000000000000
21:54:51.005 ->
21:54:51.005 -> Backtrace: 0x400d5dd3:0x3ffb1d40 0x400d6a33:0x3ffb1d60 0x400d4db5:0x3ffb1d90 0x400d16f9:0x3ffb1db0 0x400dec04:0x3ffb1fb0 0x40089a7a:0x3ffb1fd0
21:54:51.005 ->
21:54:51.005 -> Rebooting...
21:54:51.038 -> ets Jun 8 2016 00:22:57
21:54:51.038 ->
21:54:51.038 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
21:54:51.038 -> configsip: 0, SPIWP:0xee
21:54:51.038 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
21:54:51.038 -> mode:DIO, clock div:1
21:54:51.038 -> load:0x3fff0018,len:4
21:54:51.038 -> load:0x3fff001c,len:1044
21:54:51.038 -> load:0x40078000,len:10124
21:54:51.038 -> load:0x40080400,len:5856
21:54:51.038 -> entry 0x400806a8
The rest of the code is the same as the previous one, I used EspExceptionDecoder to parse the error and then these messages appeared:
0x400d5d7f: get_value_buffer_length at C:\Users\PaoMian\Documents\Arduino\libraries\Firebase_ESP32_Client\src\json\MB_JSON/MB_JSON.c line 120
0x400d69df: MB_JSON_SerializedBufferLength at C:\Users\PaoMian\Documents\Arduino\libraries\Firebase_ESP32_Client\src\json\MB_JSON/MB_JSON.c line 120
0x400d4d61: FirebaseJsonBase::mGetSerializedBufferLength(bool) at C:\Users\PaoMian\Documents\Arduino\libraries\Firebase_ESP32_Client\src\json/FirebaseJson.cpp line 1229
0x400d16c5: FirebaseJson::serializedBufferLength(bool) at c:\users\paomian\documents\arduino\libraries\firebase_esp32_client\src\json/firebasejson.h line 236
: (inlined by) loop() at C:\Users\PaoMian\Documents\Arduino\Test3/Test3.ino line 125
0x400debb0: loopTask(void*) at C:\Users\PaoMian\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/main.cpp line 23
0x40089a7a: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 355 (discriminator 1)
I looked up some information on the web and reread the tutorials for this library, but I may have missed something and couldn't get the GET result to execute successfully.
I'm not sure you understand the http GET method request headers usage.
With GET request, the content-length header is not needed and it's invalid header.
And calling serializedBufferLength from NULL (constructed object but not yet initialized) FirebaseJson is useless.
The FirebaseJson constructor is only placeholder and should be initialized with some value before calling that function.
Hello, I am a student from Taiwan. I am using this library to get the Json file on the network and transfer it to the RTDB on Firebase. But I encountered an error when I compiled the following code:
And then this is the error message I encountered:
However, I was able to test the following examples(Firebase_ESP32_Client) separately and they worked fine:
FirebaseJson >> Client >> WiFiClientSecure
FirebaseJson >> Client >> Firebase
Basic
I apologize if this seems like a stupid question, maybe there is a better way to solve it, but my English reading skills are not very good. I'd appreciate any pointers, and I'm sorry to have wasted your time.
If the grammar seems strange, I used a translator to turn the Chinese into English.