Skip to content
Browser messages3 min read

ERR_HTTP2_PROTOCOL_ERROR in Chrome

ERR_HTTP2_PROTOCOL_ERROR

Short answer

ERR_HTTP2_PROTOCOL_ERROR means Chrome received a response from the server that broke the HTTP/2 protocol rules, or the response was cut off midway, so it refused to show the page. Usually the cause is invalid headers or a truncated response from a server-side error or timeout; sometimes it's antivirus inspecting HTTPS on the visitor's device.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Common causes
  2. How to fix it
  3. Prevention
  4. On ArabyHost

HTTP/2 is a strict binary protocol: every response is split into frames with precise rules, and any violation makes the browser cancel the whole request. So the same code can work over HTTP/1.1 with no visible problem and fail over HTTP/2. Sometimes the error takes over the whole page; sometimes it shows only in the DevTools Console for one resource, such as a script or an image.

Common causes

  • A truncated response: a PHP script timed out or died while sending, so only part of the response arrived.
  • Invalid headers: a header with disallowed characters or a line break, often from putting user input into header().
  • Oversized headers: many or huge cookies set by different plugins.
  • Double compression: the application compresses with Gzip and the server compresses again, or Content-Length doesn’t match the real size.
  • Antivirus inspecting HTTPS and altering the connection, or a VPN or proxy.
  • A full disk quota, so temporary files can’t be written and the response is cut.
  • An outdated browser or corrupted cache.

How to fix it

If you’re a visitor

  1. Update Chrome to the latest version.
  2. Try a private window, then clear the site’s cache and cookies.
  3. Temporarily disable HTTPS scanning in your antivirus and turn off any VPN.
  4. Try another browser or network. If the site works there, tell the owner which browser showed the error.

If you own the site

  1. Compare HTTP/2 with HTTP/1.1:

    curl -sv --http2 -o /dev/null https://example.com/page 2>&1 | tail -n 20
    curl -sv --http1.1 -o /dev/null https://example.com/page 2>&1 | tail -n 20

    If HTTP/1.1 succeeds and HTTP/2 shows stream error or PROTOCOL_ERROR, inspect the headers and the response size.

  2. Read the logs in cPanel » Metrics » Errors and the site’s error_log, looking for timeouts or PHP errors at the time of the request.

  3. Check your code: never pass unsanitized user input to header(), and make sure nothing is printed before headers are sent (see Cannot modify header information).

  4. Stop double compression: if compression is on in a plugin and in PHP at the same time, keep one. In PHP you can set zlib.output_compression = Off in cPanel » Software » MultiPHP INI Editor.

  5. Check disk space: if the account is full, free space first; see disk quota exceeded.

  6. Trim cookies: if the error only appears after logging in, check cookie sizes in DevTools and remove what isn’t needed.

Prevention

  • Test the site in Chrome after adding any security plugin that sets headers, or any caching plugin.
  • Don’t enable compression in more than one layer.
  • Move long-running work to the background so responses aren’t cut off by timeouts.

On ArabyHost

Sites run on the LiteSpeed web server. You can read the logs in cPanel, one click from the Araby Panel, or ask the Araby AI assistant, which reads error logs and explains why a response was cut. Every account has its own resource limits and disk space, so check Resource Usage and disk usage if the error keeps coming back. If the logs don’t show the cause, send the output of the curl commands above to Arabic-speaking support via the contact page.

FAQ

Is the fix to disable HTTP/2?

No. Disabling HTTP/2 may hide the symptom but doesn't fix the cause, such as a bad header or a truncated response. Find and fix the cause; the protocol itself is stable and supported by every modern browser.

Why does it happen in Chrome but not Firefox?

Browsers differ in how much they tolerate malformed responses, and Chrome is stricter in some cases. An error in one browser usually means the response is borderline and should be fixed on the server.

The Console shows it for one file only. Does it matter?

Yes, if that file is a script or stylesheet the page needs, because it won't load. Open the file's URL directly and test it with curl to see why it's cut off.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.