iC7Zi
iC7Zi

Reputation: 1658

A server with the specified hostname could not be found

When I try to submit my app on the App Store through Xcode I got this error.

A server with the specified hostname could not be found.

Is this temporary error at Apple or something to do with Xcode?

Is anyone else facing this problem?

Upvotes: 71

Views: 206504

Answers (22)

Oleg Granchenko
Oleg Granchenko

Reputation: 19

My problem was when my modem was working, but my provider did not work.

Upvotes: 0

Ahmad Majd
Ahmad Majd

Reputation: 23

I know my reply is late but it is better than not replying

Most likely there is a problem with the Internet But the fastest way after long attempts

run vpn

Upvotes: 0

Amin Rezaew
Amin Rezaew

Reputation: 338

This is network error, this issue fixed for me with turn off/on my network and run again...

This is just my experience and it's not always true, given that every situation is different and can be fixed in different ways.

Upvotes: 0

Deepak Ghadi
Deepak Ghadi

Reputation: 183

In my case this was occurring while validating build before upload. Just before that we had server issue. I tried restart Mac, quit Xcode multiple times, doesn't work. Also try to sign in from organiser but connection was not getting established.

Later from account, I tried sign in and thats done and then validate and build gets uploaded.

For xcode 12.4.1

Upvotes: 0

Daniel Beltrami
Daniel Beltrami

Reputation: 776

Just restart your network router device.

Obs. If it is already has automatic DNS settings.

Upvotes: 0

Faruk
Faruk

Reputation: 2449

If the problem occured in a MacOS project, as @nstein commented in this answer just go to your Target's Signing & Capabilities and allow Incoming and Outgoing network options.

Upvotes: 16

Haileapp
Haileapp

Reputation: 775

Turn off the push notification. Then,Restart your XCode and Turn back ON the Push Notification. It works for me.

Upvotes: -1

Akhil
Akhil

Reputation: 373

For me it was an issue with enabling Outgoing connections in Capabilities tab.

enter image description here

Upvotes: 20

Alex Chase
Alex Chase

Reputation: 1091

In Xcode, select Target -> Capabilities, and check "Outgoing Connections (Client)" to enable App Sandbox.

Upvotes: 58

datha
datha

Reputation: 359

I got this error message when "/" from my URL is missing . Hope this help someone.

ex: actual URL is "https://www.myweb.com/login" .My URL which "https://www.myweb.comlogin" caused this error

Upvotes: 0

AamirR
AamirR

Reputation: 12198

I faced this issue when we changed from one domain to another for API service.

Restarting the network router/modem fixed this issue.

Upvotes: 0

FedeH
FedeH

Reputation: 1363

I got this message when the device has mobile data turned on and no wifi connection, but the internet is not properly connected.

Try to connect to a wifi network with an internet connection or turning off the mobile data.

Upvotes: 1

0yeoj
0yeoj

Reputation: 4550

Just to share my experience

It was caused by the Sharing > Internet Sharing inside System Preferences

I was testing and created NAT64 Network unchecking it solved my problem.

enter image description here

Upvotes: 0

Szu
Szu

Reputation: 2252

I received A server with the specified hostname could not be found.. I figured out my MacOS app had turned on App Sandboxing. The easiest way to avoid problem is to turn off Sandbox.

Upvotes: 13

Mehul Thakkar
Mehul Thakkar

Reputation: 12594

First of all check your internet connection.. go to safari and check by searching something on google(dont try google.com only.. because it can be cached). If it is working fine, then try now in your app. It must work. This is fired while not having proper internet connection.

Upvotes: 0

Theofilos Papapanagiotou
Theofilos Papapanagiotou

Reputation: 5599

That fixed the problem for me, when trying to upgrade to El Capitan:

sudo softwareupdate --clear-catalog

Upvotes: 12

asheesh Verma
asheesh Verma

Reputation: 404

A server with the specified hostname could not be found.

I faced the same problem, In my case it was because of-

  1. Server was not configured properly.
  2. Server subscription has been expired

Contacting to server hosting company resolve my problem.

I think this is not temporary error at apple or something to do with Xcode?

Upvotes: 0

Alex Stone
Alex Stone

Reputation: 47328

I faced the same problem, it turned out to be VPN related. If you are testing on a device against a corporate network, chances are your Mac has proper VPN set up, but your phone does not. Connect phone to the corporate VPN for your apps deployed to device to see corporate servers.

Upvotes: 5

Moin Uddin
Moin Uddin

Reputation: 349

I faced same problem. Actually i face it often. Following three steps work for me always

  1. Change DNS to 8.8.8.8 and 4.2.2.2
  2. Open net.properties and change "# https.proxyPort=443" to "https.proxyPort=80". You can find net.properties here /Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/java/lib/net.properties
  3. Open Application Loader->Preferences->Advanced and uncheck Signiant and Aspera. Make sure DAV is checked.

Thants all. Now you can submit app using both application loader and Xcode.

Upvotes: 0

Grigo
Grigo

Reputation: 524

I restarted my MacBook Pro and then I build again, the error was fixed.

Upvotes: 3

Kjuly
Kjuly

Reputation: 35131

It might be DNS Pollution issue, at least for my case (in China).

If you're also in China or some places that has DNS Pollution issue, you might solve this by modifying the DNS (to 8.8.8.8 as an example) for your Mac as well.


I got this error inner my iPad App & this happens randomly, it's such boring. Keep trying is not a good solution for me, though it might works somehow. Finally, I just changed my Wi-Fi DNS and no more error now. Steps:

  1. Your device, Settings/Wi-Fi
  2. Choose connected Wi-Fi pot
  3. Press DHCP/DNS
  4. Set to 8.8.8.8

Upvotes: 43

Shane Rayner
Shane Rayner

Reputation: 670

Keep Trying!

I have had this a few times (including today), and each time, without changing anything, it has worked when I tried again.

Sometimes the 2nd time, other times 20 minutes later.

Upvotes: 22

Related Questions