Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to fetch" in external browser to LangSmith Studio #3291

Open
4 tasks done
kbfifi opened this issue Feb 3, 2025 · 8 comments
Open
4 tasks done

"Failed to fetch" in external browser to LangSmith Studio #3291

kbfifi opened this issue Feb 3, 2025 · 8 comments
Assignees

Comments

@kbfifi
Copy link

kbfifi commented Feb 3, 2025

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

Does not apply as I'm still setting up

Error Message and Stack Trace (if applicable)

Description

After installation I'm trying to see the Studio environment. So far I:

python3 -m venv langgraphstudiotest
source langgraphstudiotest/bin/activate
pip install --upgrade "langgraph-cli[inmem]"
langgraph new langgraphstudiotest --template react-agent-python
cd langgraphstudiotest             
mkdir app  
langgraph new app --template react-agent-python
cd app/                
pip install -e .
nano .env
langgraph dev --host 0.0.0.0

All well up-til-here.
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 doesn't work:
https://smith.langchain.com/studio/thread?baseUrl=http://192.168.178.31:2024 => Page shows: "Failed to fetch"

Also tried with
langgraph dev --host 192.168.178.31

Both give same results

See also #3261
Installed fix:
pip install --upgrade "langgraph-cli[inmem]" "langgraph-api==0.0.21"

Unfortenately not fixing my issue

System Info

python3 -m langchain_core.sys_info [4/1075]

System Information

OS: Linux
OS Version: #1 SMP Tue Nov 12 08:48:32 UTC 2024
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]

Package Information

langchain_core: 0.3.33
langchain: 0.3.17
langchain_community: 0.3.16
langsmith: 0.2.11
langchain_anthropic: 0.3.5
langchain_fireworks: 0.2.7
langchain_openai: 0.3.3
langchain_text_splitters: 0.3.5
langgraph_api: 0.0.21
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
anthropic: 0.45.2
async-timeout: Installed. No version info available.
click: 8.1.8
cryptography: 43.0.3
dataclasses-json: 0.6.7
defusedxml: 0.7.1
fireworks-ai: 0.15.12
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.60.2
orjson: 3.10.15
packaging: 24.2
pydantic: 2.10.6
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
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.

@eyurtsev
Copy link
Contributor

eyurtsev commented Feb 3, 2025

This is likely a duplicate of: #3261

@eyurtsev
Copy link
Contributor

eyurtsev commented Feb 3, 2025

@kbfifi which browser are you using? which version?

Could you open the network tab and confirm which errors you're seeing are you getting a CORS error?

@kbfifi
Copy link
Author

kbfifi commented Feb 3, 2025

Well adamduren claims it solved his issue. Mine is not. So I figured it is a potential other issue.

I'm working from a Chromebook using Chrome browser Version 132.0.6834.154 (Official Build) (64-bit)
network tab shows:

Image

@eyurtsev
Copy link
Contributor

eyurtsev commented Feb 4, 2025

Would you mind digging into one of these to surface the full error message?

@kbfifi
Copy link
Author

kbfifi commented Feb 4, 2025

Image

Image

Let me know how to get more specific details if needed.

@eyurtsev
Copy link
Contributor

eyurtsev commented Feb 4, 2025

Thank you this is a separate issue i'll take a look in a bit

@eyurtsev eyurtsev self-assigned this Feb 5, 2025
@eyurtsev
Copy link
Contributor

eyurtsev commented Feb 6, 2025

This is the issue you're seeing: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content

langsmith.com studio UI makes a fetch request from your browser to your locally running server over http.

You could try working around this by temporarily allowing insecure content for the given page.

I suspect chrome on chromebooks is running with stricter security requirements. (e.g., I'm on chrome as well on ubuntu, but my browser is not blocking on mixed content).

@kbfifi
Copy link
Author

kbfifi commented Feb 6, 2025

@eyurtsev , thanks for looking into it! I was able to load the page by allowing the insecure page. That works for now. Will you provide an easy way to run the local server with https?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants