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

Upload stuck after few seconds without showing error #39

Open
petarljubic opened this issue May 18, 2020 · 5 comments
Open

Upload stuck after few seconds without showing error #39

petarljubic opened this issue May 18, 2020 · 5 comments
Labels

Comments

@petarljubic
Copy link

Question
After a few seconds from the beginning of the video upload process, the progress bar stops without displaying any errors. Sometimes (when I debug my code and it stops on breakpoint) I got
ssl=0xc5934ed8: I/O error during system call, Broken pipe I try to solve this problem with #33
and
https://github.com/tus/tus-android-client#i-get-tlsssl-errors-on-older-android-versions
but without any success. For some reason, program never reach uploader.finish() or anything below that line of code (that is strange because do-while code is not in infinity loop).

Code sample:
`

            HashMap<String, String> headers = new HashMap<>();
            headers.put("Tus-Resumable", "1.0.0");
            headers.put("Authorization", getAuthHeader());
            headers.put("Accept", getAcceptHeader());
            headers.put("Content-Type", "application/offset+octet-stream");
            headers.put("Upload-Length", "" + upload.getSize());
            headers.put("Connection", "Keep-Alive");
            client.setHeaders(headers);

            TusUploader uploader = client.beginOrResumeUploadFromURL(upload, client.getUploadCreationURL());
            long totalBytes = upload.getSize();
            long uploadedBytes = uploader.getOffset();

            uploader.setChunkSize(1024);

            while (!isCancelled() && uploader.uploadChunk() > 0) {
                uploadedBytes = uploader.getOffset();
                publishProgress(uploadedBytes, totalBytes);
            }
            
            uploader.finish();
            return uploader.getUploadURL();

`
device-2020-05-18-130543

Setup details
Please provide following details, if applicable to your situation:

  • Runtime environment: [Android version 7]
  • Used tus-android-client version: [v0.1.9]
  • Used tus-java-client version: [ev0.4.2]
@Acconut
Copy link
Member

Acconut commented May 20, 2020

Frankly, I am not sure what could cause this. Does this behavior always occur? Also when you upload to https://master.tus.io/files/?

@petarljubic
Copy link
Author

This behavior is always occur. And yes, if I use
client.setUploadCreationURL("https://master.tus.io/files/"); TusUploader uploader = client.createUpload(upload);
instead of TusUploader uploader = client.beginOrResumeUploadFromURL(upload, url)
Everything works just fine.

@Acconut
Copy link
Member

Acconut commented May 24, 2020

Please contact Vimeo support as it looks like a problem on their end. Maybe something with the SSL setup is conflicting. Sorry that I cannot provide you better help.

@lujiang618
Copy link

use this : headers.put("Connection", "close");

@r-a-o
Copy link

r-a-o commented Jun 22, 2024

If the bytesRemaining, readBytes or actual byte size of file is not proper, the upload takes forever / doesn't end on time, worth checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants