Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download file with size more than INT)MAX_VALUE failed - Using Graph 6.10.0 #2009

Closed
ihudedi opened this issue May 21, 2024 · 3 comments · Fixed by microsoft/kiota-java#1318
Assignees
Labels
bug dependencies Pull requests that update a dependency file dependency:kiota Awaiting fix from core dependency project module type:bug A broken experience

Comments

@ihudedi
Copy link

ihudedi commented May 21, 2024

Hi,
I am trying to download file with 5GB
I am getting this exception:
2024-05-21 09:57:32,587 DEBUG [Thread-11205] (SPOWrapper:828) - Error in SPOWrapper::retrieveFileStream for path /PSR_BITRATE/5GB : For input string: "5368709120"
java.lang.NumberFormatException: For input string: "5368709120"
at java.base/java.lang.NumberFormatException.forInputString(Unknown Source) ~[?:?]
at java.base/java.lang.Integer.parseInt(Unknown Source) ~[?:?]
at java.base/java.lang.Integer.parseInt(Unknown Source) ~[?:?]
at com.microsoft.kiota.http.OkHttpRequestAdapter.getHttpResponseMessage(OkHttpRequestAdapter.java:721) ~[microsoft-kiota-http-okHttp-1.1.11.jar!/:?]
at com.microsoft.kiota.http.OkHttpRequestAdapter.sendPrimitive(OkHttpRequestAdapter.java:338) ~[microsoft-kiota-http-okHttp-1.1.11.jar!/:?]
at com.microsoft.graph.drives.item.items.item.content.ContentRequestBuilder.get(ContentRequestBuilder.java:78) ~[microsoft-graph-6.10.0.jar!/:?]
at com.microsoft.graph.drives.item.items.item.content.ContentRequestBuilder.get(ContentRequestBuilder.java:65) ~[microsoft-graph-6.10.0.jar!/:?]
at com.bmc.cm.aft.client.wrapper.SPOWrapper.retrieveFileStream(SPOWrapper.java:822) [classes!/:?]
at com.bmc.cm.aft.client.wrapper.SPOWrapper.downloadFileToLocalFileSystem(SPOWrapper.java:873) [classes!/:?]
at com.bmc.cm.aft.client.SPODownloadToLocalFileCopy.downloadFileToLocalFileSystem(SPODownloadToLocalFileCopy.java:69) [classes!/:?]
at com.bmc.cm.aft.client.CloudFileCopy.copyFile(CloudFileCopy.java:144) [classes!/:?]
at com.bmc.cm.aft.client.FileCopy.transfer(FileCopy.java:1669) [classes!/:?]
at com.bmc.cm.aft.client.FileCopy.run(FileCopy.java:1500) [classes!/:?]
at com.bmc.cm.aft.client.FTCTransfer.copySingleFile(FTCTransfer.java:925) [classes!/:?]
at com.bmc.cm.aft.client.FTCTransfer.copy(FTCTransfer.java:802) [classes!/:?]
at com.bmc.cm.aft.client.FTCTransfer.runCopy(FTCTransfer.java:383) [classes!/:?]
at com.bmc.cm.aft.client.FTCTransfer.run(FTCTransfer.java:312) [classes!/:?]
at com.bmc.cm.aft.client.SubtaskRunner.run(SubtaskRunner.java:628) [classes!/:?]
at com.bmc.cm.aft.client.FTCHandler.runSubTasks(FTCHandler.java:388) [classes!/:?]
at com.bmc.cm.aft.client.FTCHandler.runJob(FTCHandler.java:219) [classes!/:?]
at com.bmc.cm.aft.jobmanagement.JobObjectImpl$JobRunnerThread.run(JobObjectImpl.java:401) [classes!/:?]

I can see that in file OkHttpRequestAdapter::getHttpResponseMessage
in line 719
if (contentLengthHeaderValue != null && !contentLengthHeaderValue.isEmpty()) {
final int contentLengthHeaderValueAsInt =
Integer.parseInt(contentLengthHeaderValue);
spanForAttributes.setAttribute(
EXPERIMENTAL_HTTP_RESPONSE_BODY_SIZE, contentLengthHeaderValueAsInt);
}

and it failed because the size is long and not int

Thanks,
Itay

@baywet baywet self-assigned this May 21, 2024
@baywet baywet added bug dependencies Pull requests that update a dependency file type:bug A broken experience dependency:kiota Awaiting fix from core dependency project module labels May 21, 2024
@baywet
Copy link
Member

baywet commented May 21, 2024

Hi @ihudedi
Thanks for using the SDK and for reporting this issue.
I authored microsoft/kiota-java#1318 to address it.

@ihudedi
Copy link
Author

ihudedi commented May 22, 2024

Hi @baywet
Do you know when the new version of kiota will be released?
Thanks,
Itay

@baywet
Copy link
Member

baywet commented May 22, 2024

of the dependencies, today. Of the generator itself on June 7th, but that's not a dependency for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file dependency:kiota Awaiting fix from core dependency project module type:bug A broken experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants