ag-ui-protocol / ag-ui-protocol/ag-ui

A user-triggered stopGeneration causes a server error (ECONNRESET) instead of performing a clean abort.

Đang mở
#733 11 bình luận 3 reaction 0 người được giao Xem trên GitHub
bug Integration
Ngôn ngữ chính
Python
Star
15.9k
Fork
1.4k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
163

Mô tả

### ♻️ Reproduction Steps

1. Setup CopilotKit as detailed [here](https://docs.copilotkit.ai/adk/quickstart?path=exiting-agent)
2. Send any message in the chat
3. Click the Stop button

### ✅ Expected Behavior

A non-critical response indicating the generation was canceled by the user. No critical severity toast.

### ❌ Actual Behavior

Multiple CopilotKit client errors occurred on subsequent requests, and an uncaught exception on the server broke the connection to Google ADK.

### 𝌚 CopilotKit Version

```shell
├── @copilotkit/react-core@1.10.6
├── @copilotkit/react-ui@1.10.6
├── @copilotkit/runtime@1.10.6
```

### 📄 Logs

Copilot Runtime

```shell

Error: aborted
at ignore-listed frames {
code: 'ECONNRESET'
}
⨯ uncaughtException: Error: aborted
at ignore-listed frames {
code: 'ECONNRESET'
}
[10:05:10.538] ERROR: Error in text message content stream
component: "CopilotResolver.generateCopilotResponse"
err: {
"type": "L",
"message": "Unknown error occurred",
"stack":
CopilotError: Unknown error occurred
at new L (/app/.next/server/app/api/copilotkit/route.js:35:3573)
at /app/.next/server/app/api/copilotkit/route.js:152:23016
at /app/.next/server/app/api/copilotkit/route.js:363:51989
at h._error (/app/.next/server/app/api/copilotkit/route.js:1:21411)
at c.error (/app/.next/server/app/api/copilotkit/route.js:334:121714)
at c._error (/app/.next/server/app/api/copilotkit/route.js:334:122077)
at c.error (/app/.next/server/app/api/copilotkit/route.js:334:121714)
at a.f [as _subscribe] (/app/.next/server/app/api/copilotkit/route.js:210:24224)
at b.Observable.a._trySubscribe (/app/.next/server/app/api/copilotkit/route.js:210:15982)
at /app/.next/server/app/api/copilotkit/route.js:210:15905
"extensions": {
"name": "CopilotError",
"statusCode": 500,
"code": "UNKNOWN",
"visibility": "toast",
"severity": "critical",
"troubleshootingUrl": null,
"originalError": {
"message": "Unknown error occurred",
"stack":
Error:
at new L (/app/.next/server/app/api/copilotkit/route.js:35:3746)
at /app/.next/server/app/api/copilotkit/route.js:152:23016
at /app/.next/server/app/api/copilotkit/route.js:363:51989
at h._error (/app/.next/server/app/api/copilotkit/route.js:1:21411)
at c.error (/app/.next/server/app/api/copilotkit/route.js:334:121714)
at c._error (/app/.next/server/app/api/copilotkit/route.js:334:122077)
at c.error (/app/.next/server/app/api/copilotkit/route.js:334:121714)
at a.f [as _subscribe] (/app/.next/server/app/api/copilotkit/route.js:210:24224)
at b.Observable.a._trySubscribe (/app/.next/server/app/api/copilotkit/route.js:210:15982)
at /app/.next/server/app/api/copilotkit/route.js:210:15905
}
},
"code": "UNKNOWN",
"statusCode": 500,
"severity": "critical",
"visibility": "toast"
}

```

CopilotKit on the browser

```
Error in async callback: Error: This operation was aborted
at 656-848504ed282a0c6e.js:1:584041
at Generator.next ()
at a (151-76e5a13ff29c8316.js:190:1664)
Uncaught (in promise) Error: This operation was aborted
at 656-848504ed282a0c6e.js:1:584041
at Generator.next ()
at a (151-76e5a13ff29c8316.js:190:1664)
```

### Environment

CopilotKit Next.js app deployed on Kubernetes v1.33.3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.