mobizt / Firebase-ESP-Client

[DEPRECATED]🔥Firebase Arduino Client Library for ESP8266, ESP32 and RP2040 Pico. The complete, fast, secured and reliable Firebase Arduino client library that supports RTDB, Cloud Firestore, Firebase and Google Cloud Storage, Cloud Messaging and Cloud Functions for Firebase.
MIT License
471 stars 100 forks source link

LoadProhibited-error in Firebase_Signer::handleTaskError() coming from Firebase_ESP_Client::begin() #523

Closed MartinXBcn closed 1 year ago

MartinXBcn commented 1 year ago

Hello,

with the last changes from 4.3.12 to 4.3.13 I get the following error already when initializing Firebase (still using external client, although at this moment there is not any external client yet assigned):

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4010eb62  PS      : 0x00060530  A0      : 0x8010f300  A1      : 0x3ffcf2d0  
A2      : 0x3ffc5ce8  A3      : 0xfffffffc  A4      : 0x00000000  A5      : 0x00000000
A6      : 0x3ffcf1d4  A7      : 0x3ffceee0  A8      : 0x00000000  A9      : 0x3ffcf2b0  
A10     : 0x00000000  A11     : 0x3ffc5d88  A12     : 0x00000000  A13     : 0x00000000
A14     : 0x00000068  A15     : 0x00000001  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x40085401  LEND    : 0x40085409  LCOUNT  : 0x00000027

Backtrace: 0x4010eb5f:0x3ffcf2d0 0x4010f2fd:0x3ffcf2f0 0x4010f86e:0x3ffcf360 0x400fa52b:0x3ffcf380 0x4013962a:0x3ffcf3d0 0x400d3496:0x3ffcf3f0 0x40144ee6:0x3ffcf4b0

  #0  0x4010eb5f:0x3ffcf2d0 in Firebase_Signer::handleTaskError(int, int) at .pio/libdeps/debug/Firebase Arduino Client Library for ESP8266 and ESP32/src/signer/Signer.cpp:880
  #1  0x4010f2fd:0x3ffcf2f0 in Firebase_Signer::tokenProcessingTask() at .pio/libdeps/debug/Firebase Arduino Client Library for ESP8266 and ESP32/src/signer/Signer.cpp:669
  #2  0x4010f86e:0x3ffcf360 in Firebase_Signer::handleToken() at .pio/libdeps/debug/Firebase Arduino Client Library for ESP8266 and ESP32/src/signer/Signer.cpp:485
  #3  0x400fa52b:0x3ffcf380 in Firebase_ESP_Client::begin(fb_esp_cfg_t*, fb_esp_auth_signin_provider_t*) at .pio/libdeps/debug/Firebase Arduino Client Library for ESP8266 and ESP32/src/Firebase.cpp:125

I am not sure what causes this error now (my code theoretically is unchanged since it worked with version 4.3.10). But curiously, when undoing the last change (i.e. deleting the last re-include)

1820 + if (noClient)
1821 +        freeClient(&tcpClient);

in src/signer/Signer.cpp I do not get the latest error mentioned above anymore ... but it returns the error recently reported in #521 ... Looks like that the problem is that tcpClient was deleted before. What I do not understand is why this problem has not occurred already in version 4.3.10.

Best regards, Martin

mobizt commented 1 year ago

I don't get any error and the update does the same thing as previously.

You should test with library installation instead of your modification.

mobizt commented 1 year ago

With the same code, there is no error in all tested platforms.

MartinXBcn commented 1 year ago

You are right. I said that my code was unchanged, but I missed that accidently, when changing back from my fork to your original library (thank you again for also making optional the use of SD, FS etc., that saves me to include unnecessarily five additional libraries (FS, SPI, SD, SPIFFS, Ethernet) and makes my fork obsolete), the flag USE_LEGACY_TOKEN_ONLY was set, which seems that it has caused my problem. At least it is working now.