couldNotUploadFile Error with status code 409: Upload-Offset conflict
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
)
- 主要言語
- Swift
- スター
- 245
- フォーク
- 129
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tus/TUSKit のほかの issue
-
Crash on iOS when re-using background URLSession identifier対応中かも @samsonjs が 36 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
visionOS support !オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
manaflow-ai/cmux#59692 ·
メンテナーはふだん 1 日以内に返信
-
-32042 without elicitations drops JSON-RPC error data対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
modelcontextprotocol/swift-sdk#381 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
jbcoe/cc-protocol#520 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
App 仍在下载和解析用不上的会话列表オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vibe-cafe/vibe-usage-app#125 ·
メンテナーはふだん 1 日以内に返信