Repository navigation
Closed
Labels
Description
Initial checklist
- I understand this is a bug report and questions should be posted in the Community Forum
- I searched issues and couldn’t find anything (or linked relevant results below)
Steps to reproduce
Packages
// client
"tus-js-client": "^4.0.1",
// server
"@tus/server": "^1.4.1", // resolved to 1.8.0
"@tus/s3-store": "^1.4.1", // resolved to 1.6.0Client snippet
tusUpload = new tus.Upload(file, {
endpoint: `/admin/uploads/tus`, // removed url origin from snippet
chunkSize: 6 * 1024 * 1024,
retryDelays: [0, 1000, 3000, 5000],
parallelUploads: 1,
removeFingerprintOnSuccess: true,
storeFingerprintForResuming: true,
uploadDataDuringCreation: true,
headers: {
authorization: `Bearer ${token}`,
},
metadata: {
name,
id,
},
onProgress: function (bytesUploaded, bytesTotal) {
},
onSuccess: async function () {
},
onError: function (error) {
},
});Server snippet
const s3Store = new S3Store({
partSize: 6 * 1024 * 1024,
s3ClientConfig: {
bucket: BUCKETS.UPLOADS,
region: REGION,
},
});
this.tusServer = new Server({
path: '/admin/uploads/tus',
datastore: s3Store,
relativeLocation: true,
namingFunction(req, metadata) {
return metadata.name;
},
onResponseError: (req, res, err) => {
// err
},
});Expected behavior
Expectation is file upload success. Up until recently (although unknown how long this has been broken) our setup has worked without issue. With our setup we were successfully uploading and tracking the progress of uploads.
Pinning our versions of @tus/server and @tus/s3-store to 1.4.1 restores the expected behaviour.
Actual behavior
Error that is consistently hit, at seemingly the end of the upload process (server side), failing to complete the upload.
InvalidPartOrder: The list of parts was not in ascending order or did not have consecutive part numbers. The parts list must be specified order by part number, and must not have any gaps.
Stack trace comes out of the aws-sdk.
Activity
Acconut commentedon Oct 22, 2024
Are you using AWS S3 or another S3-compatible storage service?
matthewcaminiti commentedon Oct 22, 2024
AWS S3
jesse-small commentedon Dec 19, 2024
This could possibly be related to the bug I reported here:
#688
Solution is to not increment the part number twice, this is a fix required by the library.