microsoftgraph / microsoftgraph/msgraph-sdk-java
Issue with delta query causing JsonSyntaxException / EOFException in Java SDK 5.80.0
還沒有人認領這個 Issue。
- 主要語言
- Java
- 星號
- 444
- 分支
- 154
- 平均合併
- 18 小時 28 分鐘
- 30 天內合併 PR
- 4
描述
Describe the bug
SDK Version
com.microsoft.graph:microsoft-graph:5.80.0
API Endpoint
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_
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 DefaultSerializer.java 和 CoreHttpProvider.java 開始,報告的堆疊追蹤顯示回應反序列化發生在這裡;使用大型結果集和 $skiptoken 重現 mail-folder messages delta 要求。將 HTTP 回應本文與 $.value[7] 處的失敗進行比較。當 SDK 能夠在不發生未受控的 JsonSyntaxException 的情況下處理回應,或明確回報回應不完整時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100