sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Unable to upload xcarchive via sentry-cli build upload: Unsupported provider (http status: 400)

Open alinradut opened this issue 2 months ago • 11 comments

CLI Version

2.58.0

Operating System and Architecture

  • [x] macOS (arm64)
  • [ ] macOS (x86_64)
  • [ ] Linux (i686)
  • [ ] Linux (x86_64)
  • [ ] Linux (armv7)
  • [ ] Linux (aarch64)
  • [ ] Windows (i686)
  • [ ] Windows (x86_64)

Operating System Version

macOS 26.0.1

Link to reproduction repository

No response

CLI Command

sentry-cli build upload '/path/to/project.xcarchive' --org <org> --project <project> --auth-token <auth token>

Exact Reproduction Steps

  1. Install sentry-cli via Homebrew (brew install getsentry/tools/sentry-cli)
  2. Set up a Sentry account with an org and a project
  3. Set up a git repository on a private server
  4. Create an iOS project in the repo
  5. Build Xcode project for release
  6. Run above command and supply path to the xcarchive

Expected Results

Build is successfully uploaded to Sentry

Actual Results

Build process fails with

Error: API request failed: sentry reported an error: Unsupported provider (http status: 400)
error: Failed to upload any files

Logs

  INFO    2025-11-10 16:35:30.662867 +02:00 Loaded config from /Users/u/.sentryclirc
  DEBUG   2025-11-10 16:35:30.662994 +02:00 sentry-cli version: 2.58.0, platform: "darwin", architecture: "arm64"
  INFO    2025-11-10 16:35:30.663259 +02:00 sentry-cli was invoked with the following command line: "sentry-cli" "build" "upload" "../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive" "--org" "my-organization" "--project" "my-project-ios" "--auth-token" "[REDACTED]" "--log-level" "debug"
  DEBUG   2025-11-10 16:35:30.667352 +02:00 Found current branch reference: feature-4944-xxx
  DEBUG   2025-11-10 16:35:30.667437 +02:00 Found base reference: develop
  DEBUG   2025-11-10 16:35:30.667727 +02:00 Found remote 'origin': https://x:[email protected]/my-project/frontend/ios/my-project.git
  DEBUG   2025-11-10 16:35:30.667739 +02:00 Found base repository name: my-project/frontend/ios/my-project
  DEBUG   2025-11-10 16:35:30.670272 +02:00 Found merge-base commit as base reference: c0068649d5acc3e5bd988d843d2b04bc3b31475f
  DEBUG   2025-11-10 16:35:30.670486 +02:00 Starting upload for 1 paths
  DEBUG   2025-11-10 16:35:30.670501 +02:00 Processing artifact at path: ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive
  DEBUG   2025-11-10 16:35:30.670549 +02:00 Loaded file with 0 bytes
  DEBUG   2025-11-10 16:35:30.670557 +02:00 Validating build format for: ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive
  DEBUG   2025-11-10 16:35:30.697684 +02:00 Detected XCArchive directory
  DEBUG   2025-11-10 16:35:30.697696 +02:00 Normalizing directory: ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive
  DEBUG   2025-11-10 16:35:30.734413 +02:00 Creating normalized zip for directory: ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive
  DEBUG   2025-11-10 16:35:47.547291 +02:00 Adding parsed assets from: /var/folders/v1/h470566j64jdx85dyl8780000000gn/T/bffdd974-9784-42e3-b866-a435cfe16ba9
  DEBUG   2025-11-10 16:35:47.604871 +02:00 Successfully created normalized zip for directory with 1767 files
  DEBUG   2025-11-10 16:35:47.605005 +02:00 Successfully normalized to: /var/folders/v1/h470566j64jdx85dyl8780000000gn/T/518fa28a-77e2-4129-829d-02dc404068f6
  INFO    2025-11-10 16:35:47.605024 +02:00 Uploading file: ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive
  DEBUG   2025-11-10 16:35:47.605061 +02:00 Uploading file to organization: my-organization, project: my-project-ios, build_configuration: unknown, vcs_info: VcsInfo { head_sha: Some("48b7ee19c08ca10db857a83c4c626f5ff4d5341f"), base_sha: Some("c0068649d5acc3e5bd988d843d2b04bc3b31475f"), vcs_provider: Some("example"), head_repo_name: Some("my-project/frontend/ios/my-project"), base_repo_name: Some("my-project/frontend/ios/my-project"), head_ref: Some("feature-4944-xxx"), base_ref: Some("develop"), pr_number: None }
  DEBUG   2025-11-10 16:35:47.605103 +02:00 using token authentication
  DEBUG   2025-11-10 16:35:47.605113 +02:00 retry number 0, max retries: 5
  DEBUG   2025-11-10 16:35:47.679146 +02:00 > GET /api/0/organizations/my-organization/chunk-upload/ HTTP/1.1
  DEBUG   2025-11-10 16:35:47.679173 +02:00 > Host: sentry.io
  DEBUG   2025-11-10 16:35:47.679180 +02:00 > Accept: */*
  DEBUG   2025-11-10 16:35:47.679187 +02:00 > Connection: TE
  DEBUG   2025-11-10 16:35:47.679193 +02:00 > TE: gzip
  DEBUG   2025-11-10 16:35:47.679199 +02:00 > User-Agent: sentry-cli/2.58.0
  DEBUG   2025-11-10 16:35:47.679305 +02:00 > Authorization: Bearer 786edeb5***
  DEBUG   2025-11-10 16:35:48.027986 +02:00 < HTTP/1.1 200 OK
  DEBUG   2025-11-10 16:35:48.028214 +02:00 < server: nginx
  DEBUG   2025-11-10 16:35:48.028252 +02:00 < date: Mon, 10 Nov 2025 14:35:47 GMT
  DEBUG   2025-11-10 16:35:48.028276 +02:00 < content-type: application/json
  DEBUG   2025-11-10 16:35:48.028297 +02:00 < vary: Accept-Encoding,Accept-Language, Cookie
  DEBUG   2025-11-10 16:35:48.028319 +02:00 < allow: GET, POST, HEAD, OPTIONS
  DEBUG   2025-11-10 16:35:48.028399 +02:00 < access-control-allow-methods: GET, POST, HEAD, OPTIONS
  DEBUG   2025-11-10 16:35:48.028445 +02:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2025-11-10 16:35:48.028469 +02:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
  DEBUG   2025-11-10 16:35:48.028491 +02:00 < access-control-allow-origin: *
  DEBUG   2025-11-10 16:35:48.028514 +02:00 < x-sentry-rate-limit-remaining: 99
  DEBUG   2025-11-10 16:35:48.028532 +02:00 < x-sentry-rate-limit-limit: 100
  DEBUG   2025-11-10 16:35:48.028549 +02:00 < x-sentry-rate-limit-reset: 1762785348
  DEBUG   2025-11-10 16:35:48.028565 +02:00 < x-sentry-rate-limit-concurrentremaining: 99
  DEBUG   2025-11-10 16:35:48.028582 +02:00 < x-sentry-rate-limit-concurrentlimit: 100
  DEBUG   2025-11-10 16:35:48.028599 +02:00 < content-language: en
  DEBUG   2025-11-10 16:35:48.028616 +02:00 < reporting-endpoints: default=https://sentry.my.sentry.io/api/0/reporting-api-experiment/
  DEBUG   2025-11-10 16:35:48.028635 +02:00 < x-frame-options: deny
  DEBUG   2025-11-10 16:35:48.028651 +02:00 < x-content-type-options: nosniff
  DEBUG   2025-11-10 16:35:48.028668 +02:00 < x-xss-protection: 1; mode=block
  DEBUG   2025-11-10 16:35:48.028688 +02:00 < content-security-policy: frame-ancestors 'self' *.sentry.io; style-src * 'unsafe-inline'; worker-src blob:; frame-src app.pendo.io demo.arcade.software js.stripe.com sentry.io 'self'; script-src 'self' 'unsafe-inline' 'report-sample' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; object-src 'none'; base-uri 'none'; font-src * data:; img-src * blob: data:; default-src 'none'; media-src *; connect-src 'self' *.algolia.net *.algolianet.com *.algolia.io sentry.io *.sentry.io s1.sentry-cdn.com o1.ingest.sentry.io api2.amplitude.com app.pendo.io data.pendo.io reload.getsentry.net t687h3m0nh65.statuspage.io sentry.zendesk.com ekr.zdassets.com maps.googleapis.com; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=...&sentry_release=yyy
  DEBUG   2025-11-10 16:35:48.028710 +02:00 < x-envoy-upstream-service-time: 204
  DEBUG   2025-11-10 16:35:48.028727 +02:00 < x-sentry-proxy-url: http://10.2.0.67:8999/api/0/organizations/my-organization/chunk-upload/
  DEBUG   2025-11-10 16:35:48.028744 +02:00 < x-envoy-attempt-count: 1
  DEBUG   2025-11-10 16:35:48.028761 +02:00 < x-served-by: frontend-default-d668679c-969kx
  DEBUG   2025-11-10 16:35:48.028777 +02:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2025-11-10 16:35:48.028795 +02:00 < via: 1.1 google
  DEBUG   2025-11-10 16:35:48.028811 +02:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  DEBUG   2025-11-10 16:35:48.028833 +02:00 < Transfer-Encoding: chunked
  DEBUG   2025-11-10 16:35:48.028932 +02:00 body: {"url":"https://us.sentry.io/api/0/organizations/my-organization/chunk-upload/","chunkSize":8388608,"chunksPerRequest":64,"maxFileSize":4294967296,"maxRequestSize":33554432,"concurrency":8,"hashAlgorithm":"sha1","compression":["gzip"],"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps","il2cpp","portablepdbs","artifact_bundles","artifact_bundles_v2","proguard","preprod_artifacts","dartsymbolmap"]}
> Preparing for upload completed in 0.816s
  DEBUG   2025-11-10 16:35:48.845852 +02:00 using token authentication
  DEBUG   2025-11-10 16:35:48.845900 +02:00 json body: {"checksum":"356332b9507c2f5b87e8592ed18bc92512e32459","chunks":["32700189b98dfe507eaab9bd9566d5c064d05985","e6ec0e40acaf84d19df0d7cca31e16da65574641","5ee7dd496c9431a6447b6634527372b81b4d69e3","f72402b0e2eef3d995765090f86dffe9f1e49881","529aaff362dc99cdb108ebee42e9000c0196534d","633d959708ea7c11f45e63a05b8c0b7e5500986d","2f462128cbafe74c88450fa4915053a9c9bea625","02ab704097a32fb2949e4654d19284a42b6464d7","7b78bf163151281286dd895d9f62681afe33a76a","c3acaf6f928e7a3c918cd2dc860acb6d8eb0f282","488d2c1c2d5ad753fd276abd6d2b3cc597756ae9","3a973c6d0e4bd14db7a9e5c753a4da64bde1fa8f","871c3063e18f8e44c097224790dce7e7e85fbd66","0a3af363c07d04128703afc7c1fa2fa123efffe6","9fe55ad1c86aa3bcd6e1e29640f450fe1adc88ab","6e9387ccac3f267d83c94ab7ab282f0518bdaf0c","2fa2aef8814673b9145bd1edfd132b592d1df6c1","f1d3de871c6a03f0b37b6850720060c5634c1b73","a3a0f22d6fd096edc332e256a9e73fdda7f58228","fd16f6f0798164f4ee271d15e20b4fb7a6122cfa","5e9c18deddfef92f226406d9fdba2171773b5f83","ea3382feb95a03f490782aa366d504e141a36757","8fbf8354201b662167b150e027853e7c4bdad959","7837e2f0d32631fde3ce137a36b57d87ad169e5a","21305cd5d36bd7851b2affcb0578c228404e5eba"],"head_sha":"48b7ee19c08ca10db857a83c4c626f5ff4d5341f","base_sha":"c0068649d5acc3e5bd988d843d2b04bc3b31475f","provider":"git","head_repo_name":"my-project/frontend/ios/my-project","base_repo_name":"my-project/frontend/ios/my-project","head_ref":"feature-4944-xxx","base_ref":"develop"}
  DEBUG   2025-11-10 16:35:48.845919 +02:00 retry number 0, max retries: 5
  DEBUG   2025-11-10 16:35:48.846068 +02:00 > POST /api/0/projects/my-organization/my-project-ios/files/preprodartifacts/assemble/ HTTP/1.1
  DEBUG   2025-11-10 16:35:48.846075 +02:00 > Host: sentry.io
  DEBUG   2025-11-10 16:35:48.846079 +02:00 > Accept: */*
  DEBUG   2025-11-10 16:35:48.846083 +02:00 > Connection: TE
  DEBUG   2025-11-10 16:35:48.846087 +02:00 > TE: gzip
  DEBUG   2025-11-10 16:35:48.846091 +02:00 > User-Agent: sentry-cli/2.58.0
  DEBUG   2025-11-10 16:35:48.846105 +02:00 > Authorization: Bearer 786edeb5***
  DEBUG   2025-11-10 16:35:48.846110 +02:00 > Content-Type: application/json
  DEBUG   2025-11-10 16:35:48.846114 +02:00 > Content-Length: 1445
  DEBUG   2025-11-10 16:35:49.181288 +02:00 < HTTP/1.1 400 Bad Request
  DEBUG   2025-11-10 16:35:49.181566 +02:00 < server: nginx
  DEBUG   2025-11-10 16:35:49.181613 +02:00 < date: Mon, 10 Nov 2025 14:35:49 GMT
  DEBUG   2025-11-10 16:35:49.181654 +02:00 < content-type: application/json
  DEBUG   2025-11-10 16:35:49.181685 +02:00 < allow: POST, OPTIONS
  DEBUG   2025-11-10 16:35:49.181718 +02:00 < access-control-allow-methods: POST, OPTIONS
  DEBUG   2025-11-10 16:35:49.183218 +02:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2025-11-10 16:35:49.183287 +02:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
  DEBUG   2025-11-10 16:35:49.183310 +02:00 < access-control-allow-origin: *
  DEBUG   2025-11-10 16:35:49.183332 +02:00 < x-sentry-rate-limit-remaining: 99
  DEBUG   2025-11-10 16:35:49.183349 +02:00 < x-sentry-rate-limit-limit: 100
  DEBUG   2025-11-10 16:35:49.183366 +02:00 < x-sentry-rate-limit-reset: 1762785360
  DEBUG   2025-11-10 16:35:49.183383 +02:00 < x-sentry-rate-limit-concurrentremaining: 24
  DEBUG   2025-11-10 16:35:49.183400 +02:00 < x-sentry-rate-limit-concurrentlimit: 25
  DEBUG   2025-11-10 16:35:49.183417 +02:00 < vary: Accept-Language, Cookie
  DEBUG   2025-11-10 16:35:49.183436 +02:00 < content-language: en
  DEBUG   2025-11-10 16:35:49.183454 +02:00 < reporting-endpoints: default=https://sentry.my.sentry.io/api/0/reporting-api-experiment/
  DEBUG   2025-11-10 16:35:49.183478 +02:00 < x-frame-options: deny
  DEBUG   2025-11-10 16:35:49.183495 +02:00 < x-content-type-options: nosniff
  DEBUG   2025-11-10 16:35:49.183513 +02:00 < x-xss-protection: 1; mode=block
  DEBUG   2025-11-10 16:35:49.183535 +02:00 < content-security-policy: script-src 'self' 'unsafe-inline' 'report-sample' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; media-src *; style-src * 'unsafe-inline'; frame-ancestors 'self' *.sentry.io; font-src * data:; base-uri 'none'; worker-src blob:; img-src * blob: data:; object-src 'none'; connect-src 'self' *.algolia.net *.algolianet.com *.algolia.io sentry.io *.sentry.io s1.sentry-cdn.com o1.ingest.sentry.io api2.amplitude.com app.pendo.io data.pendo.io reload.getsentry.net t687h3m0nh65.statuspage.io sentry.zendesk.com ekr.zdassets.com maps.googleapis.com; frame-src app.pendo.io demo.arcade.software js.stripe.com sentry.io 'self'; default-src 'none'; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=...&sentry_release=yyy
  DEBUG   2025-11-10 16:35:49.183711 +02:00 < x-envoy-upstream-service-time: 192
  DEBUG   2025-11-10 16:35:49.183730 +02:00 < x-sentry-proxy-url: http://10.2.0.67:8999/api/0/projects/my-organization/my-project-ios/files/preprodartifacts/assemble/
  DEBUG   2025-11-10 16:35:49.183802 +02:00 < x-envoy-attempt-count: 1
  DEBUG   2025-11-10 16:35:49.183819 +02:00 < x-served-by: frontend-default-d668679c-pvnw2
  DEBUG   2025-11-10 16:35:49.184254 +02:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2025-11-10 16:35:49.184281 +02:00 < via: 1.1 google
  DEBUG   2025-11-10 16:35:49.184300 +02:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  DEBUG   2025-11-10 16:35:49.184349 +02:00 < Transfer-Encoding: chunked
  DEBUG   2025-11-10 16:35:49.184523 +02:00 body: {"error":"Unsupported provider"}
  DEBUG   2025-11-10 16:35:49.184616 +02:00 Failed to upload file at path ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive: API request failed
  WARN    2025-11-10 16:35:49.214562 +02:00 Failed to upload 1 file:
  WARN    2025-11-10 16:35:49.214635 +02:00   - ../build/my-project/protected/MyProject 2025-11-08 08.45.37.xcarchive
  WARN    2025-11-10 16:35:49.214652 +02:00     Error: API request failed: sentry reported an error: Unsupported provider (http status: 400)
error: Failed to upload any files
  DEBUG   2025-11-10 16:35:49.214775 +02:00 skipping update nagger because session is not attended

alinradut avatar Nov 10 '25 14:11 alinradut

CLI-222

linear[bot] avatar Nov 10 '25 14:11 linear[bot]

from nelson.osacky:

Thanks for reporting. The provider is auto-inferred from the remote repo name. example.com is not a real remote and thus fails.

We'll work to improve this error message.

In the meantime, I suggest the following workarounds:

  1. Delete the remote git remote remove origin
  2. Use a real remote (such as github.com) git remote set-url origin git://new.url.here
  3. Override the provider via the `--vcs-provider` command line option when using the sentry-cli

linear[bot] avatar Nov 11 '25 09:11 linear[bot]

Thanks for your response.

Obviously example.com is not the real git server that I use, it has been updated to hide sensitive information. I am using a private git server, which is not github.

The remote is real and I can interact with it.

I can override via the --vcs-provider with whatever I want, the outcome is the same.

alinradut avatar Nov 11 '25 11:11 alinradut

@alinradut The supported VCS providers are GitHub, GitLab, GitHub Enterprise, Bitbucket, and Bitbucket Server, which can be specified by setting --vcs-info to github, gitlab, github_enterprise, bitbucket, or bitbucket_server, respectively. If you are using a different provider, then your setup is currently not supported.

We can probably do a better job of validating these values locally and making it clearer what the allowed --vcs-info values are.

szokeasaurusrex avatar Nov 12 '25 14:11 szokeasaurusrex

Hello! Thanks for the response! Many companies self host everything, including their SCM system, for a variety of reasons.

Is it possible to completely disable the --vcs-info related metadata? It would be a shame to not be able to use this feature because of it.

alinradut avatar Nov 12 '25 14:11 alinradut

Yes, you can override it by setting --vcs-provider "" on the command line.

runningcode avatar Nov 12 '25 14:11 runningcode

Ok, so --vcs-provider "" didn't work, however it accepted --vcs-provider gitlab without any complaint. This will work for now for me.

Thank you for your assistance!

alinradut avatar Nov 12 '25 14:11 alinradut

Sorry that didn't work. Can you paste me the error message you got when you tried --vcs-provider "" --log-level debug?

runningcode avatar Nov 12 '25 14:11 runningcode

I believe this would be the relevant parts:

  DEBUG   2025-11-12 16:38:44.514222 +02:00 Uploading file to organization: [redacted], project: [redacted]], build_configuration: Release, vcs_info: VcsInfo { head_sha: Some("..."), base_sha: Some("..."), vcs_provider: Some(""), head_repo_name: Some("[redacted]"), base_repo_name: Some("[redacted]"), head_ref: Some("[redacted]"), base_ref: Some("develop"), pr_number: None }
...
  DEBUG   2025-11-12 16:38:45.899045 +02:00 json body: {... "provider":"", ...}
...
  DEBUG   2025-11-12 16:38:46.221772 +02:00 body: {"error":"All required VCS parameters must be provided when using VCS features. Missing parameters: provider"}
  DEBUG   2025-11-12 16:38:46.221835 +02:00 Failed to upload file at path [redacted].xcarchive: API request failed
  WARN    2025-11-12 16:38:46.240770 +02:00 Failed to upload 1 file:
  WARN    2025-11-12 16:38:46.240858 +02:00   - [redacted].xcarchive
  WARN    2025-11-12 16:38:46.240873 +02:00     Error: API request failed: sentry reported an error: All required VCS parameters must be provided when using VCS features. Missing parameters: provider (http status: 400)
error: Failed to upload any files

FYI I have updated to sentry-cli 2.58.1 via Homebrew and the output is after the upgrade.

alinradut avatar Nov 12 '25 14:11 alinradut

@alinradut ~~Are you on Sentry self-hosted or SaaS? Also, Sentry CLI 2.58.2 is going to be released imminently (within the next few minutes, hopefully), and that release will include a fix that should ensure setting --vcs-provider "" works as expected.~~

Edit: @runningcode corrected me offline, the fix in Sentry CLI 2.58.2 will not fix this error 🥲

szokeasaurusrex avatar Nov 12 '25 14:11 szokeasaurusrex

BTW since you asked, I am using Sentry via SaaS.

alinradut avatar Nov 13 '25 14:11 alinradut

With sentry-cli 2.58.4, local builds will not gather git metadata like vcs-provider on local builds. There is also a new option --no-git-metadata which you can use to disable the automatic metadata gathering.

runningcode avatar Dec 22 '25 08:12 runningcode