Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CERTIFICATE_VERIFY_FAILED #51

Open
JackieWaltRyan opened this issue Aug 13, 2024 · 1 comment
Open

CERTIFICATE_VERIFY_FAILED #51

JackieWaltRyan opened this issue Aug 13, 2024 · 1 comment

Comments

@JackieWaltRyan
Copy link

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
Copy link
Owner

vedfi commented Aug 14, 2024

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:

  • You can use 'tlsAllowInvalidCertificates=true' parameter in your connection string. Example connection string: mongodb+srv://username:password​@hostname/databaseName?tlsAllowInvalidCertificates=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants