-
Notifications
You must be signed in to change notification settings - Fork 52
Description
Environment Details
- **Operating System:**Windows 10 Home 22H2
- Node.js Version: v22.17.0
- Python Version: 3.13.51420396 2025-07-09)
- UV Version: 0.7.20 (251420396 2025-07-09)
- Chrome for Testing Version: 138.0.7204.94 (Build oficial) (64 bits)
Bug Description
The MCP server fails to authenticate with LinkedIn using the cookie method. Despite a correct setup, the process consistently fails at the final authentication step, returning the error Login failed: Cookie authentication failed - cookie may be expired or invalid, even when using a freshly generated li_at cookie from a clean session.
Steps to Reproduce
- Cloned the repository on Windows.
- Installed
uvusing the recommended PowerShell script (irm https://astral.sh/uv/install.ps1 | iex). - In the project directory, created and activated a virtual environment:
uv venvand.\.venv\Scripts\Activate.ps1. - Installed all dependencies successfully:
uv syncanduv sync --group dev. - Downloaded the matching "Chrome for Testing" browser and
chromedriver.exe. - Placed both
chrome.exeandchromedriver.exein the same directory (D:\ABCN\chrome-win64) and added this directory to the system'sPath. - Set the
LINKEDIN_COOKIEenvironment variable with a freshli_atcookie obtained after logging out of all other sessions. - Ran the server manually with debug logging:
uv run main.py --no-headless --no-lazy-init --log-level DEBUG.
Expected Behavior
The server should use the provided cookie, successfully authenticate the session in the automated "Chrome for Testing" browser, and become ready to accept commands.
Actual Behavior / Logs
The server starts, correctly reads the environment variables, finds the chromedriver, and launches the "Chrome for Testing" browser successfully. The WebDriver initializes correctly. However, the final authentication step fails.
The log shows the following critical error:
drivers.chrome - WARNING - Cookie authentication failed: Cookie login failed - cookie may be expired or invalid
main - ERROR - Failed to initialize driver: Login failed: Cookie authentication failed - cookie may be expired or invalid
Additional Context & Troubleshooting
- The issue is not a port conflict (
EADDRINUSEwas resolved). - The issue is not the
Path. We confirmed the script finds and uses the correctchromedriver.exe. - We also tried explicitly setting the
CHROMEDRIVER_PATHenvironment variable, with the same result. - The failure seems to indicate that LinkedIn's current security measures may be detecting and invalidating the session when initiated by an automated browser, even if the cookie itself is valid.
Thank you for looking into this.