[Bug]: a2a-java client sends message with empty task ID and context ID
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Xem xét mã tuần tự hóa thông báo của A2A Java client, có thể nằm trong một lớp xử lý việc xây dựng yêu cầu JSON-RPC. Tìm nơi các trường taskId và contextId được thiết lập. Đảm bảo các trường tùy chọn rỗng được bỏ qua. Kiểm thử bằng cách gửi một thông báo và xác minh rằng payload JSON không chứa các chuỗi rỗng. Kiểm tra phần xử lý phản hồi của .Net agent đối với các ID rỗng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
While investigating errors reported by https://darrelmiller.github.io/agentbin/index.html, I found out that messages sent by the A2A Java client contains empty taskId and contextId.
They look like (verbatim):
curl -sN -X POST https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/spec \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": "839ffa13-d966-462c-88a2-136805189343",
"method": "SendStreamingMessage",
"params": {
"tenant": "",
"message": {
"messageId": "'$(uuidgen | tr '[:upper:]' '[:lower:]')'",
"taskId": "",
"contextId": "",
"role": "ROLE_USER",
"parts": [
{
"text": "task-lifecycle process this",
"metadata": {},
"filename": "",
"mediaType": ""
}
],
"metadata": {},
"extensions": [],
"referenceTaskIds": []
},
"configuration": {
"acceptedOutputModes": [],
"returnImmediately": false
},
"metadata": {}
}
}'
I think the .Net remote agent should reject these messages (or ignore the empty taskId) but it replies with responses such as
data: {"jsonrpc":"2.0","id":"839ffa13-d966-462c-88a2-136805189343","result":{"task":{"id":"","contextId":"","status":{"state":"TASK_STATE_SUBMITTED","timestamp":"2026-03-26T12:06:00.4665426+00:00"}}}}
which are not deserialised by the a2a-java SDK due to the empty task.id.
The a2a-java client should omit optional fields that are not set when sending messages.
If I remove the taskId: "" field from the reproducer, the .Net agent replies with a generated taskId as expected.
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Java
- Star
- 495
- Fork
- 174
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 48
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của a2aproject/a2a-java
-
[Bug]: NullPointerException in A2ACommonFieldMapper when a struct field has an explicit null value Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
a2aproject/a2a-java#1160 · 1 bình luận · 2 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
a2aproject/a2a-java#1142 · 1 người được giao ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
a2aproject/a2a-java#1012 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
a2aproject/a2a-java#464 · 1 bình luận ·
-
sample
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
a2aproject/a2a-java#375 · 5 bình luận · 1 người được giao ·
Tất cả issue của a2aproject/a2a-java
Issue tương tự
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Đang mởarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100