vedfi / mondroid

Mongodb Client w/ Flutter
GNU General Public License v3.0
63 stars 7 forks source link

CERTIFICATE_VERIFY_FAILED #51

Open JackieWaltRyan opened 1 month ago

JackieWaltRyan commented 1 month ago

The application cannot connect to any databases. certificate error.

MongoDB ConnectionException: Could not connect to ac-8nlrzsf-shard-00-01.dggh3zl.mongodb.net:27017
- HandshakeException: Handshake error in client (OS Error: 
    CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:393))

Version: 1.0.11 GP Device: Huawei Nova Lite 2017

vedfi commented 1 month ago

Please make sure that your atlas ip whitelist configured.

If you still encounter CERTIFICATE_VERIFY_FAILED error; it means that you have to use a certificate file while connecting.

Mondroid uses mongo-dart as driver. It seems like certificate based connections are supported in mongo-dart: mongo-dart tls based connection mongo-dart x509 based connection

We may have to add support for selecting certificates to Mondroid in the future releases. Please let me know if you succeed.

EDIT: