microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.38k stars 28.62k forks source link

Can't open files #226898

Closed roblourens closed 2 weeks ago

roblourens commented 2 weeks ago

Testing #226399

This is on mac. When I try to open any file in any folder, I see this.

Image

Weirdly, I can't find anything interesting in any log. Here's the trace-level window output. I opend id.ts from the quick pick

2024-08-27 15:22:15.296 [trace] SearchService#search: 43ms
2024-08-27 15:22:15.296 [trace] QuickAccess fileSearch 45ms
2024-08-27 15:22:16.143 [trace] [text file model] resolve() - enter file:///Users/roblou/code/vscode/src/vs/base/node/id.ts
2024-08-27 15:22:16.144 [trace] [text file model] resolveFromFile() file:///Users/roblou/code/vscode/src/vs/base/node/id.ts
2024-08-27 15:22:16.171 [trace] [text file model] dispose() file:///Users/roblou/code/vscode/src/vs/base/node/id.ts
2024-08-27 15:22:16.171 [trace] [backup tracker] discarding backup file:///Users/roblou/code/vscode/src/vs/base/node/id.ts 
2024-08-27 15:22:16.171 [error] {"isTrusted":true}
2024-08-27 15:22:16.171 [trace] [History stack global-default]: notifyNavigation() (editor: file:///Users/roblou/code/vscode/src/vs/base/node/id.ts, event: <none>)
2024-08-27 15:22:16.171 [trace] [History stack global-default]: notifyNavigation() not ignoring (editor: file:///Users/roblou/code/vscode/src/vs/base/node/id.ts, event: <none>)
2024-08-27 15:22:16.171 [trace] [History stack global-default]: onNonSelectionAwareEditorNavigation() (editor: file:///Users/roblou/code/vscode/src/vs/base/node/id.ts, event: <none>)
2024-08-27 15:22:16.171 [trace] [History stack global-default]: add() (editor: file:///Users/roblou/code/vscode/src/vs/base/node/id.ts, event: <none>)
2024-08-27 15:22:16.171 [trace] [History stack global-default]: index: 1, navigating: false
- group: 0, editor: walkThrough://vscode_getting_started_page, selection: <none>
- group: 0, editor: file:///Users/roblou/code/vscode/src/vs/base/node/id.ts, selection: <none>

2024-08-27 15:22:16.173 [trace] [History stack global-default]: index: 0, navigating: false
- group: 0, editor: walkThrough://vscode_getting_started_page, selection: <none>

2024-08-27 15:22:16.711 [trace] CommandService#executeCommand _setContext
2024-08-27 15:22:16.741 [trace] CommandService#executeCommand _setContext
roblourens commented 2 weeks ago

Works on Linux though!

bpasero commented 2 weeks ago

@roblourens does this reproduce from a fresh profile or fresh user data dir?

So you were never able to open any editor during testing exploration?

roblourens commented 2 weeks ago

It works with a fresh user data dir, and a fresh profile. I'm pretty sure I installed it from scratch yesterday, but I did enable setting sync, and it probably synced ui state.

I did do the testing, I was assigned Linux and it worked there. I was just trying it on my mac too where I see this issue.

roblourens commented 2 weeks ago

Happy to do some debugging if you can suggest a place to set a breakpoint, I don't know where to start. I either see the original error or this one

Image

roblourens commented 2 weeks ago

Something about failing to load jschardet

Image

$Hq (workbench.desktop.main.js:186457)
guessEncodingByBuffer (workbench.desktop.main.js:186679)
$gF (workbench.desktop.main.js:186756)
u (workbench.desktop.main.js:186562)
onEnd (workbench.desktop.main.js:186603)
(anonymous) (workbench.desktop.main.js:25901)
(anonymous) (workbench.desktop.main.js:25750)
i (workbench.desktop.main.js:25750)
end (workbench.desktop.main.js:25733)
onEnd (workbench.desktop.main.js:25967)
(anonymous) (workbench.desktop.main.js:25901)
(anonymous) (workbench.desktop.main.js:25750)
i (workbench.desktop.main.js:25750)
end (workbench.desktop.main.js:25733)
(anonymous) (workbench.desktop.main.js:546914)
B (workbench.desktop.main.js:3644)
fire (workbench.desktop.main.js:3669)
l (workbench.desktop.main.js:220766)
t (workbench.desktop.main.js:220823)
s (workbench.desktop.main.js:220814)
(anonymous) (workbench.desktop.main.js:220658)
B (workbench.desktop.main.js:3644)
C (workbench.desktop.main.js:3653)
fire (workbench.desktop.main.js:3673)
Ue (workbench.desktop.main.js:3226)
emit (VM4 sandbox_bundle:2)
onMessage (VM4 sandbox_bundle:2)
bpasero commented 2 weeks ago

@roblourens good digging, can you share your settings? Do you have encoding related settings?

bpasero commented 2 weeks ago

Nevermind, I can reproduce!

lszomoru commented 2 weeks ago

@bpasero, is the an ESM exploration build that contains the fix that can be used to verify this?

bpasero commented 2 weeks ago

@lszomoru yes https://builds.code.visualstudio.com/builds/exploration?commit=1cc150cf084519b0fe8745a0925b8f1db8f28a3f

bpasero commented 2 weeks ago

Steps: