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

AWSS3TransferUtility GIF fails without any response #5462

Open
nastasiupta opened this issue Nov 13, 2024 · 1 comment
Open

AWSS3TransferUtility GIF fails without any response #5462

nastasiupta opened this issue Nov 13, 2024 · 1 comment
Labels
question General question s3 Issues related to S3

Comments

@nastasiupta
Copy link

nastasiupta commented Nov 13, 2024

Describe the bug
I have a function that uses awsTransferUtility to upload from an URL (for example a video or a gif)

To Reproduce

  1. The user selects a GIF from Photos app
  2. Setup AWSS3TransferUtility and upload the file from given URL:
return try await withCheckedThrowingContinuation { continuation in
    defer {
        let continuationError = NSError(domain: "S3AsyncWorker",
                                        code: 999,
                                        userInfo: [NSLocalizedDescriptionKey: "Continuation was not resumed properly."])
            continuation.resume(throwing: continuationError)
    }

    func transferUtility(uploadFile: URL, contentType: String) {
        awsTransferUtility.uploadFile(uploadFile,
                                      bucket: bucket,
                                      key: key,
                                      contentType: contentType,
                                      expression: expression) { task, error in
            if let error = error {
                ....
            } else {
               ....
            }
        }
    }
    
    ....
}
  1. The completion block is not called
    The same flow is executed for a video and everything works great, in case of video contentType is "video/mp4", in case of gif is "image/gif"
    This is printed at console: SWIFT TASK CONTINUATION MISUSE: execute(data:) leaked its continuation!
    Later edit:
    after I added defer, the worker is throwing the error "Continuation was not resumed properly."

Environment(please complete the following information):

  • SDK Version: 2.37.2
  • Dependency Manager: SPM
  • Xcode Version: 16.1

Device Information (please complete the following information):

  • Device: iPhone 14 Pro
  • iOS Version: 18.1

Later edit:
So, the issue is related to the url for GIFs selected from Photos app.
At the moment when the user selects a GIF, I covert it to Data and use awsTransferUtility.uploadData and everything works as expected.

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Nov 13, 2024
@edisooon edisooon self-assigned this Nov 14, 2024
@edisooon edisooon added s3 Issues related to S3 question General question and removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Nov 14, 2024
@edisooon
Copy link
Member

Hi @nastasiupta, thank you for submitting the issue!
One of our team members will look into this and verify if it's a bug in the library.
Meanwhile, could you provide us with your full logs?

@edisooon edisooon removed their assignment Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question s3 Issues related to S3
Projects
None yet
Development

No branches or pull requests

2 participants