`debug-files upload` fails on a fat Mach-O dSYM with "Object contains 2 architectures (1 expected)"

Chiusa
#1,819 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #1849 di @sentry-junior — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, typescript
Ambito
cli

Direzione di ricerca

Start in matchedDif in packages/cli/src/lib/dif/scan.ts, which uploads the whole fat Mach-O as one DIF under the first object's debug id. The legacy archive.objects() loop in src/utils/dif_upload/mod.rs shows the per-slice approach. Done when a fat dSYM uploads one file per architecture with its own debug id and the "Object contains 2 architectures" error no longer appears; check create_dif_from_id in src/sentry/models/debugfile.py to confirm what the server accepts.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On macOS with sentry 0.45.0 and current main, a watchOS app built with Xcode for arm64 and arm64_32 produces a fat Mach-O dSYM with two slices:

$ dwarfdump --uuid FooWatch.app.dSYM/Contents/Resources/DWARF/FooWatch
UUID: 8C4CD4E7-DB7C-3AC8-BC5B-605AF57BD7E2 (arm64) ...
UUID: 46FC586D-B173-37C8-B1CD-34D3CBEFF085 (arm64_32) ...

$ sentry debug-files upload --wait-for 300 FooWatch.app.dSYM
│ DIF │ 8c4cd4e7-db7c-3ac8-bc5b-605af57bd7e2  FooWatch  [error] │
1 file had failures: 8c4cd4e7-db7c-3ac8-bc5b-605af57bd7e2: error (Object contains 2 architectures (1 expected)).

matchedDif in packages/cli/src/lib/dif/scan.ts uploads the whole fat file as one DIF under the debug id of the first object. The server's assemble step, create_dif_from_id in src/sentry/models/debugfile.py, accepts only one object per file and rejects it. The second slice never reaches Sentry.

The legacy sentry-cli makes one upload per object of a fat archive (the archive.objects() loop in src/utils/dif_upload/mod.rs), so each slice gets its own debug id. Splitting the file first with lipo <file> -thin <arch> -output <out> works: both thin files come back [ok].

Lingua principale
TypeScript
Stelle
957
Fork
174
Merge medio
16h 43m
PR unite (30g)
390

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/toolkit

Tutte le issue di getsentry/toolkit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.