René's URL Explorer Experiment


Title: LargeFileUpload problem if 1 byte left from last slice · Issue #2581 · microsoftgraph/msgraph-sdk-java · GitHub

Open Graph Title: LargeFileUpload problem if 1 byte left from last slice · Issue #2581 · microsoftgraph/msgraph-sdk-java

X Title: LargeFileUpload problem if 1 byte left from last slice · Issue #2581 · microsoftgraph/msgraph-sdk-java

Description: Describe the bug Hello, i have a problem to upload files if exactly 1 byte is missing in the last slice. The upload is throwing an exception: java.util.concurrent.CancellationException: The upload task was retried the maximum number of t...

Open Graph Description: Describe the bug Hello, i have a problem to upload files if exactly 1 byte is missing in the last slice. The upload is throwing an exception: java.util.concurrent.CancellationException: The upload ...

X Description: Describe the bug Hello, i have a problem to upload files if exactly 1 byte is missing in the last slice. The upload is throwing an exception: java.util.concurrent.CancellationException: The upload ...

Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"LargeFileUpload problem if 1 byte left from last slice","articleBody":"### Describe the bug\n\nHello,\ni have a problem to upload files if exactly 1 byte is missing in the last slice.\n\nThe upload is throwing an exception:\njava.util.concurrent.CancellationException: The upload task was retried the maximum number of times without success and has been cancelled.\n\nE.g.\nFilesize: 288001\n\nSlice: 32000\nUploaded 32000 bytes of 288001 total bytes\nUploaded 64000 bytes of 288001 total bytes\nUploaded 96000 bytes of 288001 total bytes\nUploaded 128000 bytes of 288001 total bytes\nUploaded 160000 bytes of 288001 total bytes\nUploaded 192000 bytes of 288001 total bytes\nUploaded 224000 bytes of 288001 total bytes\nUploaded 256000 bytes of 288001 total bytes\nUploaded 288000 bytes of 288001 total bytes\n-> last one missing\n\nSlice: 16000\nUploaded 16000 bytes of 288001 total bytes\nUploaded 32000 bytes of 288001 total bytes\nUploaded 48000 bytes of 288001 total bytes\nUploaded 64000 bytes of 288001 total bytes\nUploaded 80000 bytes of 288001 total bytes\nUploaded 96000 bytes of 288001 total bytes\nUploaded 112000 bytes of 288001 total bytes\nUploaded 128000 bytes of 288001 total bytes\nUploaded 144000 bytes of 288001 total bytes\nUploaded 160000 bytes of 288001 total bytes\nUploaded 176000 bytes of 288001 total bytes\nUploaded 192000 bytes of 288001 total bytes\nUploaded 208000 bytes of 288001 total bytes\nUploaded 224000 bytes of 288001 total bytes\nUploaded 240000 bytes of 288001 total bytes\nUploaded 256000 bytes of 288001 total bytes\nUploaded 272000 bytes of 288001 total bytes\nUploaded 288000 bytes of 288001 total bytes\n-> last one missing\n\nSlice: 64000\nUploaded 64000 bytes of 288001 total bytes\nUploaded 128000 bytes of 288001 total bytes\nUploaded 192000 bytes of 288001 total bytes\nUploaded 256000 bytes of 288001 total bytes\nUploaded 288001 bytes of 288001 total bytes\n-> Ok\n\nI created a testfile with filesize 256001\n\nUploaded 64000 bytes of 256001 total bytes\nUploaded 128000 bytes of 256001 total bytes\nUploaded 192000 bytes of 256001 total bytes\nUploaded 256000 bytes of 256001 total bytes\n-> last one missing\n\nSlice: 96000 \nUploaded 96000 bytes of 256001 total bytes\nUploaded 192000 bytes of 256001 total bytes\nUploaded 256001 bytes of 256001 total bytes\n-> Ok\n\n\n\n\n` CreateUploadSessionPostRequestBody uploadSessionRequest = new CreateUploadSessionPostRequestBody();\n           DriveItemUploadableProperties properties = new DriveItemUploadableProperties();\n           properties.getAdditionalData().put(\"@microsoft.graph.conflictBehavior\", \"replace\");\n           uploadSessionRequest.setItem(properties);\n\n           UploadSession uploadSession = graphClient\n                   .drives()\n                   .byDriveId(driveId)\n                   .items()\n                   .byDriveItemId(pfad)\n                   .createUploadSession()\n                   .post(uploadSessionRequest);\n\n           // Create the upload task\n           int maxSliceSize = 320 * 100;\n           LargeFileUploadTask\u003cDriveItem> largeFileUploadTask = new LargeFileUploadTask\u003c>(\n                   graphClient.getRequestAdapter(),\n                   uploadSession,\n                   fileStream,\n                   streamSize,\n                   maxSliceSize,\n                   DriveItem::createFromDiscriminatorValue);\n\n           int maxAttempts = 5;\n\n           // Create a callback used by the upload provider\n           IProgressCallback callback = (current, max) -> System.out.println(\n                   String.format(\"Uploaded %d bytes of %d total bytes\", current, max));\n\n            // Do the upload\n\n           UploadResult\u003cDriveItem> uploadResult = largeFileUploadTask.upload(maxAttempts, callback);\n           if (uploadResult.isUploadSuccessful()) {\n               logger.info(\"Upload complete\");\n               logger.info(\"Item ID: {}\",uploadResult.itemResponse.getId());\n           } else {\n               logger.info(\"Upload failed\");\n           }`\n\n\n\n\n\n### Expected behavior\n\nUpload complete file\n\n### How to reproduce\n\nCreate a file with filesize = x * maxSliceSize  +1 \n\n### SDK Version\n\n6.62.0\n\n### Latest version known to work for scenario above?\n\n_No response_\n\n### Known Workarounds\n\n_No response_\n\n### Debug output\n\n\u003cdetails>\u003csummary>Click to expand log\u003c/summary>\n```\n\nError Message:\nCaused by: java.util.concurrent.CancellationException: The upload task was retried the maximum number of times without success and has been cancelled.\n\tat com.microsoft.graph.core.tasks.LargeFileUploadTask.upload(LargeFileUploadTask.java:149)\n\n```\n\u003c/details>\n\n\n### Configuration\n\n Linux\nJava 8\nx64\n\n### Other information\n\n_No response_","author":{"url":"https://github.com/assachs","@type":"Person","name":"assachs"},"datePublished":"2026-04-27T15:08:16Z","url":"https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fc3cb87a-4e07-61c3-c9e4-26dbebd282e7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8B86:133F24:A5C33:E3B76:6AF6BADE
html-safe-nonce062c549a1deb6ce4858501c526bcdec34ae7a28fab508e8809c111a247255d01
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Qjg2OjEzM0YyNDpBNUMzMzpFM0I3Njo2QUY2QkFERSIsInZpc2l0b3JfaWQiOiI1NTEzNjk4OTM3MDEwNTY3OTAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3755d89ad65342532a1f697cea888ce1777647ec0b9081e4a0ecabb49725aa01
hovercard-subject-tagissue:4336776445
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-java/2581/issue_layout
twitter:imagehttps://opengraph.githubassets.com/66dc7f6fd43aaefb198cc97d16b8457d3636d9ea94c338906688c6d2e1f2379b/microsoftgraph/msgraph-sdk-java/issues/2581
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/66dc7f6fd43aaefb198cc97d16b8457d3636d9ea94c338906688c6d2e1f2379b/microsoftgraph/msgraph-sdk-java/issues/2581
og:image:altDescribe the bug Hello, i have a problem to upload files if exactly 1 byte is missing in the last slice. The upload is throwing an exception: java.util.concurrent.CancellationException: The upload ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameassachs
hostnamegithub.com
expected-hostnamegithub.com
None8dfae1499400ee498ab0f86538d1c034e6c1b4f51c63ecade775c3b0894e3379
turbo-cache-controlno-preview
go-importgithub.com/microsoftgraph/msgraph-sdk-java git https://github.com/microsoftgraph/msgraph-sdk-java.git
octolytics-dimension-user_id17304259
octolytics-dimension-user_loginmicrosoftgraph
octolytics-dimension-repository_id103300409
octolytics-dimension-repository_nwomicrosoftgraph/msgraph-sdk-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id103300409
octolytics-dimension-repository_network_root_nwomicrosoftgraph/msgraph-sdk-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseee168845eb2be91203b179104ac9977fe4ea69a3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2581#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-java%2Fissues%2F2581
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-java%2Fissues%2F2581
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoftgraph%2Fmsgraph-sdk-java
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
microsoftgraphhttps://github.com/microsoftgraph
msgraph-sdk-javahttps://github.com/microsoftgraph/msgraph-sdk-java
Codehttps://github.com/microsoftgraph/msgraph-sdk-java
Issues107 (107)https://github.com/microsoftgraph/msgraph-sdk-java/issues
Pull requests23 (23)https://github.com/microsoftgraph/msgraph-sdk-java/pulls
Actionshttps://github.com/microsoftgraph/msgraph-sdk-java/actions
Projectshttps://github.com/microsoftgraph/msgraph-sdk-java/projects
Security and qualityhttps://github.com/microsoftgraph/msgraph-sdk-java/security
Insightshttps://github.com/microsoftgraph/msgraph-sdk-java/pulse
https://github.com/microsoftgraph/msgraph-sdk-java
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
microsoftgraph/msgraph-sdk-java-core#2164https://github.com/microsoftgraph/msgraph-sdk-java-core/pull/2164
LargeFileUpload problem if 1 byte left from last slicehttps://github.com/microsoftgraph/msgraph-sdk-java/issues/2581#top
microsoftgraph/msgraph-sdk-java-core#2164https://github.com/microsoftgraph/msgraph-sdk-java-core/pull/2164
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com/assachs
assachshttps://github.com/assachs
on Apr 27, 2026https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581#issue-4336776445
assachshttps://github.com/assachs
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
on Apr 27, 2026https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581#event-24911495969
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-java/issues/2581
status:waiting-for-triageAn issue that is yet to be reviewed or assignedhttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22status%3Awaiting-for-triage%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-java/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.