Repository: TypeScript
Issue: Crash in find-all-references on palantir/blueprint
Labels: Bug,Domain: Symbol Navigation,Rescheduled,Crawler-Detected

## [palantir/blueprint](https://github.com/palantir/blueprint)

<details>
<summary>:warning: Note that typescript-4.8.4 also had errors :warning:</summary>

```
Req #12614 - references
    at formatMessage (/typescript-4.8.4/lib/tsserver.js:177445:29)
    at IOSession.Session.writeMessage (/typescript-4.8.4/lib/tsserver.js:178521:31)
    at IOSession.Session.send (/typescript-4.8.4/lib/tsserver.js:178518:22)
    at IOSession.Session.doOutput (/typescript-4.8.4/lib/tsserver.js:178571:22)
    at IOSession.Session.onMessage (/typescript-4.8.4/lib/tsserver.js:180217:30)
    at Interface.<anonymous> (/typescript-4.8.4/lib/tsserver.js:184338:31)
```

</details>



```
Req #19075 - references
    at getContextualTypeForArgumentAtIndex (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74138:53)
    at getContextualTypeForArgument (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74136:50)
    at getContextualType (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74569:28)
    at getApparentTypeOfContextualType (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74477:17)
    at getContextualType (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74582:32)
    at getApparentTypeOfContextualType (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74477:17)
    at getContextualSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:74872:24)
    at getNarrowedTypeOfSymbol (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73159:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73247:24)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at getEffectsSignature (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71692:36)
    at getTypeAtFlowCall (/typescript-4.9.0-dev.20221018/lib/tsserver.js:72057:33)
    at getTypeAtFlowNode (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71923:32)
    at getFlowTypeOfReference (/typescript-4.9.0-dev.20221018/lib/tsserver.js:71870:51)
    at checkIdentifier (/typescript-4.9.0-dev.20221018/lib/tsserver.js:73318:28)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81561:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
    at checkPropertyAccessExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76142:85)
    at checkExpressionWorker (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81595:28)
    at checkExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:81510:38)
    at checkNonNullExpression (/typescript-4.9.0-dev.20221018/lib/tsserver.js:76062:37)
```


<details>
<summary><h3>Last few requests</h3></summary>

```json
{"seq":19072,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":268172}}
{"seq":19073,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":268468,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}
{"seq":19074,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":268871,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}
{"seq":19075,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":269549}}

```

</details>

<details>
<summary><h3>Repro Steps</h3></summary>
<ol>
<li><code>git clone https://github.com/palantir/blueprint --recurse-submodules</code></li>
<li>In dir <code>blueprint</code>, run <code>git reset --hard 73514d68ae4e95bdc150d7b253235165005caf8a</code></li>
  <li>In dir <code>blueprint</code>, run <code>yarn install --ignore-engines --ignore-scripts --silent</code></li>
<li>Back in the initial folder, download <code>RepoResults2/palantir.blueprint.replay.txt</code> from the <a href="https://typescript.visualstudio.com/TypeScript/_build/results?buildId=136652&view=artifacts&type=publishedArtifacts">artifact folder</a></li>
<li><code>npm install --no-save @typescript/server-replay</code></li>
<li><code>npx tsreplay ./blueprint ./palantir.blueprint.replay.txt path/to/tsserver.js</code></li>
<li><code>npx tsreplay --help</code> to learn about helpful switches for debugging, logging, etc</li>
</ol>
</details>

_Originally posted by @typescript-bot in https://github.com/microsoft/TypeScript/issues/51218#issuecomment-1282911918_