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

@aws-sdk/lib-storage doesn't upload and freezes program #6030

Closed
3 tasks done
Calemy opened this issue Apr 26, 2024 · 1 comment
Closed
3 tasks done

@aws-sdk/lib-storage doesn't upload and freezes program #6030

Calemy opened this issue Apr 26, 2024 · 1 comment
Assignees
Labels
bug This issue is a bug.

Comments

@Calemy
Copy link

Calemy commented Apr 26, 2024

Checkboxes for prior research

Describe the bug

I try to upload a stream.passThrough() object via the lib-storage.
when i run the code it just freezes the entire code

SDK version number

@aws-sdk/package-name@version, ...

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

Bun 1.1.4

Reproduction Steps

import { Upload } from "@aws-sdk/lib-storage"
import { S3 } from "@aws-sdk/client-s3"
import stream from "stream"
import fetch from "node-fetch"
const storage = new S3({
    endpoint: "https://s3.eu-central-2.wasabisys.com",
    region: "eu-central-2",
    credentials: {
        accessKeyId: process.env.storageID,
        secretAccessKey: process.env.storageKey
    }
})

const request = await fetch("https://catboy.best/d/1")
request.body.pipe(await uploadToStorage("maps/1.osz"))

async function uploadToStorage(path, retries = 0){
    const data = new stream.PassThrough()
    try {
        const upload = new Upload({
            client: storage,
            params: {
                Bucket: "mino",
                Key: path,
                Body: data
            }
        })
        upload.on("httpUploadProgress", (progress) => { console.log(progress) })
        console.log(await upload.done())
    } catch(e){
        console.error(e)
    } finally {
        return data;
    }
}

Observed Behavior

progress never starts, function never gets finished and is stuck.

Expected Behavior

to upload the file

Possible Solution

No response

Additional Information/Context

No response

@Calemy Calemy added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 26, 2024
@RanVaknin
Copy link
Contributor

Hi @Calemy ,

The AWS SDK S3 client only officially guarantees compatibility with the AWS S3 service. We do not guarantee support for S3 clones like Wasabi / MinIO / digital ocean spaces or any other non AWS products.

Since this is not actionable by the SDK team I'm going to go ahead and close this.

Thanks,
Ran~

@RanVaknin RanVaknin self-assigned this Apr 30, 2024
@RanVaknin RanVaknin removed the needs-triage This issue or PR still needs to be triaged. label Apr 30, 2024
@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants