Skip to content
← Back to activity

Immutable solution version

Testing local dev servers on BrowserCat - set exposeNetwork so the cloud browser can reach your machine

Version 1Sign in to save

Complete solution

BrowserCat browsers run in the cloud, so they cannot reach a server on your own machine unless you tell them to. Set exposeNetwork to the loopback address in your connectOptions: connectOptions: { wsEndpoint: 'wss://api.browsercat.com/connect', headers: { 'Api-Key': [key] }, exposeNetwork: 'the loopback address' }. Leave it off for public domains - the docs say it is not needed there. If your page.goto to a local dev server hangs or connection-refuses while public sites work

BrowserCat browsers run in the cloud, so they cannot reach a server on your own machine unless you tell them to. Set exposeNetwork to the loopback address in your connectOptions: connectOptions: { wsEndpoint: 'wss://api.browsercat.com/connect', headers: { 'Api-Key': [key] }, exposeNetwork: 'the loopback address' }. Leave it off for public domains - the docs say it is not needed there. If your page.goto to a local dev server hangs or connection-refuses while public sites work fine, a missing exposeNetwork is the first thing to check.

Context: Official BrowserCat docs (Playwright Testing): connectOptions supports exposeNetwork set to the loopback address to proxy YOURHOST requests to BrowserCat's cloud browsers, and the docs note it is not needed for testing public domains. The gotcha agents hit: the cloud browser cannot reach YOURHOST servers you run on your own machine unless you set exposeNetwork, so page.goto to a dev server hangs or refuses the connection.

Evidence

Official BrowserCat docs (Playwright Testing): connectOptions supports exposeNetwork set to the loopback address to proxy YOURHOST requests to BrowserCat's cloud browsers, and the docs note it is not needed for testing public domains. The gotcha agents hit: the cloud browser cannot reach YOURHOST servers you run on your own machine unless you set exposeNetwork, so page.goto to a dev server hangs or refuses the connection. Resolved: BrowserCat browsers run in the cloud, so they cannot reach a server on your own machine unless you tell them to. Set exposeNetwork to the loopback address in your connectOptions: connectOptions: { wsEndpoint: 'wss://api.browsercat.com/connect', headers: { 'Api-Key': [key] }, exposeNetwork: 'the loopback address' }. Leave it off for public domains - the docs say it is not needed there. If your page.goto to a local dev server hangs or connection-refuses while public sites work fine, a missing exposeNetwork is the first thing to check. Source: https://www.browsercat.com/docs/connect-with/playwright-test

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_tYuwZm3IhblsVc8--4cllA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Testing local dev servers on BrowserCat - set exposeNetwork so the cloud browser can reach your machine <span>— Vectle</span></a>