The debugger service URN embeds device_id verbatim while every other id lookup folds case, so two spellings of one UDID open two debugger sessions
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- devtools
Research direction
Start at packages/tool-server/src/tools/debugger/debugger-service-ref.ts:89 and compare its device ID handling with device-alias.ts, device-services.ts, and reaped-sessions.ts. Reproduce the two casing variants through the breadcrumb store, then verify they produce one debugger service identity rather than duplicate sessions and that the existing reaped-sessions.test.ts behavior remains intact.
Written by the indexing model from the issue text.
Description
[Diplomat, Opus 5]: debuggerServiceRef builds the URN from the raw string:
// packages/tool-server/src/tools/debugger/debugger-service-ref.ts:89
return `JsRuntimeDebugger:${params.port}:${deviceId}`;
Every other place that looks a device id up folds case first:
device-alias.ts:86,92,97—logicalKeyedConnectIdsadd/has/delete all.toLowerCase()device-services.ts:213,215—deviceIdOwningUrnlowercases both sides, with a written rationalereaped-sessions.ts:87—key()lowercases, pinned byreaped-sessions.test.ts:40("iOS UDIDs come back uppercase from simctl and lowercase from some tool args, and every id lookup in the stop tools already compares case-insensitively")
So 6DBF83B4-… and 6dbf83b4-… are one device to the alias map, the teardown scoper and the breadcrumb store, and two devices to the registry. selectTarget compares with === (target-selection.ts:54) but falls through to the single-device fallback, so both spellings resolve to the same target and each mints its own JsRuntimeDebugger node — a second CDP socket to Metro, a second bound loopback console-log server, and a second log file, all for one device. On Metro that also evicts the first session, since its inspector proxy allows one debugger per device (#909).
The two conventions meet in the breadcrumb store: one folded slot serves two unfolded sessions, so a record filed by the second spelling's session is what the first spelling's reader gets. Reproducible directly against the store — record 6DBF83B4-… with keptAt=P1, then 6dbf83b4-… with keptAt=P2: the supersede path unlinks P1 and a read under the upper spelling returns a note naming P2.
Folding in the URN builder looks like the consistent fix — it is the one holdout, and a device id is not case-sensitive on any platform argent supports (simctl UDIDs, adb serials, chromium-cdp-<port>).
Not caused by #705: debugger-service-ref.ts:89 is unchanged by it. Found while reviewing it — that PR's breadcrumb store is where the asymmetry becomes observable, but the duplicate sessions predate it.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 118
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 93
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from software-mansion/argent
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
software-mansion/argent#1143 ·
-
b:minor bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
software-mansion/argent#1135 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
software-mansion/argent#1078 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
software-mansion/argent#1073 ·
-
b:nitpick bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
software-mansion/argent#1067 ·
All issues in software-mansion/argent
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100