Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
First identify where the error occurs. An HTTP 500 returned by the site you are testing is a valid HTTP response; Playwright can return it from page.goto() without throwing a navigation exception. A message such as ProtocolError: Protocol error (Browser.getVersion): Internal server error, session closed. during browser startup is a different failure. The words “Internal server error” alone do not identify one shared cause.
Copy the full error and note whether it appears while navigating to your app or API, or before that—during Chromium launch, UI mode, or code generation. The timing determines which checks are useful.
Which kind of “internal server error” are you seeing?
Playwright is the client that drives a browser; it is not necessarily the system that generated the error. The phrase can describe either a response from the website under test or a failure in the browser-control connection. Start by finding the failing operation in the log.
An HTTP 500 from the site under test
If the error occurs after page.goto(url) and the response has status 500, the server or an upstream service returned an HTTP error response. That is different from Playwright failing to navigate. The Page API documents that page.goto() returns the main resource response and does not throw merely because a remote server returned a valid HTTP status, including 404. Check the returned response status and the page content; do not treat the absence of a thrown exception as a passing test.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
A browser protocol error during launch
If the message is a protocol error such as Protocol error (Browser.getVersion): Internal server error, session closed., and it occurs while Chromium is starting or being controlled, the test may not have reached the page at all. The browser process or its control connection has closed. A GitHub report using that wording is an example of the message, not proof that every occurrence has the same cause.
An “Internal Server Error” page from a proxy
A third possibility is that navigation through a proxy returns an HTML error page. One reported proxy case described such a page even though curl worked with the same proxy URL and credentials. That mismatch is a reason to compare the actual request paths and environments—not evidence that either tool is universally at fault.
Find the failing stage before changing settings
- Save the complete error. Include the stack trace and the first failing Playwright operation, not just the phrase “Internal server error.”
- Mark when it happens. Is it before a browser window or page exists, at
page.goto(), or after navigation while your test interacts with the page? - Record the response if navigation completed. A non-null response with status 500 points to an HTTP response. A rejected navigation or a browser disconnect calls for a different investigation.
- Reduce the test. Try a single browser launch and one navigation, without parallel workers, proxy configuration, custom launch flags, or test-specific setup. Restore those pieces one at a time.
- Compare environments. Note whether the failure reproduces locally and in CI, and whether it affects one browser or every browser you run. These comparisons narrow the search; they do not establish a cause by themselves.
Check whether the application returned HTTP 500
Capture the response and assert on it
For a normal navigation, inspect the response object. This Node.js example prints the status when a main-resource response exists and fails the test explicitly for a server error. Replace the URL with the page you are testing.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const { test, expect } = require('@playwright/test');
test('page does not return a server error', async ({ page }) => {
const response = await page.goto('https://example.com');
if (response) {
console.log('Navigation status:', response.status());
console.log('Navigation URL:', response.url());
}
expect(response, 'expected a main-resource response').not.toBeNull();
expect(response.status(), 'server returned an HTTP 5xx response').toBeLessThan(500);
});
This check fails for any status of 500 or higher; it does not reject 4xx responses. Adjust the assertion if your test expects a particular status, redirect, or error page. A navigation may not produce a main-resource response in every circumstance, so the example checks for a missing response separately instead of dereferencing null.
Find out whether the failure belongs to the application
- Open the same URL in a browser from the same machine or CI environment. If it also returns 500, examine the app and its server-side logs.
- Inspect the response body and headers. A branded application error, gateway page, and proxy-generated page can all look like a server failure but come from different layers.
- Check whether the failing URL, cookies, authentication, request headers, and network route match a successful request. A test may reach a different route or state than a manual visit.
- If a proxy is configured, compare the exact URL, credentials, and network context used by Playwright and by your separate command-line request. A successful
curlrequest alone does not prove the browser made an equivalent request. - Retry only when the endpoint is safe to retry. Repeating a request that changes data can produce side effects, and retries can hide an intermittent server defect.
Investigate Chromium startup or a closed protocol session
If the protocol error occurs before navigation, do not start by changing the tested site’s response handling. Determine whether the browser executable starts and stays available long enough for Playwright to communicate with it.
Verify the browser installation
With the project’s Playwright package installed, run the browser installation command for Chromium:
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
npx playwright install chromium
Then rerun the smallest launch test from the same project and environment. If the browser was installed under a different user, container, or CI image than the test process, installing it for the current environment can address that mismatch. Avoid assuming that reinstalling fixes every protocol error: a process can also close because of its runtime environment or launch configuration.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Remove custom launch variables temporarily
For diagnosis, test without custom Chromium arguments, an explicitly configured executable path, proxy settings, and any wrapper or container-specific launch setup. If the minimal launch works, put the removed settings back individually and rerun. The first setting that recreates the failure is a useful lead; it is not proof until you verify the browser log or environment behind it.
Separate launch failure from test failure
Run one test with one worker and no application-specific hooks. If that passes, add the original setup back in stages: test fixtures, authentication, proxy configuration, and parallelism. If the browser closes only under the original setup, inspect the logs around the close and look for setup code that terminates or replaces the browser context or process.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Use a minimal test to distinguish the paths
This example reports whether navigation produced an HTTP response, while allowing a protocol or navigation exception to remain visible as a thrown error. Use a known page in your own environment; the example URL is illustrative.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
try {
const page = await browser.newPage();
const response = await page.goto('https://example.com');
if (response) {
console.log('HTTP status:', response.status());
console.log('Final URL:', response.url());
} else {
console.log('Navigation completed without a main-resource response.');
}
} finally {
await browser.close();
}
})().catch(error => {
console.error('Launch or navigation failed:', error);
process.exitCode = 1;
});
If this fails at chromium.launch(), the application did not cause an HTTP 500 from the navigation in this test because the page was never reached. If it reaches page.goto() and prints status 500, investigate the returned response and server path. If it throws during navigation, retain the complete exception: it may indicate a failed load or closed browser rather than a valid HTTP response.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Common symptoms and what to try next
| Symptom | What it tells you | Next check |
|---|---|---|
page.goto() returns a response with status 500 |
The navigation received a valid HTTP response; Playwright can expose that response without throwing solely because of its status. | Inspect the response URL and body, then check the application, gateway, or proxy logs for that request. |
Browser.getVersion protocol error and “session closed” during startup |
The message concerns browser control or its session, not necessarily the website’s HTTP response. | Check whether Chromium launches in the same environment; retry with a minimal launch and without custom settings. |
| An HTML “Internal Server Error” page appears only through a proxy | The error page may have been returned by a proxy or another server in the request path. | Compare the exact proxy request and environment used by Playwright and curl; inspect which layer generated the page. |
| The minimal test passes but the full suite fails | Some difference in suite setup, configuration, or execution conditions is relevant. | Restore custom setup one piece at a time and reduce parallel execution while isolating the failure. |
| The failure is intermittent | The symptom alone does not distinguish server instability from browser or network problems. | Keep timestamps and full errors, correlate them with server and browser logs, and avoid retries that could conceal the original failure. |
Make the failure easier to diagnose and control cost
- Test the behavior you care about. If a page must load successfully, assert an expected status or visible result. If you are testing an error page, assert the specific error behavior rather than treating every navigation as a pass.
- Keep diagnostics tied to the failed request. Log the URL and response status next to the test name, and retain the complete exception when there is no response.
- Use retries as a containment measure, not a diagnosis. A retry may help a transient test complete, but record the first failure so an application, proxy, or browser issue is not hidden.
- Compare like with like. A browser request and a command-line request may differ in route, state, or environment. Match those details before drawing conclusions from one succeeding and the other failing.
Or skip the browser setup
If your goal is a screenshot rather than a Playwright interaction test, ScreenshotNeo offers a one-request screenshot API. It does not diagnose or repair a Playwright browser launch failure. For screenshots, the call is:
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Before capture it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Sign up for 1,000 free screenshots a month—no card required.
Frequently Asked Questions
Does an HTTP 500 mean Playwright itself crashed?
No. If page.goto() returns a response with status 500, the page navigation received an HTTP response. A protocol error during browser startup is a separate failure path.
Can a proxy return an internal server error even when curl works?
Yes, a reported case describes that mismatch. Compare the actual request and environment used by each client; matching proxy URL and credentials alone may not establish that the requests were equivalent.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

