S3 HEAD bucket failure: 404 Not Found (CC Switch)
Quick fix
Upgrade to 4.0 or the latest version and retry; older versions append the bucket again when the endpoint already contains it, causing an incorrect request path.
Symptom
Section titled “Symptom”S3 HEAD bucket 失败: 404 Not Found
(https://mybucket.oss-cn-zhongwei.aliyuncs.com/mybucket/)S3 HEAD bucket failed: 404 Not Found (https://mybucket.oss-cn-zhongwei.aliyuncs.com/mybucket/)
In CC Switch v3.18.0, `is_aws_endpoint` in `src-tauri/src/services/s3.rs` recognizes only `amazonaws.com`. The Alibaba Cloud OSS `aliyuncs.com` endpoint therefore enters the path-style branch. When the endpoint host already starts with `{bucket}.`, `build_bucket_url` and `build_object_url` still append the bucket to the path, creating a duplicate `/mybucket/`.
This causes the HEAD request to return 404. Although PUT may succeed, it writes the object under an incorrect prefix containing an extra bucket name, so GET cannot retrieve it using the correct key. The maintainer said that 4.0 substantially refactored the related functionality and recommended upgrading and retrying, but these issues do not confirm whether the upgrade resolved the problem.
Update CC Switch to 4.0 or the latest version, then retest the connection with the same S3 configuration.
Inspect the generated request URL and confirm that when the endpoint host already contains the bucket name, `/mybucket/` does not appear again in the path.
Repeat the upload and download, and confirm that the object was not written under an extra prefix matching the bucket name.
If the latest version still fails, provide the CC Switch version, operating system, complete reproduction steps, and relevant logs or screenshots, then reopen the issue.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
(No FAQ yet)
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.