GithubHelp home page GithubHelp logo

JWT error (Off-Topic) about esp_sslclient HOT 24 CLOSED

mobizt avatar mobizt commented on August 23, 2024
JWT error (Off-Topic)

from esp_sslclient.

Comments (24)

mobizt avatar mobizt commented on August 23, 2024

You should post in the Firebase repo.

First, you should update the library to latest version.

The Firebase function setUDPClient is now deprecated.

Normally you can set the time zone via FirebaseConfig i.e., config.time_zone and config.daylight_offset

You can set your device time yourself before calling Firebase.begin too which in this case, library will not touch your device time.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

I did not see the image. Please post your error here.

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

Please go to GitHub and don't reply email directly.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

Thanks for the suggestion
After upgrading the version, I found some problems using the latest FCM example.
fbdo.setEthernetClient(&eth, ETH_MAC, WIZNET_CS_PIN, WIZNET_RESET_PIN, nullptr);
Problems using DHCP
image
image

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

See the example, mac address is actually uint8_t array, you can't use something like std::initializer_list<uint8> .

uint8_t Eth_MAC[] = {0x02, 0xF0, 0x0D, 0xBE, 0xEF, 0x01};

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

Thanks to the author for the reminder

image
Token error: code: -115, message: NTP server time reading cannot begin when valid time is required because of no WiFi capability/activity detected. Please set the library reference time manually using Firebase.setSystemTime

Use esp32s3+w5500
I would like to ask if the new version uses external Client. Do I need to set anything in firebaseFS.h?
image

I only saw w5500 with esp8266
Didn't see support for esp32

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

The examples are here.

NTP server time reading cannot begin when valid time is required because of no WiFi capability/activity detected. Please set the library reference time manually using Firebase.setSystemTime

As the error shown, you use external client (Ethernet) to connect, and your WiFi is also off, library will not or unable to use your provided client to access NTP server to get the time as it required another UDP client which is now not included in this library.

It is your job to set your device time manually before calling Firebase.begin.

In some devices, user needs to set the library reference time to use internally via function Firebase.setSystemTime except for ESP8266 and ESP32 devices that library can take the time from its timer directly.

In your case, only set up your ESP32 device time before calling Firebase.begin (calling Firebase.setSystemTime after time was set is not necessary).

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

image
I tried using Firebase.setSystemTime
Setting the time keeps failing

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

The time 169445xxxx is the epoch time of tomorrow.

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024
Firebase.setSystemTime(1694425572); // Current Unix epoch Time

Serial.println(Firebase.getCurrentTime());
Serial.println(time(nullptr));

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

The function Firebase.setSystemTime should return true for valid time set.

You should write your code carefully to prevent such human error.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

image
I use Firebase.setSystemTime which always returns 0
But Serial.println(Firebase.getCurrentTime());
Serial.println(time(nullptr));
It shows that there is writing, but it still jumps. Token error: code: -115
image

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

Ok I will check this and update.

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

Now you can update library to v4.4.2 with this issue fixed.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

Thanks to the author. Successfully connected.
image
image
Is there any way to avoid clogging after unplugging the network cable?
I have tried using Firebase.reconnectWiFi(false) and it still gets blocked.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

image
image

image
Report an error using fbdo.setExternalClient

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

It's quite off topic here.

When using setEthernetClient There is 60 seconds waiting time for DHCP as long as Firebase.ready() was executed.

The function reconnectWiFi is applied only for WiFi and external client with network connection callback function.

The network connection callback function should do appropriate network disconnection first.

For GSM and Ethernet integration (setEthernetClient and setGSMClient), the network reconnection was self-controlled and done automatically without user consent which is the library purpose.

You have two choices in your case.

  1. Use setGenericClient with callbacks (formerly setExternalClient and callbacks)
  2. Temporary exclude Firebase.ready() from loop and pause the FirebaseData object with pauseFirebase(true) when you want to stop library to connect to server.

For Client

The client is generic/basic/plain network Arduino Client instead of SSL Client.

Please see the Readme and examples for new version.
https://github.com/mobizt/Firebase-ESP-Client/tree/main/examples/ExternalClient/RTDB/Generic

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

Report an error using fbdo.setExternalClient

Thanks for the bug report. I will check and update.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

fbdo.setGenericClient has the same error
image
image
image

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

I know it.

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

Now you can update the library to fix the issue.

from esp_sslclient.

back920096 avatar back920096 commented on August 23, 2024

Already running normally
I'm happy to help you find the bug

from esp_sslclient.

mobizt avatar mobizt commented on August 23, 2024

Thanks, the issue is usually found as the main library core has changed with huge improvement in memory and performance in v4.4.x.

from esp_sslclient.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.