Cap icon indicating copy to clipboard operation
Cap copied to clipboard

Self-hosted: error uploading video

Open NysanderBTF opened this issue 2 months ago • 2 comments

Description

Hello, I am using self-hosted cap. I have set following env variables DATABASE_URL WEB_URL NEXTAUTH_URL DATABASE_ENCRYPTION_KEY: NEXTAUTH_SECRET: CAP_AWS_ACCESS_KEY: CAP_AWS_SECRET_KEY: CAP_AWS_BUCKET: capso CAP_AWS_REGION: us-east-1 S3_PUBLIC_ENDPOINT: S3_INTERNAL_ENDPOINT: RESEND_API_KEY: RESEND_FROM_DOMAIN: GOOGLE_CLIENT_ID: GOOGLE_CLIENT_SECRET:

When I am trying to upload video i got upload failed error, but in dashboard video was created here is error logs from pod

timestamp=2025-10-31T12:57:50.715Z level=INFO fiber=#527 message="Using CAP_AWS_ACCESS_KEY and CAP_AWS_SECRET_KEY"
Creating multipart upload in bucket: capso, content-type: video/mp4, key: nsknmk2v0w1hrhx/6gb4m8reaqsp09p/result.mp4
timestamp=2025-10-31T12:57:50.896Z level=ERROR fiber=#626 message="{
  \"cause\": {
    \"$metadata\": {
      \"attempts\": 1,
      \"totalRetryDelay\": 0
    }
  },
  \"_tag\": \"S3Error\"
}"
S3 operation failed: {
  _id: 'Exit',
  _tag: 'Failure',
  cause: {
    _id: 'Cause',
    _tag: 'Fail',
    failure: {
      cause: Error: char 'C' is not expected.:1:1
        Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.
          at <unknown> (Error: char 'C' is not expected.:1:1) {
        '$metadata': { attempts: 1, totalRetryDelay: 0 }
      },
      _tag: 'S3Error'
    }
  }
}
Error initiating multipart upload Error: S3 operation failed: Unknown error
    at <unknown> (.next/server/chunks/ff5f1_next_dist_esm_build_templates_app-route_a0c5e775.js:9:96239)
    at async i (.next/server/chunks/_9a5d23f1._.js:1:337)
    at async n (.next/server/chunks/_9a5d23f1._.js:1:23415)
    at async i (.next/server/chunks/_9a5d23f1._.js:1:337)
    at async es (.next/server/chunks/_9a5d23f1._.js:1:19753)
    at async i (.next/server/chunks/_9a5d23f1._.js:1:337)

When i am trying to delete video i also got error and following log:

timestamp=2025-10-31T13:16:31.740Z level=INFO fiber=#3272 message="Deleted video q6mfnd2qybjdqak"
timestamp=2025-10-31T13:16:31.749Z level=ERROR fiber=#3272 message="{
  \"cause\": {
    \"$metadata\": {
      \"attempts\": 1,
      \"totalRetryDelay\": 0
    }
  },
  \"_tag\": \"S3Error\"
}"

Additional Context

  • Cap version: using latest image
  • Operating system, version: linux, uploading from web

NysanderBTF avatar Oct 31 '25 13:10 NysanderBTF

CAP-534

linear[bot] avatar Oct 31 '25 13:10 linear[bot]

Possible causes:

  1. Incorrect S3 endpoint/region configuration
  2. Invalid AWS credentials or insufficient IAM permissions
  3. Bucket doesn't exist or region mismatch
  4. Network proxy/firewall intercepting requests

Please Verify:

  • Verified CAP_AWS_ACCESS_KEY and CAP_AWS_SECRET_KEY are correct
  • Confirmed bucket "capso" exists in the specified region
  • Checked IAM permissions include s3:CreateMultipartUpload
  • Verified S3 client region matches bucket region

FarhanSE avatar Nov 13 '25 10:11 FarhanSE