Lets FIX [Issue] Cypress + VPN + MacOS

Resolving Cypress Test Issues with VPN on MacOS: The Private Relay Dilemma

S Chathuranga Jayasinghe
2 min readSep 29, 2024

--

Here you are, you might be a victim of this issue since you decided to read this :) Running your Cypress tests which require VPN, does not work even though your VPN is working. But you can access those URLs from a normal browser on the same laptop with the existing VPN. Let’s see why Cypress does not utilize the VPN, and fix it!

The Issue

Cypress tests that depend on VPN access may fail on MacOS systems, even when the VPN is correctly configured and active. This occurs because Cypress is unable to route its traffic through the VPN, resulting in failed connections or inaccessible domains.

The Root Cause: iCloud+ Private Relay

The culprit behind this issue is Apple’s iCloud+ Private Relay feature. Private Relay is designed to enhance user privacy by routing internet traffic through two separate relays. While this feature provides additional security, it can interfere with VPN connections, causing conflicts in network routing.

The Solution: Disabling Private Relay

To resolve this issue and allow Cypress to properly utilize your VPN connection, you need…

--

--