Skip to content

Update Docs: "ClientException with SocketException: Failed host lookup"; Android requires specific configurations to work #128

Description

@KingRial

Just wanted to let you know that flutter, on Android, has still this problem: dart-lang/http#877

It means that, whenever you are using an external browser to manage the authentication process and the App (using this package) goes in background and the authentication process fails with error:
ClientException with SocketException: Failed host lookup: 'xxx.yyy.zzz' (OS Error: No address associated with hostname, errno = 7)

The only way, I discovered, to solve the situation is:

  • Using LaunchMode.inAppWebView (please be aware webview don't support self signed certificates!)
urlLauncher(String url) async {
    var uri = Uri.parse(url);
    await launchUrl(uri, 
        mode: LaunchMode.inAppWebView,
      );
  }

It could be usefull to add these informations on the docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions