0

I am pretty new to flutter development. I am getting the following error on connecting to the server:

SocketException: Failed host lookup: 'server.com' (OS Error: nodename nor servname provided, or not known, errno = 8)

I already referred the below link, but this was of no help for me

How to solve SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7)

Currently I am testing my application on iOS simulator. Below are the versions I am using,

  • Http version - http: ^0.12.2
  • Flutter version - 1.22.4(Stable version)

The server is connecting when I am using mobile hotspot with my company's VPN enabled. But, I get this error when I switch to the company LAN.

All the APIs are working fine in postman when connected to LAN. I am using Android Studio. Is there any specific configuration to be made in flutter? Please let me know...

2
  • can you access 'server.com' from browser while you are on company LAN? Commented Jan 26, 2021 at 5:08
  • Yes I can access it from the browser. Also, the apis are working in postman when I am connected to LAN. The only issue is with flutter. Not sure why this is not working only in flutter. I am using Android Studio. Commented Jan 26, 2021 at 5:25

1 Answer 1

-3

Internet is off or signal is not strong. Check your LAN connection.

Sign up to request clarification or add additional context in comments.

1 Comment

This is not an answer, it should be a comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.