# Problem code `'target-unmatched'`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts`, `tables/problems.json` and `services/onsite-scripter/scripts/contract-docs-what-to-do.json` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

A member of [`ProblemCode`](../api/ProblemCode.md) · stable · since 2.0.0

A query matched nothing, or a placed model's `globalMaterialList` `meshName` matches none of its meshes but is close to one (a typo; once, at the commit that places the model); `didYouMean` names close authored names.

## What to do

Fix the query, not the write: `name` and `slot` are case-sensitive globs over the WHOLE authored name (`'Drawer*'` matches 'Drawer_Left', `'Drawer'` matches only 'Drawer'), `didYouMean` lists close authored names, and [`session.find({ node: nodeId }).list()`](../api/Parts.list.md) shows the names a loaded model has. A rule written while an earlier scene write is pending waits for it (`pending: true`), so call [`setSceneModel`](../api/Writer.setSceneModel.md) before the rule that needs its parts. One whose message names a `globalMaterialList` entry was recorded when that model was placed: fix the stored entry's `meshName` (`didYouMean` names the model's close mesh names), since a [`select`](../api/Writer.select.md) of its group commits and reports `matched` 1 while it dresses nothing there.

```ts
await session.find({ node: sofaId, name: 'Drawer*' }).set({ visible: false });
console.log(session.find({ node: sofaId }).list().map((p) => p.name));
```

## Where the declaration names it

- [`AnchorSpec.at`](../api/AnchorSpec.at.md): While `on` matches no part (a node not loaded, failed or removed, a removed item), the anchor reports `visible: false` with `x`, `y` and `depth` 0, as 1.x does, and records no Problem, 'target-unmatched' included.
- [`Animations.play`](../api/Animations.play.md): A clip the target doesn't hold, a target whose GLB isn't loaded yet, or an unknown `nodeId` is not invalid input: it resolves `matched: 0`, changes nothing and records 'target-unmatched' with `didYouMean` from `list(target)` (1.x returned false and warned with the clip names).
- [`Camera.fit`](../api/Camera.fit.md): Through `session` its Report's `matched` counts the query's matches when the fit starts; a query that matches nothing (a typo, or a model whose scene write is still pending) leaves the camera where it is and records 'target-unmatched' with `didYouMean`, so await the scene write that adds what it frames first.
- [`IModelNode.globalMaterialList`](../api/IModelNode.globalMaterialList.md): An entry whose `meshName` matches none of this model's meshes but is close to one (a typo) records 'target-unmatched' once, at the commit that places the model, with `didYouMean`; one close to none (another element's entry, copied across a range) stays silent, as 1.x.
- [`Labs.geometry.write`](../api/Labs.geometry.write.md): Errors: rejects HoloInputError on invalid input; no match records 'target-unmatched'.
- [`PartActions.find`](../api/PartActions.find.md): Sync; the same rules as [`Writer.find`](../api/Writer.find.md), except for a write: a Query has no "inside this part" form, so `set()` through the result writes one rule per part it matches at the call, each bound to that part's address as a write through that [`Part`](../api/Part.md) (spec section 6.10, R3; no match: 'target-unmatched' at once).
- [`PartActions.set`](../api/PartActions.set.md): No match: `matched: 0` and 'target-unmatched', deferred while a scene write called before it is pending ([`Report.matched`](../api/ReportFields.matched.md); spec section 6.10).
- [`Problem.didYouMean`](../api/Problem.didYouMean.md): authored names for 'target-unmatched'; for 'invalid-input', the thrown HoloInputError's `didYouMean` (spec section 8.1).
- [`Query`](../api/Query.md): A query that matches nothing records 'target-unmatched' ([`Report.matched`](../api/ReportFields.matched.md)).
- [`Reason`](../api/Reason.md): - 'disposed': a new write through a disposed collection or naming one as its `owner`, or through a part that reads `exists: false` (never a [`node()`](../api/Writer.node.md) handle); nothing ran, `matched` is 0 without 'target-unmatched', and `problems` holds 'handle-disposed' (spec section 3.4).
- [`ReportFields.matched`](../api/ReportFields.matched.md): 0 records 'target-unmatched', except while a scene write called before it is pending (`pending: true`): then once no such write is pending (each committed, or was aborted, refused or rolled back, or was superseded by a write that is itself no longer pending; an aborted one is replaced the same way by the first scene write called after the abort in that task) and the rule still matches nothing…
- [`SkinBinding`](../api/SkinBinding.md): A name the new skeleton lacks drops the binding, records 'target-unmatched' (`node`, `skeletonOf`) and gives the item its placement back.
- [`Writer.apply`](../api/Writer.apply.md): Asset failures are `problems` ('asset-failed'); a rule that matches nothing records 'target-unmatched'.
- [`Writer.node`](../api/Writer.node.md): An id that names a stored node placing nothing (a GroupNode, a MaterialNode) or a node's `_id` or name matches no part: its 'target-unmatched' says which, with the ModelNode ids (or that node's `nodeId`) in `didYouMean` (delivery-run cycle 18, R2-GAP-7).
- [`Writer.select`](../api/Writer.select.md): The cause is the scene model's: a `globalMaterialList` `meshName` close to one of its model's mesh names (a typo) was recorded once, when that model was placed, as 'target-unmatched' in [`info().problems`](../api/InfoReport.problems.md) with `didYouMean`; a group no placed model names records nothing, as 1.x.

The set is open: handle a code you don't know (`'other'`).

## Recorded by

- the table row `failure-matrix/errorCases/query-matches-nothing` (`tables/failure-matrix.json`)
