Error map

Simulator can't reach localhost server NSURLErrorDomain -1004 on simulator: Could not connect to localhost:3000

iOS · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

Simulator can't reach localhost server — NSURLErrorDomain -1004 on simulator: Could not connect to localhost:3000 (iOS)Simulator c…built for iOS, linking for simulator — Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 (iOS)built for iOS, link…CDN: trunk URL couldn't be downloaded — [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/... (iOS)CDN: trunk URL coul…NSURLErrorCannotConnectToHost (-1004) — Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." (iOS)NSURLErrorCannotCon…Emulator can't reach localhost (use 10.0.2.2) — java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8080 (Android)Emulator can't reac…localhost resolves to ::1 — ECONNREFUSED ::1:3000 — Error: connect ECONNREFUSED ::1:3000 (macOS)localhost resolves …NSURLErrorCannotFindHost (-1003) — Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." (iOS)NSURLErrorCannotFin…Wi-Fi connected but no internet on Mac (DNS cache) — (behavior) Safari: "You are not connected to the Internet" while Wi-Fi shows connected (macOS)Wi-Fi connected but…Finder: There was a problem connecting to the server (SMB) — There was a problem connecting to the server "nas.local". Check the server name or IP address, and then try again. (macOS)Finder: There was a…Unable to boot the Simulator / Failed to boot simulator — Unable to boot device because it cannot be located on disk / Domain=NSPOSIXErrorDomain Code=60 Operation timed out (iOS)Unable to boot the …Metal API Validation / MTLCreateSystemDefaultDevice returns nil — Fatal error: Unexpectedly found nil while unwrapping an Optional value: MTLCreateSystemDefaultDevice() (iOS)Metal API Validatio…Unable to find a destination matching the provided destination specifier — xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:iOS Simulator, name:iPhone 15 } (iOS)Unable to find a de…NSURLErrorCancelled (-999) cancelled — Error Domain=NSURLErrorDomain Code=-999 "cancelled" (iOS)NSURLErrorCancelled…exec format error — exec /usr/local/bin/docker-entrypoint.sh: exec format error (Docker)exec format errorno matching manifest — no matching manifest for linux/arm64/v8 in the manifest list entries (Docker)no matching manifestcannot execute binary file — cannot execute binary file: Exec format error (Linux)cannot execute bina…ECONNREFUSED — Error: connect ECONNREFUSED 127.0.0.1:5432 (Node.js)ECONNREFUSEDPhaseScriptExecution — Xcode: Command PhaseScriptExecution failed with a nonzero exit code (iOS)PhaseScriptExecution407 — HTTP 407 Proxy Authentication Required (HTTP)407Could not resolve host — fatal: unable to access 'https://github.com/…': Could not resolve host: github.com (Git)Could not resolve h…port 22 timed out — ssh: connect to host github.com port 22: Connection timed out (Git)port 22 timed outkex_exchange_identification — kex_exchange_identification: Connection closed by remote host (Git)kex_exchange_identi…CLEARTEXT — CLEARTEXT communication to host not permitted by network security policy (Android)CLEARTEXTNetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…The emulator process for AVD was killed — Android Emulator: The emulator process for AVD x has terminated / was killed (hypervisor not available) (Android)The emulator proces…RPC failed — error: RPC failed; HTTP 400 curl 22 / curl 92 HTTP/2 stream was not closed cleanly — the remote end hung up unexpectedly (Git)RPC failedearly EOF — fatal: early EOF — fatal: index-pack failed (Git)early EOFERR_STREAM_PREMATURE_CLOSE — Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close (Node.js)ERR_STREAM_PREMATUR…NSURLErrorDomain Code=-1009 — Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." (iOS)NSURLErrorDomain Co…IPv6 enabled but broken: slow connections / Happy Eyeballs — Networking: Sites load slowly or hang for seconds — broken IPv6 (AAAA resolves, IPv6 route missing) falling back to IPv4 (Networking)IPv6 enabled but br…dig: status: SERVFAIL (DNSSEC validation failed) — Networking: dig: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL — resolver failed to answer (DNSSEC validation or upstream failure) (Networking)dig: status: SERVFA…fetch failed — TypeError: fetch failed (cause: ConnectTimeoutError / ECONNREFUSED / UND_ERR) (Node.js)fetch failedConnectionRefusedError — ConnectionRefusedError: [Errno 111] Connection refused (Python)ConnectionRefusedEr…requests ConnectionError — requests.exceptions.ConnectionError: HTTPSConnectionPool(host=…, port=443): Max retries exceeded with url (Python)requests Connection…Client.Timeout exceeded — Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded) (Docker)Client.Timeout exce…ssh port 22 Connection refused — ssh: connect to host x port 22: Connection refused (Linux)ssh port 22 Connect…ssh port 22 Connection timed out — ssh: connect to host x port 22: Connection timed out (Linux)ssh port 22 Connect…Failed to prepare device for development — Xcode: Failed to prepare device for development / iPhone is not available. Please reconnect the device (iOS)Failed to prepare d…integrity could not be verified — Unable to Install "App": This app cannot be installed because its integrity could not be verified (iOS)integrity could not…Cannot preview in this file — SwiftUI Preview: Cannot preview in this file — the preview crashed / failed to build (iOS)Cannot preview in t…Unexpectedly found nil — Fatal error: Unexpectedly found nil while unwrapping an Optional value (iOS)Unexpectedly found …Emulator: Process finished with exit code 139 / exited unexpectedly — The emulator process for AVD Pixel_6 has terminated (Android)Emulator: Process f…shallow update not allowed — ! [remote rejected] main -> main (shallow update not allowed) (Git)shallow update not …github-actions[bot] 403 — remote: Permission to owner/repo.git denied to github-actions[bot]. fatal: unable to access … The requested URL returned error: 403 (Git)github-actions[bot]…Failed to find target with hash string — Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted (Android)Failed to find targ…NSURLErrorDomain Code=-1001 — Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." (iOS)NSURLErrorDomain Co…NSURLErrorNetworkConnectionLost (-1005) — Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." (iOS)NSURLErrorNetworkCo…Background URLSession completion handler never called — (behavior) background download finishes but app isn't notified (iOS)Background URLSessi…

Directly related (12)

built for iOS, linking for simulatoriOS

Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

A library contains device-only arm64 code; Apple Silicon simulators also run arm64 and need a separate simulator slice.

CDN: trunk URL couldn't be downloadediOS

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/...

CocoaPods couldn’t reach its CDN spec repo — network/proxy issues, rate limiting, or an outdated CocoaPods.

NSURLErrorCannotConnectToHost (-1004)iOS

Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server."

The device reached the network but not the server.

Emulator can't reach localhost (use 10.0.2.2)Android

java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8080

Inside the emulator `localhost` is the emulator itself, not your computer.

localhost resolves to ::1 — ECONNREFUSED ::1:3000macOS

Error: connect ECONNREFUSED ::1:3000

`localhost` resolves to IPv6 first but the server listens on IPv4 only.

NSURLErrorCannotFindHost (-1003)iOS

Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found."

DNS failed for the host name.

Wi-Fi connected but no internet on Mac (DNS cache)macOS

(behavior) Safari: "You are not connected to the Internet" while Wi-Fi shows connected

The Mac has a link but can't resolve or route.

Finder: There was a problem connecting to the server (SMB)macOS

There was a problem connecting to the server "nas.local". Check the server name or IP address, and then try again.

Finder can't mount an SMB share.

Unable to boot the Simulator / Failed to boot simulatoriOS

Unable to boot device because it cannot be located on disk / Domain=NSPOSIXErrorDomain Code=60 Operation timed out

The iOS Simulator device can't start.

Metal API Validation / MTLCreateSystemDefaultDevice returns niliOS

Fatal error: Unexpectedly found nil while unwrapping an Optional value: MTLCreateSystemDefaultDevice()

Metal isn't available in this environment.

Unable to find a destination matching the provided destination specifieriOS

xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:iOS Simulator, name:iPhone 15 }

The simulator named in your command doesn't exist.

NSURLErrorCancelled (-999) cancellediOS

Error Domain=NSURLErrorDomain Code=-999 "cancelled"

A URLSession request was cancelled before completing.

Two steps away (35)

exec format errorDocker

exec /usr/local/bin/docker-entrypoint.sh: exec format error

The container tried to run a binary built for a different CPU architecture (arm64 vs amd64) — or a script with a broken shebang /…

no matching manifestDocker

no matching manifest for linux/arm64/v8 in the manifest list entries

The image has no build for your CPU architecture — typically pulling an amd64-only image on an Apple Silicon Mac or ARM server.

cannot execute binary fileLinux

cannot execute binary file: Exec format error

The program was built for a different CPU architecture or OS — e.g. an x86_64 binary on an ARM machine (Raspberry Pi, Graviton, A…

ECONNREFUSEDNode.js

Error: connect ECONNREFUSED 127.0.0.1:5432

Nothing is listening at that host:port — the target service is down or you’re connecting to the wrong address.

PhaseScriptExecutioniOS

Xcode: Command PhaseScriptExecution failed with a nonzero exit code

A Run Script build phase (CocoaPods, React Native, Flutter, SwiftLint, Crashlytics…) failed. The real error is above this line in…

407HTTP

HTTP 407 Proxy Authentication Required

A proxy between you and the server requires credentials before it will forward your request.

Could not resolve hostGit

fatal: unable to access 'https://github.com/…': Could not resolve host: github.com

DNS lookup for the Git host failed from this machine.

port 22 timed outGit

ssh: connect to host github.com port 22: Connection timed out

Outbound SSH on port 22 is blocked (firewall, corporate or public Wi-Fi).

kex_exchange_identificationGit

kex_exchange_identification: Connection closed by remote host

The SSH connection was closed before the handshake — server overload, rate limiting, or a proxy/firewall interfering.

CLEARTEXTAndroid

CLEARTEXT communication to host not permitted by network security policy

Android 9+ blocks plain `http://` requests by default; the app tried to call a non-HTTPS URL.

NetworkOnMainThreadExceptionAndroid

android.os.NetworkOnMainThreadException

The app made a network call on the main (UI) thread, which Android forbids.

The emulator process for AVD was killedAndroid

Android Emulator: The emulator process for AVD x has terminated / was killed (hypervisor not available)

The Android Emulator crashed or couldn’t start — usually missing hardware acceleration, low disk/RAM, or GPU driver problems.

RPC failedGit

error: RPC failed; HTTP 400 curl 22 / curl 92 HTTP/2 stream was not closed cleanly — the remote end hung up unexpectedly

A large HTTPS push/clone broke mid-transfer — size limits, proxies or flaky HTTP/2.

early EOFGit

fatal: early EOF — fatal: index-pack failed

A clone or fetch was cut off mid-transfer.

ERR_STREAM_PREMATURE_CLOSENode.js

Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close

A stream ended or was destroyed before it finished — often a client disconnect or upstream aborting a download.

NSURLErrorDomain Code=-1009iOS

Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline."

URLSession couldn’t reach the network — the device is offline, the app’s cellular data is disabled, or the simulator lost network…

IPv6 enabled but broken: slow connections / Happy EyeballsNetworking

Networking: Sites load slowly or hang for seconds — broken IPv6 (AAAA resolves, IPv6 route missing) falling back to IPv4

The client prefers IPv6, but the IPv6 path is broken, so every connection waits for a timeout before using IPv4.

dig: status: SERVFAIL (DNSSEC validation failed)Networking

Networking: dig: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL — resolver failed to answer (DNSSEC validation or upstream failure)

The DNS resolver couldn't get a valid answer, often because DNSSEC signatures are broken or the authoritative servers fail.

fetch failedNode.js

TypeError: fetch failed (cause: ConnectTimeoutError / ECONNREFUSED / UND_ERR)

Node’s built-in fetch (undici) couldn’t complete the request; the real reason is in error.cause.

ConnectionRefusedErrorPython

ConnectionRefusedError: [Errno 111] Connection refused

Nothing is listening on the host/port Python tried to connect to.

requests ConnectionErrorPython

requests.exceptions.ConnectionError: HTTPSConnectionPool(host=…, port=443): Max retries exceeded with url

requests couldn’t connect — the inner error (NewConnectionError, NameResolutionError, SSLError, ConnectTimeout) says why.

Client.Timeout exceededDocker

Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded)

Docker couldn’t reach the registry in time — a network, DNS, proxy or firewall problem between your machine and the registry.

ssh port 22 Connection refusedLinux

ssh: connect to host x port 22: Connection refused

The server answered, but nothing is listening on the SSH port — sshd isn’t running, it uses another port, or a firewall actively…

ssh port 22 Connection timed outLinux

ssh: connect to host x port 22: Connection timed out

SSH packets get no reply — a firewall/security group drops them, the server is off, or the IP is wrong.

Failed to prepare device for developmentiOS

Xcode: Failed to prepare device for development / iPhone is not available. Please reconnect the device

Xcode couldn’t set up the device — usually the device’s iOS version is newer than Xcode supports, Developer Mode is off, or pairi…

integrity could not be verifiediOS

Unable to Install "App": This app cannot be installed because its integrity could not be verified

iOS rejected the app because its signature doesn’t validate for this device — expired/revoked certificate, ad-hoc profile without…

Cannot preview in this fileiOS

SwiftUI Preview: Cannot preview in this file — the preview crashed / failed to build

Xcode Previews couldn’t build or run the view — compile errors elsewhere, a crash in preview data, or preview-specific environmen…

Unexpectedly found niliOS

Fatal error: Unexpectedly found nil while unwrapping an Optional value

Swift force-unwrapped (`!`) an optional that was nil, crashing the app.

Emulator: Process finished with exit code 139 / exited unexpectedlyAndroid

The emulator process for AVD Pixel_6 has terminated

The Android Emulator crashed while starting or running.

shallow update not allowedGit

! [remote rejected] main -> main (shallow update not allowed)

You pushed from a shallow clone to a remote that doesn’t accept shallow history.

github-actions[bot] 403Git

remote: Permission to owner/repo.git denied to github-actions[bot]. fatal: unable to access … The requested URL returned error: 403

A GitHub Actions workflow tried to push but the GITHUB_TOKEN doesn’t have write permission.

Failed to find target with hash stringAndroid

Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted

Gradle needs an SDK platform/build-tools that isn’t installed, or the licences haven’t been accepted on this machine.

NSURLErrorDomain Code=-1001iOS

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."

The server didn’t respond within URLSession’s timeout (60 s default) — slow server, unreachable host on this network, or a stalle…

NSURLErrorNetworkConnectionLost (-1005)iOS

Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."

The connection dropped mid-request.

Background URLSession completion handler never callediOS

(behavior) background download finishes but app isn't notified

The app didn't implement the background session hooks.