Город МОСКОВСКИЙ
00:06:11

unhandled handshakeException error in client | CERTIFICATE_VERIFY_FAILED: certificate has expired

Аватар
PythonTech
Просмотры:
24
Дата загрузки:
02.12.2023 05:16
Длительность:
00:06:11
Категория:
Обучение

Описание

in this video we will fix Unhandled Exception: HandshakeException: Handshake error in client (OS Error:
E/flutter : CERTIFICATE_VERIFY_FAILED: certificate has expired( handshake.cc:

================add this code to main.dart files ==================
1.add MyHttpOverrides class to your main.dart file :

class MyHttpOverrides extends HttpOverrides{
@override
HttpClient createHttpClient(SecurityContext? context)
{ return super.createHttpClient(context) ..badCertificateCallback =
(X509Certificate cert, String host, int port) = true; }
}


2. Add this line to main function:

HttpOverrides.global = new MyHttpOverrides();

Рекомендуемые видео