简体   繁体   中英

ionic 5/ Angular 8 - ios unable to connect to local network server

the iphone can connect to the testing server, however, with local.network providing the IP address 192.168.x.xx:3000 cannot connect with the error Failed to load resource: A server with the specified hostname could not be found. There is no problem with an Android device connecting but with iOS I receive the error above.

Also, I have changed the DNS manually to what is suggested in other posts to 8.8.8.8 however the issue still remains the same. thanks.

I run the command: $ ionic cordova run ios --device

this has something to with on which band you're connected to your wifi. You can resolve this by connecting to the 2.4Ghz band and not the 5Ghz. I still don't know why but it only happens with iOS devices. MacOS is all fine.

I found the answer here . I still yet to find out the reason, though.

I'm also building an ionic app when I encountered this but the same is true for vue3 and python.

I have a similar situation and the problem was the windows firewall.

Configuring my app to communicate through the Windows Defender Firewall over Public at Allowed Applications solved my problem.

View a print at this answer here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM