microsoft / microsoft/monaco-editor
suggestion throws an error when triggered on specific text[Bug]
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Code
case
Reproduction Steps
input text "case"
trigger suggestion
Actual (Problematic) Behavior
error is thrown in console:
errors.ts:26 Uncaught Error: Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'Mo'.
Error: Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'Mo'.
at Object.Rn [as cast] (tsWorker.js:9:21239)
at Be (tsWorker.js:247:49873)
at _e (tsWorker.js:247:54111)
at Object.L [as getCompletionsAtPosition] (tsWorker.js:247:30870)
at Object.a [as getCompletionsAtPosition] (tsWorker.js:255:14077)
at lm.getCompletionsAtPosition (tsWorker.js:33955:3086)
at S.fmr (workerMain.js:22:33695)
at f._handleMessage (workerMain.js:22:17684)
at Object.handleMessage (workerMain.js:22:17309)
at w._handleRequestMessage (workerMain.js:22:14120)
at errors.ts:26:12
Expected Behavior
No uncaught error in console
Additional Context
No response
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.
Research direction
Reproduce the issue in the Monaco Editor Playground with the text "case" and trigger suggestions. Start at getCompletionsAtPosition in tsWorker.js, then follow the reported path through workerMain.js and errors.ts. Done means the reproduction no longer produces an uncaught console error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100