natady
natady

Reputation: 1

Flutter iOS Emulator 'Failed Host Lookup' Error

Hello fellow developers

I'm developing a location-sharing application with Flutter. When I launch the iOS emulator, I encounter a 'Failed host lookup' error. This issue is happening for both the map server and the backend server. Strangely, some HTTP requests are successful. I have been investigating for a day but cannot determine the cause. Please help me.

What I've tried

Example Error Messages

flutter: ClientException with SocketException: Failed host lookup: 'cyberjapandata.gsi.go.jp' (OS Error: nodename nor servname provided, or not known, errno = 8), uri=https://cyberjapandata.gsi.go.jp/xyz/std/16/56527/26252.png?

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: ClientException with SocketException: Failed host lookup: 'xxx.supabase.co' (OS Error: nodename nor servname provided, or not known, errno = 8), uri=https://xxx.supabase.co/rest/v1/yyy
#0      IOClient.send (package:http/src/io_client.dart:119:7)

Screenshot

my app screenshot

Upvotes: 0

Views: 1083

Answers (1)

Shahed Emon
Shahed Emon

Reputation: 153

Add in info.plist

<key>NSAppTransportSecurity</key>
            <dict>
                <key>NSAllowsArbitraryLoads</key>
                <true/>
                <key>NSAllowsArbitraryLoadsInWebContent</key>
                <true/>
            </dict>

Upvotes: 1

Related Questions