Skip to content

couldNotCreateFileOnServer Error with successful tusd server logs, Unable to retry afterward #203

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

Open
miguelespinoza opened this issue Apr 25, 2025 · 0 comments

Comments

@miguelespinoza
Copy link

miguelespinoza commented Apr 25, 2025

Overview

I'm encountering this issue on LTE (cellular network) where file uploads occasionally hit the couldNotCreateFileOnServer error. Unfortunately, with this generic message it's hard to understand what truly causes the issue

To further add to the confusion our server logs show a successful upload, we're using tusd Golang server.
It's as if the TUSClient fails prematurely, but the upload task is still running.
Notice server logs indicates a 2 second upload, but on the client we're seeing the error immediately around the time the upload starts. Not able to repro this locally

2025/04/24 15:32:57 INFO UploadCreated method=POST path="" requestId="" id={tus+uploadId} size=9544673 url=https://tus.domain.com/uploads/{tus+uploadId}
2025/04/24 15:32:57 INFO ResponseOutgoing method=POST path="" requestId="" id={tus+uploadId} status=201 body=""
2025/04/24 15:34:22 Received request: Method=PATCH, Path=/uploads/{tus+uploadId}, RemoteAddr=10.x.x.x:x, UserAgent=App/123 CFNetwork/x.x.1.2.1 Darwin/24.0.0
2025/04/24 15:34:22 INFO RequestIncoming method=PATCH path={tus+uploadId} requestId=""
2025/04/24 15:34:22 INFO ChunkWriteStart method=PATCH path={tus+uploadId} requestId="" id={tus+uploadId} maxSize=9544673 offset=0
2025/04/24 15:34:23 INFO ChunkWriteComplete method=PATCH path={tus+uploadId} requestId="" id={tus+uploadId} bytesWritten=9544673
2025/04/24 15:34:23 PostProcessUpload.url: ~[https://app.domain.com/api/tus_file_uploads/](https://app.domain.com/api/tus_file_uploads/)~{upload_id}/post_process
2025/04/24 15:34:24 PostProcessUpload.success: {upload_id}
2025/04/24 15:34:24 onPreFinishResponse.success: {upload_id}, metadata: map[duration:9.63 enable_content_intelligence:true filename:file.mov filetype:video/quicktime height:1920 name:file.mov size:9544673 type:video/quicktime width:1080]
2025/04/24 15:34:24 INFO UploadFinished method=PATCH path={tus+uploadId} requestId="" id={tus+uploadId} size=9544673
2025/04/24 15:34:24 INFO ResponseOutgoing method=PATCH path={tus+uploadId} requestId="" id={tus+uploadId} status=204 body=""
2025/04/24 15:34:24 Handled request: Method=PATCH, Path=/uploads/{tus+uploadId}, Duration=2.08026479s

Lastly, when I retry it fails. I've tried two strategies.

  1. Using client.retry
  2. client.cancel + client.removeFromCache and client.uploadFileAt again.

any clues as to what can cause this?

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

1 participant