microsoftgraph / microsoftgraph/msgraph-sdk-java

Issue with delta query causing JsonSyntaxException / EOFException in Java SDK 5.80.0

Đang mở
#2,447 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

status:waiting-for-triage type:bug
Ngôn ngữ chính
Java
Star
444
Fork
154
Merge trung bình
18 giờ 28 phút
Pull request đã merge (30 ngày)
4

Mô tả

Describe the bug

SDK Version
com.microsoft.graph:microsoft-graph:5.80.0

API Endpoint

`GET https://graph.microsoft.com/v1.0/users/{user-id}/mailFolders('{folder-id}')/messages/delta?$skiptoken={...}

Error Trace

java.io.EOFException: End of input at line 1 column 6561 path $.value[7]
	at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1542)
	at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:550)
	at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:498)
	at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:875)
...
Wrapped by: com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 1 column 6561 path $.value[7]
	at com.google.gson.Gson.fromJson(Gson.java:1370)
	at com.microsoft.graph.serializer.DefaultSerializer.deserializeObject(DefaultSerializer.java:104)
	at com.microsoft.graph.http.CoreHttpProvider.handleJsonResponse(CoreHttpProvider.java:536)

Problem Description
When invoking the delta query on a mail folder using $skiptoken, the response causes a JsonSyntaxException due to malformed or truncated JSON — specifically during deserialization of the response.

It consistently fails at $.value[7], suggesting an incomplete or malformed JSON payload returned by the API or a decoding issue inside the SDK.

Expected behavior

The SDK should either:

Deserialize the full JSON response correctly;

Or raise a controlled exception indicating an incomplete/malformed response from the API.

How to reproduce

Call delta() on a MailFolder with large volume of messages.

Use the returned $skiptoken for the next page.

Observe the failure in Gson during deserialization of response.

Additional information
Status: 200, Headers: java.net.http.HttpHeaders@c17d2c61 { {:status=[200], cache-control=[private], client-request-id=[73d4281b-34fb-4316-8593-3141f23182ce], content-type=[application/json; odata.metadata=minimal; odata.streaming=false; IEEE754Compatible=false; charset=utf-8], date=[Fri, 25 Jul 2025 09:17:30 GMT], request-id=[73d4281b-34fb-4316-8593-3141f23182ce], strict-transport-security=[max-age=31536000], x-ms-ags-diagnostic=[{"ServerInfo":{"DataCenter":"East US","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"BL02EPF00040ECF"}}]} }

SDK Version

5.80.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ DefaultSerializer.java và CoreHttpProvider.java, nơi stack trace được báo cáo cho thấy quá trình giải tuần tự hóa phản hồi, và tái hiện yêu cầu delta của mail-folder messages bằng một tập kết quả lớn và $skiptoken. So sánh phần thân phản hồi HTTP với lỗi tại $.value[7]. Được xem là hoàn tất khi SDK xử lý phản hồi mà không xảy ra JsonSyntaxException không được kiểm soát hoặc báo cáo rõ ràng rằng phản hồi không đầy đủ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

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.