Error connecting "CERTIFICATE_VERIFY_FAILED: certificate has expired"

Hi,

I am currently building Flutter applications with Dart and getting the following error:
client exception - HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: certificate has expired(handshake.cc:393)

It is no problem on the Windows desktop app, but not on Android device.
Here is additional information:

  • Device: Galaxy Tab S2
  • OS: Android (7.0)
  • Dependency used in the Flutter project: mqtt_client: ^9.7.2

How can I solve this problem?

Thanks,