deer-flow icon indicating copy to clipboard operation
deer-flow copied to clipboard

前端一直在转圈,无法输入

Open simplew2011 opened this issue 4 months ago • 10 comments

  • 服务器命令行方式运行正常:uv run main.py
  • 服务器webui方式启动,./bootstrap.sh -d
    • 局域网其它机器,访问下面两个ip均无法正常输入,输入框在转圈,页面和后台也没报错
    • 点击示例输入,没前端反应,后台已接收到消息
    • 网页访问机器和服务器可ping通
   ▲ Next.js 15.3.0 (Turbopack)
   - Local:        http://localhost:3000
   - Network:      http://192.168.30.127:3000

 ✓ Starting...
 ✓ Ready in 5.9s
 ○ Compiling /chat ...
Failed to download `Geist` from Google Fonts. Using fallback font instead.
 ✓ Compiled /chat in 134.6s
 ⚠ [next]/internal/font/google/geist_31c89cc1.module.css
Error while requesting resource
There was an issue establishing a connection while requesting https://fonts.googleapis.com/css2?family=Geist:[email protected]&display=swap.


 GET /chat 200 in 135260ms
 ⚠ [next]/internal/font/google/geist_31c89cc1.module.css
Error while requesting resource
There was an issue establishing a connection while requesting https://fonts.googleapis.com/css2?family=Geist:[email protected]&display=swap.

Image
# .env
NEXT_PUBLIC_API_URL="http://localhost:8000/api"

AGENT_RECURSION_LIMIT=30

# CORS settings
# Comma-separated list of allowed origins for CORS requests
# Example: ALLOWED_ORIGINS=http://localhost:3000,http://example.com
ALLOWED_ORIGINS=http://localhost:3000
# config.yaml
BASIC_MODEL:
  base_url: https://ark.cn-beijing.volces.com/api/v3
  # model: doubao-1-5-pro-32k-250115
  # model: deepseek-r1-distill-qwen-32b
  model: doubao-1-5-lite-32k-250115
  api_key: 8c848c4a-xxx

simplew2011 avatar Aug 19 '25 12:08 simplew2011

已尝试修改:

  • NEXT_PUBLIC_API_URL: http://192.168.30.127:8000/api,无效
  • ALLOWED_ORIGINS=http://192.168.30.127:3000,无效

simplew2011 avatar Aug 19 '25 12:08 simplew2011

Failed to load resource: the server responded with a status of 404 (Not Found)

simplew2011 avatar Aug 19 '25 12:08 simplew2011

前后端都部署在一台机器上吧, 直接在这台机器上访问 http://localhost:3000 是能够访问的吗?

WillemJiang avatar Aug 19 '25 13:08 WillemJiang

前后端都部署在一台机器上吧, 直接在这台机器上访问 http://localhost:3000 是能够访问的吗?

  • 上面的现象,不在一台机器上,能访问前端,但一直转圈
  • 我又试了在window上部署,前后端在同一机器上,现象是一样的,后端能接收到前端请求,但不处理;控制台方式是好的

simplew2011 avatar Aug 19 '25 14:08 simplew2011

刚刚有看了一下错误信息,里面有一条

 ⚠ [next]/internal/font/google/geist_31c89cc1.module.css
Error while requesting resource
There was an issue establishing a connection while requesting https://fonts.googleapis.com/css2?family=Geist:[email protected]&display=swap.

可以在你的浏览器机器上测试一下

# Test if you can reach Google Fonts
curl -I https://fonts.googleapis.com/css2?family=Geist:[email protected]&display=swap

# Test DNS resolution
nslookup fonts.googleapis.com

WillemJiang avatar Aug 20 '25 01:08 WillemJiang

刚刚有看了一下错误信息,里面有一条

 ⚠ [next]/internal/font/google/geist_31c89cc1.module.css
Error while requesting resource
There was an issue establishing a connection while requesting https://fonts.googleapis.com/css2?family=Geist:[email protected]&display=swap.

可以在你的浏览器机器上测试一下

# Test if you can reach Google Fonts
curl -I https://fonts.googleapis.com/css2?family=Geist:[email protected]&display=swap

# Test DNS resolution
nslookup fonts.googleapis.com
Image

simplew2011 avatar Aug 20 '25 02:08 simplew2011

windows上部署,没报fonts问题,但也是不响应

Image

simplew2011 avatar Aug 20 '25 02:08 simplew2011

windows上部署,没报fonts问题,但也是不响应

Image

这个情况需要在.env 中添加这个环境变量设置

ALLOWED_ORIGINS=http://localhost:3000,http://10.23.4.17:3000

WillemJiang avatar Aug 20 '25 05:08 WillemJiang

上面操作http://localhost:3000有效。但http:/10.23.4.17:3000还是无法输入

simplew2011 avatar Aug 25 '25 02:08 simplew2011

上面操作http://localhost:3000有效。但http:/10.23.4.17:3000还是无法输入

刚刚发现之前写的环境变量有问题, 具体的配置已经修改了。

WillemJiang avatar Sep 04 '25 07:09 WillemJiang