-
Notifications
You must be signed in to change notification settings - Fork 885
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
Uploading files with a content size >~ 2.1 GB do not restart properly #5468
Comments
Thank you for your report. I will go ahead and label this as a bug while we attempt to replicate the issue. |
@kaloramik Is using Amplify a possibility for you? Amplify uses the latest feature sets and has lot of improvements compared to AWS SDK. |
@harsh62 we can, but we already have our own backend / auth setup and would prefer not onboarding on to the entire Amplify ecosystem. Do you have a link to instructions / guide on how to use Amplify as a drop-in replacement for the AWSTransferUtility? |
@harsh62 In addition, background uploading is extremely important for us. Looking at the documentation, the Amplify Upload Storage does not mention behavior when the app goes into suspension, terminated by system, or terminated by user. https://docs.amplify.aws/swift/build-a-backend/storage/upload-files/ Whereas the gen 1 system seems to lay it out more specifically https://docs.amplify.aws/gen1/swift/sdk/storage/transfer-utility/ Do you have any guarantees on reliability, especially when it comes to backgrounding, suspension, and restarts for the Amplify version? I would not want to spend a lot of time migrating just to run into issues that were solved in the Gen 1 version. |
@creitz Do you want to open a PR for the fix that you are suggesting? (Looks correct to me) |
@harsh62 just bumping the previous message on Amplify, would love to get some more info on migrating and the feature set in the new Amplify SDK, especially WRT background uploads |
@kaloramik I am working with my team to draft documentation around your question.
I will get back to you on this soon |
awesome thank you! |
Sure can do! |
Describe the bug
I am utilizing the behavior in the Swift TransferUtility documentation here https://docs.amplify.aws/gen1/swift/sdk/storage/transfer-utility/#managing-transfers-when-an-app-restarts
I have tested this with a 1.75 GB file and a 2.3 GB file. It seems to work correctly for the 1.75 GB file, but not for the 2.3 GB file.
In the 2.3 GB case, the contentLength gets changed to something negative. One possible hypothesis could be that 2.3 GB is larger than the size of a 32 bit signed int?
To Reproduce
Base case
Steps to reproduce the behavior:
task.contentLength
is negativeObserved Behavior
see above
Expected Behavior
A clear and concise description of what you expected to happen.
Stack Trace
Please provide a stack trace if applicable e.g. a crash is occurring.
I am logging to Datadog here
you can see here where after the app restarts, the contentLength changes
Note that the original content length was
2332786803
. the new content length is-1962180493
This is the value of the former as a signed intCode Snippet
I have generally followed the same instructions in the AutoResume sample app
Unique Configuration
If you are reporting an issue with a unique configuration or where configuration can make a difference in code execution (i.e. Cognito) please provide your configuration. Please make sure to obfuscate sensitive information from the configuration before posting.
Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
Screenshots
If applicable, add screenshots to help explain your problem.
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
Add any other context about the problem here like your specific use case.
Relevant Console Output
In some cases, it might be helpful to add any logs from your console that better help you tell the story of this issue. You can easily enable logging in your app by putting the following code in your app delegate.
Logs
Please logs in the code block below. (See: Logs Guidance)
Log Messages
The text was updated successfully, but these errors were encountered: