kakajansh / echo

Laravel Echo for your Flutter apps.
MIT License
108 stars 69 forks source link

laravel_echo 0.2.1 not working on android but working on web platform #10

Closed amanc1361 closed 3 years ago

amanc1361 commented 4 years ago

this package can connect to server over HTTP but when using HTTPS only connect on web platform but not on mobile platform(android). please help

ajaygosh102 commented 3 years ago

Having the same question. can't connect through HTTPS from mobile

harisvm commented 3 years ago

Https requests from mobile not connecting to server , this is a serious issue need to be addressed if possible @kakajansh

ajaygosh102 commented 3 years ago

Having the same question. can't connect through HTTPS from mobile

fix is here. https://github.com/rikulo/socket.io-client-dart/issues/84#issuecomment-625232405

class MyHttpOverrides extends HttpOverrides {
  @override
  HttpClient createHttpClient(SecurityContext context) {
    return super.createHttpClient(context)
      ..badCertificateCallback =
          (X509Certificate cert, String host, int port) => true;
  }
}
void main() {
  HttpOverrides.global = new MyHttpOverrides();
  runApp(MyApp());
}
kakajansh commented 3 years ago

Closed for inactivity. Feel free to reopen.