macOS · The Server Returned an Invalid Response

macOS Error Code -1011

The server response could not be parsed or was malformed.

errorLast verified 2026-11-08Apple Developer: NSURLErrorDomain
Quick answer

The server response could not be parsed or was malformed.

Code-1011
ProductmacOS
Company / originApple · United States
CategoryOperating Systems
Platform / versionsmacOS 12 and later · NSURLErrorDomain
Severityerror
Official sourceApple Developer: NSURLErrorDomain ↗
Last verified2026-11-08

What does macOS error -1011 mean?

NSURLErrorBadServerResponse (-1011) means the response did not conform to HTTP or the expected format. A proxy, captive portal, or misconfigured server may return an HTML page or truncated data where the app expects something else.

Common causes

  • A captive portal or proxy is intercepting the request.
  • The server returned malformed headers or a truncated body.
  • The app expects JSON but received HTML or an empty response.

How to fix it

  1. Step 1

    Open the URL in a browser and inspect the raw response with curl -i.

  2. Step 2

    Disable proxies or captive portals and retry.

  3. Step 3

    Fix the server response or make the client validate the content type.

When to escalate

Before you escalate: If a macOS URL error persists across networks and after restarting the app, capture the code, the URL, the time, and the Console log entries for the app, then contact the app developer or Apple Support with the details.

Related codes

CodeNameWhat it means
-1001The Request Timed OutThe request did not complete within the allowed time.
-1003Cannot Find HostThe hostname could not be resolved.
-1004Cannot Connect to HostThe host was found, but the connection could not be established.
-1005The Network Connection Was LostThe connection was established but then dropped.
-1006Cannot Find HostThe DNS lookup for the host failed.

Source & verification

This page was checked against Apple Developer: NSURLErrorDomain on 2026-11-08. The code, product, and platform fields are kept separate from the explanation so corrections can be made without changing the URL.

Open Error Codes is independent and not affiliated with Apple. Always confirm destructive or security-sensitive steps with the official documentation.