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

error code 400 #32

Closed
mohammedmans opened this issue Aug 22, 2019 · 10 comments
Closed

error code 400 #32

mohammedmans opened this issue Aug 22, 2019 · 10 comments

Comments

@mohammedmans
Copy link

io.tus.java.client.ProtocolException: unexpected status code (400) while creating upload

@Acconut
Copy link
Member

Acconut commented Aug 22, 2019

More details, such as the code and what you were doing, please. The error message itself is not helpful enough.

@mohammedmans
Copy link
Author

get this error at:
TusUploader uploader = client.resumeOrCreateUpload(upload);
i use tus approach to uplaod video to vimeo, have upload link from vimeo and replace
"http://master.tus.io/files" with my uplaod link
client.setUploadCreationURL(new URL(upload_link));

@Acconut
Copy link
Member

Acconut commented Aug 25, 2019

You cannot use resumeOrCreateUpload with Vimeo but instead need to use beginOrResumeUploadFromURL as shown in this example: #19 (comment)

@mohammedmans
Copy link
Author

i changed to use beginOrResumeUploadFromURL instead resumeOrCreateUpload
and get this exception
"javax.net.ssl.SSLException: Write error: ssl=0x7885a6e308: I/O error during system call, Broken pipe"

@mohammedmans
Copy link
Author

and when use same approach in example: #19 (comment) get "android.os.NetworkOnMainThreadException"

@Acconut
Copy link
Member

Acconut commented Aug 25, 2019

You must not invoke tus-android-client or tus-java-client on the main thread since network activity is not allowed on the main thread. This is not related to tus directly but it's a restriction for any Android app. Have a look at https://github.com/tus/tus-android-client/blob/master/example/src/main/java/io/tus/android/example/MainActivity.java to see an example or just search the web to fix NetworkOnMainThreadException.

@mohammedmans
Copy link
Author

mohammedmans commented Aug 26, 2019

it's worked now and upload to vimeo after adding this answer

@Acconut
Copy link
Member

Acconut commented Aug 26, 2019

Glad to hear that it worked! I am going to close this issue then.

@Acconut Acconut closed this as completed Aug 26, 2019
@mohammedmans
Copy link
Author

i got this error: javax.net.ssl.SSLException: Write error: ssl=0x720c8a5208: I/O error during system call, Broken pipe, this answer solved that error yesterday but today i got same error

@Acconut
Copy link
Member

Acconut commented Sep 5, 2019

Were you able to solve this issue or is it still a problem?

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

No branches or pull requests

2 participants