The editor could not be opened due to an unexpected error. Please consult the log for more details
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
Clicking the inline diff link generated by Amazon Q in VS Code, e.g. start_server.bat +1-1, fails to open the diff view. The file opens and edits normally outside the diff. Error banner appears: “The editor could not be opened due to an unexpected error. Please consult the log for more details.”
Developer Tools logs show an invalid resource URI during diff resolution:
ERR Error: Unable to resolve resource e:%5C_eFH%5Cprojets%5CservPY%5Cdunny.c
at textModelResolverService.ts:93:9
at textModelResolverService.ts:90:16
at lifecycle.ts:689:19
at textModelResolverService.ts:238:10
at textResourceEditorInput.ts:172:15
at Promise.all (index 1)
at diffEditorInput.ts:201:54
at diffEditorInput.ts:182:25
at textDiffEditor.ts:111:26
at editorPanes.ts:466:4
(Same behavior previously with a OneDrive path: e:%5COneDrive%5CDropHier%5CWWT%5CeFH%5Cprojets%5Ctestclaude%5CservPY%5Cdunny.c.)
## Steps to reproduce the issue
## Expected behavior
VS Code should open a diff editor on the specified hunk or range for the target file.
## System details (run `AWS: About` and/or `Amazon Q: About`)
- OS: OS: Windows 11 x64
- Visual Studio Code version:
Version: 1.104.0 (user setup)
Commit: f220831ea2d946c0dcb0f3eaa480eb435a2c1260
Date: 2025-09-10T06:46:18.035Z
Electron: 37.3.1
ElectronBuildId: 12342881
Chromium: 138.0.7204.235
Node.js: 22.18.0
V8: 13.8.258.31-electron.0
OS: Windows_NT x64 10.0.26100
- AWS Toolkit version: none
- Amazon Q version: 1.94.0
Contributor guide
Research direction
Reproduce the Windows 11 failure by opening the rendered dunny.c +1-1 link after asking Amazon Q to apply a change, then inspect the DevTools Console. Start with textModelResolverService.ts and follow the stack through textResourceEditorInput.ts, diffEditorInput.ts, and textDiffEditor.ts; done means the specified hunk opens in a diff editor without the invalid-resource error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100