flutter_vlc_player icon indicating copy to clipboard operation
flutter_vlc_player copied to clipboard

SSL Error while building the app

Open arttobe opened this issue 4 years ago • 1 comments

I try to build my flutter app and I get the following error.

It seems that somewhere is an ssl certificate expired

-> Installing MobileVLCKit (3.3.15)
 > Http download
   $ /usr/bin/curl -f -L -o /var/folders/pj/2d8_b7sn6f37c48z4jj09xk80000gn/T/d20211117-1473-1c8uth/file.txz https://download.videolan.org/pub/cocoapods/prod/MobileVLCKit-3.3.15-8f0cf4ce-ce04499f.tar.xz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.11.2 cocoapods-downloader/1.4.0'

[!] Error installing MobileVLCKit
[!] /usr/bin/curl -f -L -o /var/folders/pj/2d8_b7sn6f37c48z4jj09xk80000gn/T/d20211117-1473-1c8uth/file.txz https://download.videolan.org/pub/cocoapods/prod/MobileVLCKit-3.3.15-8f0cf4ce-ce04499f.tar.xz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.11.2 cocoapods-downloader/1.4.0'

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem: certificate has expired More details here: https://curl.haxx.se/docs/sslcerts.html

arttobe avatar Nov 24 '21 21:11 arttobe

just add it to your main

``
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  @override
    HttpClient createHttpClient(SecurityContext? context) {
      return super.createHttpClient(context)
        ..badCertificateCallback =
            (X509Certificate cert, String host, int port) => true;
    }
  HttpOverrides.global = new CertificateVerify();
  runApp(MyApp(initialRoute: await ConnectionSettingsStore().initialRoute()));
}

JuniorFlorentino avatar Nov 25 '21 14:11 JuniorFlorentino