pusher_client
pusher_client copied to clipboard
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
Hello guys, I'm getting this error
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
Any suggestion ?
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(); ...
I'm getting the same exception even with HttpOverrides