mobizt / Firebase-ESP32

[DEPRECATED]🔥 Firebase RTDB Arduino Library for ESP32. The complete, fast, secured and reliable Firebase Arduino client library that supports CRUD (create, read, update, delete) and Stream operations.
MIT License
414 stars 119 forks source link

Sometimes it get stuck at "on initializing" #227

Closed cfficaurzua closed 2 years ago

cfficaurzua commented 2 years ago

Sometimes it works just fine

Firebase Client v3.15.5

Token info: type = OAuth2.0 access token, status = on initializing
Token info: type = OAuth2.0 access token, status = on signing
Token info: type = OAuth2.0 access token, status = on request
Token info: type = OAuth2.0 access token, status = ready

but sometimes it get stuck at

Firebase Client v3.15.5

Token info: type = OAuth2.0 access token, status = on initializing

Sometimes it takes 5 min, but sometimes I wait more than an hour with no response. Is there anyway I can put a timeout?

Thanks

mobizt commented 2 years ago

It is the NTP time requesting process and no timeout because it's not blocking process.

It will stay at that process when the device time was not set yet.

You should check your internet connection (not WiFi).

mobizt commented 2 years ago

Or you can set the device time manually before calling Firebase.begin and make sure you get the valid timestamp from calling time(nullptr).

There are many examples on internet for device time setting from NTP server and RTC.

mobizt commented 2 years ago

I recommended you to update the library to v3.15.8.

This is the important update to fix stream and token initialization issues.

The token initialization process is now can be resumed when the internet connection lost and the timed out error during NTP server time synching will be reported.

cfficaurzua commented 2 years ago

Much appreciated

I recommended you to update the library to v3.15.8.

This is the important update to fix stream and token initialization issues.

The token initialization process is now can be resumed when the internet connection lost and the timed out error during NTP server time synching will be reported.