Title: Getting: "No Response Received for upload." exception using LargeFileUploadTask · Issue #2500 · microsoftgraph/msgraph-sdk-java · GitHub
Open Graph Title: Getting: "No Response Received for upload." exception using LargeFileUploadTask · Issue #2500 · microsoftgraph/msgraph-sdk-java
X Title: Getting: "No Response Received for upload." exception using LargeFileUploadTask · Issue #2500 · microsoftgraph/msgraph-sdk-java
Description: Hello, we are experiencing this exception and we don't find much information about It so we are creating this issue because we are not sure if It is a bug or It is something else. We are trying to upload Large Files (more than 3 MB) to a...
Open Graph Description: Hello, we are experiencing this exception and we don't find much information about It so we are creating this issue because we are not sure if It is a bug or It is something else. We are trying to ...
X Description: Hello, we are experiencing this exception and we don't find much information about It so we are creating this issue because we are not sure if It is a bug or It is something else. We are trying...
Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-java/issues/2500
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Getting: \"No Response Received for upload.\" exception using LargeFileUploadTask","articleBody":"Hello, we are experiencing this exception and we don't find much information about It so we are creating this issue because we are not sure if It is a bug or It is something else.\n\nWe are trying to upload Large Files (more than 3 MB) to a draft Outlook Message from our Java 21 Maven Project with Microsoft Graph Java SDK v6.54.0. The POM.xml dependency looks like this:\n\n```\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.microsoft.graph\u003c/groupId\u003e\n \u003cartifactId\u003emicrosoft-graph\u003c/artifactId\u003e\n \u003cversion\u003e6.54.0\u003c/version\u003e\n \u003c/dependency\u003e\n```\n\n\n We are following the Microsoft Docs to do this: https://learn.microsoft.com/en-us/graph/sdks/large-file-upload?tabs=java#upload-large-attachment-to-outlook-message\n\nSo when we do the `task.upload()` we are getting the following Stack Trace:\n\n```\nSEVERE: Exception during large attachment upload for 'document (1).pdf'. Error: No Response Received for upload.\n[INFO] GCLOUD: com.microsoft.kiota.ApiException: No Response Received for upload.\n[INFO] GCLOUD: \tat com.microsoft.graph.core.requests.upload.UploadResponseHandler.handleResponse(UploadResponseHandler.java:71)\n[INFO] GCLOUD: \tat com.microsoft.graph.core.requests.upload.UploadSliceRequestBuilder.put(UploadSliceRequestBuilder.java:69)\n[INFO] GCLOUD: \tat com.microsoft.graph.core.tasks.LargeFileUploadTask.uploadSlice(LargeFileUploadTask.java:210)\n[INFO] GCLOUD: \tat com.microsoft.graph.core.tasks.LargeFileUploadTask.upload(LargeFileUploadTask.java:134)\n[INFO] GCLOUD: \tat plenion.officeware.services.OutlookMailService.addAttachmentsToDraft(OutlookMailService.java:1472)\n```\nOur code looks like this: \n\n```\n CreateUploadSessionPostRequestBody req = new CreateUploadSessionPostRequestBody();\n AttachmentItem item = new AttachmentItem();\n item.setAttachmentType(AttachmentType.File);\n item.setName(name);\n item.setSize(size);\n item.setIsInline(isInline);\n if (contentType != null) item.setContentType(contentType);\n req.setAttachmentItem(item);\n\n UploadSession session = graphClient\n .users()\n .byUserId(userMail)\n .messages()\n .byMessageId(draftMessageId)\n .attachments()\n .createUploadSession()\n .post(req);\n\n\n InputStream in = graphClient\n .drives()\n .byDriveId(driveId)\n .items()\n .byDriveItemId(a.getId())\n .content()\n .get();\n\n try (in) {\n log.info(\"Starting upload for attachment: \" + name);\n log.info(\"Upload session URL: \" + session.getUploadUrl());\n log.info(\"Upload session expiration: \" + session.getExpirationDateTime());\n\n int maxChunkSize = 4 * 1024 * 1024; // 4 MiB\n\n LargeFileUploadTask\u003cFileAttachment\u003e task = new LargeFileUploadTask\u003c\u003e(\n graphClient.getRequestAdapter(),\n session,\n in,\n size,\n maxChunkSize,\n FileAttachment::createFromDiscriminatorValue\n );\n\n\n IProgressCallback callback = (current, max) -\u003e log.info(\n String.format(\"Uploaded %d bytes of %d total bytes\", current, max)\n );\n\n UploadResult\u003cFileAttachment\u003e uploadResult = task.upload(5, callback);\n\n if (uploadResult.isUploadSuccessful()) {\n log.info(\"Upload complete. Item ID: \" + uploadResult.itemResponse.getId());\n } else {\n log.severe(\"Upload failed. No response received.\");\n }\n } catch (Exception e) {\n log.severe(\"Exception during large attachment upload for '\" + name + \"'. Error: \" + e.getMessage());\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n```\n\nIf this information is useful also we are using Google App Egine Standard to host our APIs but this error also occurs while localhost development too, so at first instance this is not related with Google.\n\nWhat is wrong here? Is It normal to get that message? Are we missing something?\n\nWe can provide more information if needed, please just let us know and we will update the issue. Thank you in advance.\n\n","author":{"url":"https://github.com/TheCloudGate","@type":"Person","name":"TheCloudGate"},"datePublished":"2025-10-16T12:17:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2500/msgraph-sdk-java/issues/2500"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:57a0536e-d7bb-5087-8f39-1c99b789647d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADDC:213A6B:D9EAB:130B3F:6969F859 |
| html-safe-nonce | 7b8753e7f283f2dc2ba5a5047337cde9d99cebff562ad996e65d0afd946e1685 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRERDOjIxM0E2QjpEOUVBQjoxMzBCM0Y6Njk2OUY4NTkiLCJ2aXNpdG9yX2lkIjoiNDgxMjUzNDIwMDA4MzgwNjI5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2c56120f4a989aa245ddac5031db79145e7e0e8b073e9af05701dad627a04cd7 |
| hovercard-subject-tag | issue:3521642145 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-java/2500/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60a0d8cab982f2bba15f215ac906c5517a6977c502179b74b3058ccfa6727833/microsoftgraph/msgraph-sdk-java/issues/2500 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60a0d8cab982f2bba15f215ac906c5517a6977c502179b74b3058ccfa6727833/microsoftgraph/msgraph-sdk-java/issues/2500 |
| og:image:alt | Hello, we are experiencing this exception and we don't find much information about It so we are creating this issue because we are not sure if It is a bug or It is something else. We are trying to ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TheCloudGate |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoftgraph/msgraph-sdk-java git https://github.com/microsoftgraph/msgraph-sdk-java.git |
| octolytics-dimension-user_id | 17304259 |
| octolytics-dimension-user_login | microsoftgraph |
| octolytics-dimension-repository_id | 103300409 |
| octolytics-dimension-repository_nwo | microsoftgraph/msgraph-sdk-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 103300409 |
| octolytics-dimension-repository_network_root_nwo | microsoftgraph/msgraph-sdk-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width