LangSmith Studio does not work in Chrome due to CORS issue #427

Closed
opened 2026-02-20 17:40:03 -05:00 by yindo · 17 comments
Owner

Originally created by @adamduren on GitHub (Jan 31, 2025).

Originally assigned to: @eyurtsev on GitHub.

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

langgraph new path/to/your/app --template react-agent-python 
langgraph dev

Error Message and Stack Trace (if applicable)

Image Image

Description

The LangGraph Dev Server does not produce the CORS header to make it compatible with accessing Private Local Networks in Chrome 132 (possibly 130+, see references).

Workarounds

  • Use NGROK to hide the private network access
  • Visit chrome://flags and disable the security for this. (not recommended!)
Image

References

System Info

python -m langchain_core.sys_info

System Information

OS: Linux
OS Version: #1 SMP Fri Nov 29 17:22:03 UTC 2024
Python Version: 3.12.7 (main, Oct 19 2024, 03:00:35) [GCC 12.2.0]

Package Information

langchain_core: 0.3.31
langchain: 0.3.15
langchain_community: 0.3.15
langsmith: 0.2.11
langchain_openai: 0.3.1
langchain_postgres: 0.0.12
langchain_text_splitters: 0.3.5
langgraph_api: 0.0.20
langgraph_cli: 0.1.70
langgraph_license: Installed. No version info available.
langgraph_sdk: 0.1.51
langgraph_storage: Installed. No version info available.

Optional packages not installed

langserve

Other Dependencies

aiohttp: 3.11.11
async-timeout: Installed. No version info available.
click: 8.1.8
cryptography: 43.0.3
dataclasses-json: 0.6.7
httpx: 0.28.1
httpx-sse: 0.4.0
jsonpatch: 1.33
jsonschema-rs: 0.25.1
langgraph: 0.2.69
langgraph-checkpoint: 2.0.10
langsmith-pyo3: Installed. No version info available.
numpy: 1.26.4
openai: 1.59.9
orjson: 3.10.15
packaging: 24.2
pgvector: 0.2.5
psycopg: 3.2.3
psycopg-pool: 3.2.4
pydantic: 2.9.2
pydantic-settings: 2.7.1
pyjwt: 2.10.1
python-dotenv: 1.0.1
PyYAML: 6.0.2
requests: 2.32.3
requests-toolbelt: 1.0.0
SQLAlchemy: 2.0.37
sqlalchemy: 2.0.37
sse-starlette: 2.1.3
starlette: 0.45.3
structlog: 24.4.0
tenacity: 9.0.0
tiktoken: 0.8.0
typing-extensions: 4.12.2
uvicorn: 0.34.0
watchfiles: 1.0.4
zstandard: Installed. No version info available.

Originally created by @adamduren on GitHub (Jan 31, 2025). Originally assigned to: @eyurtsev on GitHub. ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use GitHub Discussions. - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue. ### Example Code ```python langgraph new path/to/your/app --template react-agent-python langgraph dev ``` ### Error Message and Stack Trace (if applicable) <img width="1643" alt="Image" src="https://github.com/user-attachments/assets/9786d134-4a75-4ece-b94c-48b934d2347f" /> <img width="911" alt="Image" src="https://github.com/user-attachments/assets/9b313210-46bb-4396-b611-a63ea451caf5" /> ### Description The LangGraph Dev Server does not produce the CORS header to make it compatible with accessing Private Local Networks in Chrome 132 (possibly 130+, see references). ### Workarounds - Use NGROK to hide the private network access - Visit `chrome://flags` and disable the security for this. (**not recommended!**) <img width="770" alt="Image" src="https://github.com/user-attachments/assets/61827b94-ff10-4835-a52b-647f829d2228" /> ### References - [Chrome Initial Announcement (2022)](https://developer.chrome.com/blog/private-network-access-preflight/) - [Chrome Enforcement announcements tentatively for Chrome 130+ (Mar 2024)](https://developer.chrome.com/blog/private-network-access-update-2024-03) ### System Info `python -m langchain_core.sys_info` System Information ------------------ > OS: Linux > OS Version: #1 SMP Fri Nov 29 17:22:03 UTC 2024 > Python Version: 3.12.7 (main, Oct 19 2024, 03:00:35) [GCC 12.2.0] Package Information ------------------- > langchain_core: 0.3.31 > langchain: 0.3.15 > langchain_community: 0.3.15 > langsmith: 0.2.11 > langchain_openai: 0.3.1 > langchain_postgres: 0.0.12 > langchain_text_splitters: 0.3.5 > langgraph_api: 0.0.20 > langgraph_cli: 0.1.70 > langgraph_license: Installed. No version info available. > langgraph_sdk: 0.1.51 > langgraph_storage: Installed. No version info available. Optional packages not installed ------------------------------- > langserve Other Dependencies ------------------ > aiohttp: 3.11.11 > async-timeout: Installed. No version info available. > click: 8.1.8 > cryptography: 43.0.3 > dataclasses-json: 0.6.7 > httpx: 0.28.1 > httpx-sse: 0.4.0 > jsonpatch: 1.33 > jsonschema-rs: 0.25.1 > langgraph: 0.2.69 > langgraph-checkpoint: 2.0.10 > langsmith-pyo3: Installed. No version info available. > numpy: 1.26.4 > openai: 1.59.9 > orjson: 3.10.15 > packaging: 24.2 > pgvector: 0.2.5 > psycopg: 3.2.3 > psycopg-pool: 3.2.4 > pydantic: 2.9.2 > pydantic-settings: 2.7.1 > pyjwt: 2.10.1 > python-dotenv: 1.0.1 > PyYAML: 6.0.2 > requests: 2.32.3 > requests-toolbelt: 1.0.0 > SQLAlchemy: 2.0.37 > sqlalchemy: 2.0.37 > sse-starlette: 2.1.3 > starlette: 0.45.3 > structlog: 24.4.0 > tenacity: 9.0.0 > tiktoken: 0.8.0 > typing-extensions: 4.12.2 > uvicorn: 0.34.0 > watchfiles: 1.0.4 > zstandard: Installed. No version info available.
yindo closed this issue 2026-02-20 17:40:03 -05:00
Author
Owner

@kbfifi commented on GitHub (Jan 31, 2025):

Same problem here. Trying with a browser on an external Chromebook. Started with: langgraph dev --host 0.0.0.0
to access it externally.
Also:
http://myhostname:2024/docs => works
http:///docs => connection refused

Failed to fetch for both:
https://smith.langchain.com/studio/thread?baseUrl=http%3A%2F%2Fmyhostname%3A2024&organizationId=
https://smith.langchain.com/studio/thread?baseUrl=http%3A%2F%2F%3A2024&organizationId=

@kbfifi commented on GitHub (Jan 31, 2025): Same problem here. Trying with a browser on an external Chromebook. Started with: langgraph dev --host 0.0.0.0 to access it externally. Also: http://myhostname:2024/docs => works http://<my host ip>/docs => connection refused Failed to fetch for both: https://smith.langchain.com/studio/thread?baseUrl=http%3A%2F%2Fmyhostname%3A2024&organizationId=<myid> https://smith.langchain.com/studio/thread?baseUrl=http%3A%2F%2F<my host ip>%3A2024&organizationId=<myid>
Author
Owner

@eyurtsev commented on GitHub (Jan 31, 2025):

Issue has been fixed.

Either do a force upgrade or install from a fresh env, or specify langgraph-api version==0.0.21 to bump the langgraph api version.

pip install --upgrade "langgraph-cli[inmem]"  "langgraph-api==0.0.21"
@eyurtsev commented on GitHub (Jan 31, 2025): Issue has been fixed. Either do a force upgrade or install from a fresh env, or specify langgraph-api version==0.0.21 to bump the langgraph api version. ```bash pip install --upgrade "langgraph-cli[inmem]" "langgraph-api==0.0.21" ```
Author
Owner

@adamduren commented on GitHub (Jan 31, 2025):

Amazing, works perfectly! Thank you.

@adamduren commented on GitHub (Jan 31, 2025): Amazing, works perfectly! Thank you.
Author
Owner

@kbfifi commented on GitHub (Feb 1, 2025):

It unfortunately does not solve my problem. What works from a remote web browser:
http://192.168.178.31:2024/ok => {"ok":true}
http://192.168.178.31:2024/docs => works

This still doesn't work:
https://smith.langchain.com/studio/thread?baseUrl=http://192.168.178.31:2024

Also tried with
langgraph dev --host 0.0.0.0
langgraph dev --host 192.168.178.31

Both give same results

Different issue?

@kbfifi commented on GitHub (Feb 1, 2025): It unfortunately does not solve my problem. What works from a remote web browser: http://192.168.178.31:2024/ok => {"ok":true} http://192.168.178.31:2024/docs => works This still doesn't work: https://smith.langchain.com/studio/thread?baseUrl=http://192.168.178.31:2024 Also tried with langgraph dev --host 0.0.0.0 langgraph dev --host 192.168.178.31 Both give same results Different issue?
Author
Owner

@leafy1980 commented on GitHub (Aug 21, 2025):

same issue

@leafy1980 commented on GitHub (Aug 21, 2025): same issue
Author
Owner

@Taha-1005 commented on GitHub (Oct 16, 2025):

Same issue with Perplexity.
POST https://api.segment.io/v1/i net::ERR_BLOCKED_BY_CLIENT

I have disabled all ad blockers as well.

@Taha-1005 commented on GitHub (Oct 16, 2025): Same issue with Perplexity. POST https://api.segment.io/v1/i net::ERR_BLOCKED_BY_CLIENT I have disabled all ad blockers as well.
Author
Owner

@jiraiya1729 commented on GitHub (Oct 30, 2025):

getting the same issue got any fix?

@jiraiya1729 commented on GitHub (Oct 30, 2025): getting the same issue got any fix?
Author
Owner

@var1ableX commented on GitHub (Nov 2, 2025):

I started getting this today. In my case it's related to browser security. There are two ways to deal with it (wouldn't call both "a fix" as option 2 leaves your local env. vulnerable to attack.

Option 1:
add --tunnel to langgraph dev launch command

Option 2: NOT RECOMMENDED but I think a reliable way to root cause this to browser security
Assumption: You're using chrome.

  1. Open new tab in chrome and go here: chrome://flags/#local-network-access-check
  2. Disable local network checks
  3. Relaunch browser
  4. Try the langgraph studio link again e.g. https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024

UPDATE - Option 3 - selective allow on local path
You might find this useful which seems to allow selective "allow" on the local api. This is vscode specific launch config - you could probably get an LLM or use your own experience to translate what it's doing into whatever context you launch langgraph in.

NOTE: If you go this route you'll notice that your browser launches before langgraph server initializes. You might even see the fetch failed error. Hang tight. Eventually once the server finishes loading you'll see a popup in chrome asking if you want to allow the server to access the local url. If you allow then it should show up correctly.

{ "version": "0.2.0", "configurations": [ { "name": "Start LangGraph API Server", "type": "debugpy", "request": "launch", "program": "/[YOUR LOCAL PATH]/.venv/bin/langgraph", "args": [ "dev", "--allow-blocking", "--no-browser" ], "cwd": "[YOUR LOCAL PATH]", "python": "[YOUR LOCAL PATH]/.venv/bin/python", "console": "integratedTerminal", "justMyCode": false }, { "name": "Launch Studio UI in Dev Chrome", "type": "chrome", "request": "launch", "url": "https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024", "runtimeArgs": [ "--disable-features=PrivateNetworkAccessChecks" ] } ], "compounds": [ { "name": "Debug (Full Stack)", "configurations": [ "Start LangGraph API Server", "Launch Studio UI in Dev Chrome" ], "stopAll": true } ] }

@var1ableX commented on GitHub (Nov 2, 2025): I started getting this today. In my case it's related to browser security. There are two ways to deal with it (wouldn't call both "a fix" as option 2 leaves your local env. vulnerable to attack. Option 1: add --tunnel to langgraph dev launch command **Option 2: NOT RECOMMENDED** but I think a reliable way to root cause this to browser security Assumption: You're using chrome. 1. Open new tab in chrome and go here: chrome://flags/#local-network-access-check 2. Disable local network checks 3. Relaunch browser 4. Try the langgraph studio link again e.g. https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024 **UPDATE - Option 3 - selective allow on local path** You might find this useful which seems to allow selective "allow" on the local api. This is vscode specific launch config - you could probably get an LLM or use your own experience to translate what it's doing into whatever context you launch langgraph in. NOTE: If you go this route you'll notice that your browser launches before langgraph server initializes. You might even see the fetch failed error. Hang tight. Eventually once the server finishes loading you'll see a popup in chrome asking if you want to allow the server to access the local url. If you allow then it should show up correctly. `{ "version": "0.2.0", "configurations": [ { "name": "Start LangGraph API Server", "type": "debugpy", "request": "launch", "program": "/[YOUR LOCAL PATH]/.venv/bin/langgraph", "args": [ "dev", "--allow-blocking", "--no-browser" ], "cwd": "[YOUR LOCAL PATH]", "python": "[YOUR LOCAL PATH]/.venv/bin/python", "console": "integratedTerminal", "justMyCode": false }, { "name": "Launch Studio UI in Dev Chrome", "type": "chrome", "request": "launch", "url": "https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024", "runtimeArgs": [ "--disable-features=PrivateNetworkAccessChecks" ] } ], "compounds": [ { "name": "Debug (Full Stack)", "configurations": [ "Start LangGraph API Server", "Launch Studio UI in Dev Chrome" ], "stopAll": true } ] }`
Author
Owner

@daojiAnime commented on GitHub (Nov 3, 2025):

I also have the same problem, the --tunnel option doesn't work for me.

@daojiAnime commented on GitHub (Nov 3, 2025): I also have the same problem, the --tunnel option doesn't work for me.
Author
Owner

@var1ableX commented on GitHub (Nov 4, 2025):

I also have the same problem, the --tunnel option doesn't work for me.

What's the url generated when you run with --tunnel?

@var1ableX commented on GitHub (Nov 4, 2025): > I also have the same problem, the --tunnel option doesn't work for me. What's the url generated when you run with --tunnel?
Author
Owner

@joshiayush commented on GitHub (Nov 5, 2025):

Having the same problem guys, the current version in use are:

langgraph-api==0.5.4
langgraph-cli==0.4.7

The workaround I'm using is:

Launch Chrome with CORS Disabled (Recommended for Development)

macOS: (I'm on mac so currently using this workaround)

open -na "Google Chrome" --args --disable-web-security --user-data-dir="/tmp/chrome_dev_session" --disable-features=PrivateNetworkAccessSendPreflights

Linux:

google-chrome --disable-web-security --user-data-dir="/tmp/chrome_dev_session" --disable-features=PrivateNetworkAccessSendPreflights

Windows:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\tmp\chrome_dev_session" --disable-features=PrivateNetworkAccessSendPreflights

@eyurtsev Can you reopen this? As this has not been resolved yet.

@joshiayush commented on GitHub (Nov 5, 2025): Having the same problem guys, the current version in use are: ``` langgraph-api==0.5.4 langgraph-cli==0.4.7 ``` The workaround I'm using is: ### Launch Chrome with CORS Disabled (Recommended for Development) **macOS:** (I'm on mac so currently using this workaround) ``` open -na "Google Chrome" --args --disable-web-security --user-data-dir="/tmp/chrome_dev_session" --disable-features=PrivateNetworkAccessSendPreflights ``` **Linux:** ``` google-chrome --disable-web-security --user-data-dir="/tmp/chrome_dev_session" --disable-features=PrivateNetworkAccessSendPreflights ``` **Windows:** ``` "C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\tmp\chrome_dev_session" --disable-features=PrivateNetworkAccessSendPreflights ``` @eyurtsev Can you reopen this? As this has not been resolved yet.
Author
Owner

@matescharnitzky commented on GitHub (Nov 5, 2025):

I'm facing the same. To me the --tunnel flag doesn't work either.

@matescharnitzky commented on GitHub (Nov 5, 2025): I'm facing the same. To me the `--tunnel` flag doesn't work either.
Author
Owner

@matescharnitzky commented on GitHub (Nov 6, 2025):

For everyone running into this error, the fix for me was to reset the permission in Chrome. Once done, Studio works as expected without the --tunnel flag.

Image
@matescharnitzky commented on GitHub (Nov 6, 2025): For everyone running into this error, the fix for me was to reset the permission in Chrome. Once done, Studio works as expected without the `--tunnel` flag. <img width="314" height="457" alt="Image" src="https://github.com/user-attachments/assets/a914e7ba-ca27-4381-b9fa-825713415766" />
Author
Owner

@ivanjinme commented on GitHub (Nov 6, 2025):

For everyone running into this error, the fix for me was to reset the permission in Chrome. Once done, Studio works as expected without the --tunnel flag.

Image

it works!!! thank you~~

I can't believe resolution is so simple. i even rebuilt my venv, and encountered langgraph prebuilt dependency bug...

@ivanjinme commented on GitHub (Nov 6, 2025): > For everyone running into this error, the fix for me was to reset the permission in Chrome. Once done, Studio works as expected without the `--tunnel` flag. > > <img alt="Image" width="314" height="457" src="https://private-user-images.githubusercontent.com/8216624/510684936-a914e7ba-ca27-4381-b9fa-825713415766.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0NDc5MDIsIm5iZiI6MTc2MjQ0NzYwMiwicGF0aCI6Ii84MjE2NjI0LzUxMDY4NDkzNi1hOTE0ZTdiYS1jYTI3LTQzODEtYjlmYS04MjU3MTM0MTU3NjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTEwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTExMDZUMTY0NjQyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzljM2IwM2UwZjZlYTNlNGRkYzRmN2EyMjE5NjA0Y2Y3ZWRjY2QxNWJjZjcyY2VlZDM1ZTY1ZTBmMDlkZTRiZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.PNCDfYOl1keWjB21GLhaFR9jlRMxk5SpYmBC2cWFM-0"> it works!!! thank you~~ I can't believe resolution is so simple. i even rebuilt my venv, and encountered langgraph prebuilt dependency bug...
Author
Owner

@mj-epsilon commented on GitHub (Nov 6, 2025):

For everyone running into this error, the fix for me was to reset the permission in Chrome. Once done, Studio works as expected without the --tunnel flag.

Image

This solution works for me on chrome :)

@mj-epsilon commented on GitHub (Nov 6, 2025): > For everyone running into this error, the fix for me was to reset the permission in Chrome. Once done, Studio works as expected without the `--tunnel` flag. > > <img alt="Image" width="314" height="457" src="https://private-user-images.githubusercontent.com/8216624/510684936-a914e7ba-ca27-4381-b9fa-825713415766.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjI0NTkzMTMsIm5iZiI6MTc2MjQ1OTAxMywicGF0aCI6Ii84MjE2NjI0LzUxMDY4NDkzNi1hOTE0ZTdiYS1jYTI3LTQzODEtYjlmYS04MjU3MTM0MTU3NjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTEwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTExMDZUMTk1NjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGMyZGI0ZDc4YWU1MDBlODZmNWViZmJmOTAxYzFiZjA3OTRjOTc3MjRiZDYwODRhMWFiZjdkYTk1MGY3YWZjNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.XsCZzxJ_aMNwKy98sWJwbdbzkpE6FKw36-eRySLK4Yg"> This solution works for me on chrome :)
Author
Owner

@deepskyai commented on GitHub (Nov 10, 2025):

Thankyou it worked!

@deepskyai commented on GitHub (Nov 10, 2025): Thankyou it worked!
Author
Owner

@iamthomaspruyn commented on GitHub (Dec 12, 2025):

in my case its really strange. When I launch with Safari through tunnel, sometimes it works fine. But if I leave my terminal open for too long, or let my computer sleep and reopen the terminal, the issue appears. I got around it once but restarting my computer. but that currently isn't helping either.

@iamthomaspruyn commented on GitHub (Dec 12, 2025): in my case its really strange. When I launch with Safari through tunnel, sometimes it works fine. But if I leave my terminal open for too long, or let my computer sleep and reopen the terminal, the issue appears. I got around it once but restarting my computer. but that currently isn't helping either.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#427