couldNotUploadFile Error with status code 409: Upload-Offset conflict
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with the TUSKit.TUSAPI upload method and the Supabase resumable-upload endpoint shown in the report. Reproduce the large-file upload while repeatedly backgrounding and foregrounding the phone, inspect the raw 409 response and Upload-Offset values, and determine whether the conflict originates in TUSKit usage or Supabase's implementation.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I'm using TUSKit with Supabase storage (an S3 wrapper), and for the most part it's working fine except the case where I try to upload a large file (~1gb) while repeatedly backgrounding and foregrounding the app on my phone, either by swiping to the Home Screen or locking my phone. It's inconsistent, but after a few times doing that I get a couldNotUploadFile error with an underlying 409 status code error, and digging into the upload method in TUSAPI and printing the raw response data, it says "Upload-Offset conflict".
How can I debug this? Is it an issue with my usage of TUS, the TUSKit iOS SDK itself, or is it possible this is a problem with Supabase's TUS protocol implementation?
Here's the full error:
uploadFailed: couldNotUploadFile(underlyingError: TUSKit.TUSAPIError.failedRequest(<NSHTTPURLResponse: 0x28347f300> { URL: <url> } { Status Code: 409, Headers {
"Access-Control-Allow-Origin" = (
"*"
);
"Alt-Svc" = (
"h3=\":443\"; ma=86400"
);
"Content-Length" = (
23
);
Date = (
"Wed, 31 May 2023 16:14:12 GMT"
);
Server = (
cloudflare
);
"Strict-Transport-Security" = (
"max-age=2592000; includeSubDomains"
);
Vary = (
"Accept-Encoding"
);
"access-control-expose-headers" = (
"Authorization, Content-Type, Location, Tus-Extension, Tus-Max-Size, Tus-Resumable, Tus-Version, Upload-Concat, Upload-Defer-Length, Upload-Length, Upload-Metadata, Upload-Offset, X-HTTP-Method-Override, X-Requested-With, X-Forwarded-Host, X-Forwarded-Proto, Forwarded, Upload-Expires"
);
"cf-cache-status" = (
DYNAMIC
);
"cf-ray" = (
"7d0082268c553344-EWR"
);
"sb-gateway-mode" = (
direct
);
"sb-gateway-version" = (
1
);
"tus-resumable" = (
"1.0.0"
);
} }))
Here's how I'm using TUS:
let tusEndpoint = Environment.SUPABASE_URL.appendingPathComponent("storage/v1/upload/resumable")
self.tusClient = try TUSClient(
server: tusEndpoint,
sessionIdentifier: "media-upload-queue",
chunkSize: 6 * 1024 * 1024
)
let context: [String : String] = {
var context: [String : String] = [:]
if let mimeType = self.mimeType(forFile: fileURL) {
context["contentType"] = mimeType
}
context["bucketName"] = <bucketName
context["objectName"] = <fileName>
return context
}()
let headers: [String : String] = {
var headers: [String : String] = [:]
headers["authorization"] = "Bearer <token>"
headers["x-upsert"] = "true"
return headers
}()
try self.tusClient.uploadFileAt(
filePath: fileURL,
customHeaders: headers,
context: context
)
- Lenguaje dominante
- Swift
- Estrellas
- 245
- Forks
- 129
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tus/TUSKit
-
Crash on iOS when re-using background URLSession identifierPosiblemente ocupada @samsonjs la tomó hace 36 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
-
couldNotCreateFileOnServer Error with successful tusd server logs, Unable to retry afterwardAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
visionOS support !Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Todos los issues de tus/TUSKit
Issues similares
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
manaflow-ai/cmux#59692 ·
Los mantenedores suelen responder en 1 día
-
-32042 without elicitations drops JSON-RPC error dataPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
modelcontextprotocol/swift-sdk#381 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
jbcoe/cc-protocol#520 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
App 仍在下载和解析用不上的会话列表Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
vibe-cafe/vibe-usage-app#125 ·
Los mantenedores suelen responder en 1 día