-
Notifications
You must be signed in to change notification settings - Fork 196
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
Last part of multi-upload is ignored #415
Comments
Hi, I haven't seen this happen. We also have a test for this that runs against all stores: tus-node-server/test/stores.test.ts Lines 191 to 214 in a89eaa2
If you could provide a failing test that would help a lot 🙌 |
Hi, thanks for prompt reply, I will try to provide a failing test then |
@ringge are you still interested in contributing? |
Hi yes I am, sorry I've been caught up, I will provide a sample repo to demonstrate the issue soon |
I've encountered the same issue. In my production environment, files are getting mostly uploaded, but the final part is being stored separately, as you can see in the attached screenshots. What seems to have fixed it is setting the chunk part size to 6mb on both the client and server, it's something I noticed in the Supabase docs where they write I'm currently working to replicate a failing test, while familiarizing myself with the code base, but right now I'm not sure what the issue is. |
I'll look into it soon.
Note that you should never set the
Thanks for the effort :) |
Also curious how you know this 😯 |
they said in in Supabase docs that they use Tus protocol : ) https://supabase.com/docs/guides/storage/uploads#resumable-upload |
I saw that! But that could be one of dozens of tus server implementations, I was curious if I missed something specifically about tus-node-server. |
They call out tus-node-server in their announcement for resumable uploads. It appears that they plan to contribute some improvements, which would be awesome! |
Thanks for the heads up, so maybe it was just changing the chunk size in the s3 store config that helped. |
I came across this issue as well and thought that the cause could have been this issue #444 which has been addressed. |
Yeah I am continuing to experience this issue, even with the latest version. I've tried debugging the problem but unfortunately came up empty handed. However, I've found a temporary solution by adjusting the 'chunkSize' within the tus-js-client to 6mb, which fixes the issue. Although @Murderlon previously recommended not to, it definitely works for me, but I can't explain why. I've also attempted to replicate the issue through a failing test but haven't been able to get consistent results. If I modify the test file size in the S3 data store test, it occasionally triggers an error. Here's what I've been using: this.testFileSize = 20_849_384; this.testFileName = 'test.stl'. |
Alright, thanks for reporting back. |
@Murderlon I patched in #475 but it unfortunately it didn't solve the issue for me - I'm still getting corrupted uploads that are missing bytes from the end and have a |
Thanks for immediately testing this yourself! I'll take a look next week and update the PR 👍 |
Found the issue and incorporated it in the PR. |
Excellent, thank you so much! |
This issue is still present with latest fix. Problem is that all logic regarding current part number, offset or determining whether this is final part must be synchronous. Failing to do so can cause parts to be reordered or not properly detected as final (more common case). |
@mitjap this seems to have resolved a bunch of upload problems our users were having - thank you! |
Hello, it seems the issue of "Last part of multi-upload is ignored" (tus/tusd#462) is not yet fixed in tus/server and @tus/s3store, so now when I integrate @tus/server and @tus/s3store with Nodejs (specifically nextjs) I have the issue that last part of the uploads were ignored, thus the uploaded file is incomplete
The text was updated successfully, but these errors were encountered: