pusher_client icon indicating copy to clipboard operation
pusher_client copied to clipboard

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Open YassineChe opened this issue 2 years ago • 2 comments

Hello guys, I'm getting this error java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. Any suggestion ?

YassineChe avatar Jul 28 '22 19:07 YassineChe

i think this error related to http with older devices if you are using http package try override the client trust the certificate class MyHttpOverrides extends HttpOverrides { @override HttpClient createHttpClient(SecurityContext? context) { return super.createHttpClient(context) ..badCertificateCallback = (X509Certificate cert, String host, int port) => true; } } call it inside main void main() async { HttpOverrides.global = new MyHttpOverrides(); ...

omar-hadek avatar Oct 31 '22 10:10 omar-hadek

I'm getting the same exception even with HttpOverrides

mark-hkz avatar Aug 09 '23 07:08 mark-hkz