Skip to content

[Bug]: HiCoding功能缺陷-代码生成及产物预览 #248

@zhanggang807

Description

@zhanggang807

Bug Description

配置好环境后,测试代码生成和执行,报错

Image Image AI路由匹配 改成这个后,删除sandbox-shared沙箱容器并重建后,功能正常 Image Image

生成html产物后,无法预览

Image Image

Steps to Reproduce

  1. higress中配置ai 服务提供商
  2. higress中配置ai路由
  3. himarket后台配置模型、门户及关联关系
  4. himarket门户注册开发者,并订阅模型
  5. 使用hicoding生成代码

Expected Behavior

能正常生成代码并展示终端、文件预览、问题正常回复

Actual Behavior

报错

Affected Component

Frontend (User Interface)

Severity

Critical (System crash, data loss)

Environment

docker compose 安装,镜像均为最新版本

Logs and Error Messages

2026-04-03 16:10:27.387 [http-nio-8080-exec-7] INFO  c.a.h.s.h.websocket.HiCodingHandshakeInterceptor - WebSocket handshake authenticated: userId=dev-69ce2bcde4b098173c0807d3
2026-04-03 16:10:27.440 [http-nio-8080-exec-7] INFO  c.a.h.s.hicoding.terminal.TerminalWebSocketHandler - Terminal WebSocket connected: id=809984a7-56d6-d0d0-bb26-2e13c755afa1, userId=dev-69ce2bcde4b098173c0807d3, runtime=remote
2026-04-03 16:10:27.440 [http-nio-8080-exec-7] INFO  c.a.h.s.hicoding.terminal.TerminalWebSocketHandler - Creating RemoteTerminalBackend: host=sandbox-shared:8080, cwd=/workspace/dev-69ce2bcde4b098173c0807d3
2026-04-03 16:10:27.440 [http-nio-8080-exec-7] INFO  c.a.h.s.hicoding.terminal.RemoteTerminalBackend - [RemoteTerminal] Connecting to ws://sandbox-shared:8080/terminal?cols=80&rows=24&cwd=%2Fworkspace%2Fdev-69ce2bcde4b098173c0807d3
2026-04-03 16:10:27.458 [http-nio-8080-exec-8] INFO  c.a.h.s.h.websocket.HiCodingHandshakeInterceptor - WebSocket handshake authenticated: userId=dev-69ce2bcde4b098173c0807d3
2026-04-03 16:10:27.469 [http-nio-8080-exec-8] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - WebSocket connected: id=686e942c-ba5d-5703-aebe-928137da2514, userId=dev-69ce2bcde4b098173c0807d3, cwd=/workspace/dev-69ce2bcde4b098173c0807d3, sandboxType=REMOTE
2026-04-03 16:10:27.471 [http-nio-8080-exec-8] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - Using CLI provider 'qwen-code' (command=qwen)
2026-04-03 16:10:27.471 [http-nio-8080-exec-8] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - Remote runtime: host=sandbox-shared
2026-04-03 16:10:27.471 [http-nio-8080-exec-8] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - Deferring pipeline init until session/config message: session=686e942c-ba5d-5703-aebe-928137da2514
2026-04-03 16:10:27.471 [http-nio-8080-exec-8] INFO  c.a.h.s.hicoding.websocket.WebSocketPingScheduler - [WS-Ping] Started ping scheduler for session 686e942c-ba5d-5703-aebe-928137da2514
2026-04-03 16:10:27.489 [http-nio-8080-exec-6] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - Received session/config via WebSocket message: session=686e942c-ba5d-5703-aebe-928137da2514, hasModel=true, mcpCount=0, skillCount=0, hasAuthToken=false
2026-04-03 16:10:27.491 [sandbox-init] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - [Sandbox-Init] 尝试 reattach: userId=dev-69ce2bcde4b098173c0807d3, sidecarSessionId=c4a62252-7c9d-4f68-93c6-d4d0e55f76a0
2026-04-03 16:10:27.492 [sandbox-init] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - Reconnecting RemoteRuntimeAdapter to: ws://sandbox-shared:8080/?sessionId=c4a62252-7c9d-4f68-93c6-d4d0e55f76a0
2026-04-03 16:10:27.492 [sandbox-init] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - Connecting to remote sidecar WebSocket: ws://sandbox-shared:8080/?sessionId=c4a62252-7c9d-4f68-93c6-d4d0e55f76a0
2026-04-03 16:10:27.500 [http-nio-8080-exec-7] INFO  c.a.h.s.hicoding.terminal.RemoteTerminalBackend - [RemoteTerminal] Connected to sidecar terminal
2026-04-03 16:10:27.505 [http-nio-8080-exec-7] INFO  c.a.h.s.hicoding.websocket.WebSocketPingScheduler - [WS-Ping] Started ping scheduler for session 809984a7-56d6-d0d0-bb26-2e13c755afa1
2026-04-03 16:10:27.525 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Session established: host=sandbox-shared:8080, sessionId=280699f4
2026-04-03 16:10:27.526 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] session_meta: sidecarSessionId=c4a62252-7c9d-4f68-93c6-d4d0e55f76a0, state=unknown
2026-04-03 16:10:27.531 [sandbox-init] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - WebSocket connected to remote sidecar: ws://sandbox-shared:8080/?sessionId=c4a62252-7c9d-4f68-93c6-d4d0e55f76a0
2026-04-03 16:10:28.032 [sandbox-init] INFO  c.a.h.s.h.websocket.HiCodingWebSocketHandler - [Sandbox-Init] Reattach 成功: userId=dev-69ce2bcde4b098173c0807d3, sidecarSessionId=c4a62252-7c9d-4f68-93c6-d4d0e55f76a0
2026-04-03 16:10:28.063 [http-nio-8080-exec-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Sending: {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":false,"writeTextFile":false}}}}
2026-04-03 16:10:28.065 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":1,"agentInfo":{"name":"qwen-code","title":"Qwen Code","version":"0.13.0"},"authMethods":[{"id":"openai","name":"Use OpenAI API key","description":"Requires setting the `OPENAI_API_KEY` environment variable","_meta":{"type":"terminal","args":["--auth-type=openai"]}},{"id":"qwen-oauth","name":"Qwen OAuth","description":"OAuth authentication for Qwen models with free daily requests","_meta":{"type":"terminal","args":["--auth-type=qwen-oauth"]}}],"agentCapabilities":{"loadSession":true,"promptCapabilities":{"image":true,"audio":true,"embeddedContext":true},"sessionCapabilities":{"list":{},"resume":{}}}}}
2026-04-03 16:10:28.107 [http-nio-8080-exec-2] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Sending: {"jsonrpc":"2.0","id":2,"method":"session/new","params":{"cwd":"/workspace/dev-69ce2bcde4b098173c0807d3","mcpServers":[]}}
2026-04-03 16:10:28.175 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: {"jsonrpc":"2.0","id":2,"result":{"sessionId":"2c0aa41e-15e3-4476-8807-06dc30c32e87","models":{"currentModelId":"qianwen(openai)","availableModels":[{"modelId":"coder-model(qwen-oauth)","name":"coder-model","description":"Qwen 3.5 Plus — efficient hybrid model with leading coding performance","_meta":{"contextLimit":1000000}},{"modelId":"qianwen(openai)","name":"qianwen-dean","description":null,"_meta":{"contextLimit":131072}}]},"modes":{"currentModeId":"yolo","availableModes":[{"id":"plan","name":"Plan","description":"Analyze only, do not modify files or execute commands"},{"id":"default","name":"Default","description":"Require approval for file edits or shell commands"},{"id":"auto-edit","name":"Auto Edit","description":"Automatically approve file edits"},{"id":"yolo","name":"YOLO","description":"Automatically approve all tools"}]},"configOptions":[{"id":"mode","name":"Mode","description":"Session permission mode","category":"mode","type":"select","currentValue":"yolo","options":[{"value":"plan","name":"Plan","description":"Analyze only, do not modify files or execute commands"},{"value":"default","name":"Default","description":"Require approval for file edits or shell commands"},{"value":"auto-edit","name":"Auto Edit","description":"Automatically approve file edits"},{"value":"yolo","name":"YOLO","description":"Automatically approve all tools"}]},{"id":"model","name":"Model","description":"AI model to use","category":"model","type":"select","currentValue":"qianwen(openai)","options":[{"value":"coder-model(qwen-oauth)","name":"coder-model","description":"Qwen 3.5 Plus — efficient hybrid model with leading coding performance"},{"value":"qianwen(openai)","name":"qianwen-dean","description":""}]}]}}
2026-04-03 16:10:28.181 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: {"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"2c0aa41e-15e3-4476-8807-06dc30c32e87","update":{"sessionUpdate":"available_commands_update","availableCommands":[{"name":"btw","description":"Ask a quick side question without affecting the main conversation","input":null},{"name":"bug","description":"submit a bug report","input":null},{"name":"compress","description":"Compresses the context by replacing it with a summary.","input":null},{"name":"init","description":"Analyzes the project and creates a tailored QWEN.md file.","input":null},{"name":"summary","description":"Generate a project summary and save it to .qwen/PROJECT_SUMMARY.md","input":null},{"name":"review","description":"Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `/review`, `/review <pr-number>`, or `/review <file-path>`.","input":null}]}}}
2026-04-03 16:10:28.218 [http-nio-8080-exec-5] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Sending: {"jsonrpc":"2.0","id":3,"method":"session/prompt","params":{"sessionId":"2c0aa41e-15e3-4476-8807-06dc30c32e87","prompt":[{"type":"text","text":"帮我写一个排序算法,并生成de'mo执行排序数据"}]}}
2026-04-03 16:10:28.461 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: Error handling request {
2026-04-03 16:10:28.461 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   jsonrpc: '2.0',
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   id: 3,
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   method: 'session/prompt',
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   params: {
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:     sessionId: '2c0aa41e-15e3-4476-8807-06dc30c32e87',
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:     prompt: [ [Object] ]
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   }
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: } {
2026-04-03 16:10:28.462 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   code: -32603,
2026-04-03 16:10:28.463 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   message: 'Internal error',
2026-04-03 16:10:28.463 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received:   data: { details: '404 status code (no body)' }
2026-04-03 16:10:28.463 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: }
2026-04-03 16:10:28.463 [reactor-http-epoll-4] INFO  c.a.h.s.hicoding.runtime.RemoteRuntimeAdapter - [WS-Remote] Received: {"jsonrpc":"2.0","id":3,"error":{"code":-32603,"message":"Internal error","data":{"details":"404 status code (no body)"}}}

Screenshots

No response

Additional Context

修改sandbox-shared容器中的settings.json文件不生效,删除后重建文件也不生效

Checklist

  • I have searched existing issues to avoid duplicates
  • I have included all necessary information above
  • I am using the latest version of HiMarket
  • I can reproduce this issue consistently

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions