chinloyal / pusher_client

A Pusher Channels Client for Fluttter (Fully supports Android and iOS)
https://pusher.com/channels
MIT License
42 stars 175 forks source link

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

Open YassineChe opened 2 years ago

YassineChe commented 2 years ago

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

omar-hadek commented 1 year ago

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(); ...

mark-hkz commented 1 year ago

I'm getting the same exception even with HttpOverrides