microsoft / vscode

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

`Reopen with Encoding` is not working on VS Code Web - Insiders #142180

Closed alefragnani closed 2 years ago

alefragnani commented 2 years ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

1.Open insiders.vscode.dev 2.Open a file 3.Call Change File Encoding command OR Click in the Encoding Status Bar item 4.Select Reopen with Encoding 5.You will notice this error in Notification area: [object Event]

  1. Looking at DevTools / Console, you will see this:
    workbench.web.api.js:788         
       Error: [object Event]
    at Object.b [as ensureError] (loader.js:259:22)
    at i._createLoadError (loader.js:1511:33)
    at i._onLoadError (loader.js:1522:30)
    at d (loader.js:1668:27)
    at Object.errorback (loader.js:1688:25)
    at e.triggerErrorback (loader.js:635:36)
    at loader.js:622:151
    at HTMLScriptElement.d (loader.js:658:17)

The same happens not only in the browser (insiders.vscode.dev) but also if you install it as PWA

The default encoding in VS Code is UTF-8, and the error occurs while opening not only Windows 1252 but also UTF-8 files.

Thank you

bpasero commented 2 years ago

-> Clear Browser Caches

alefragnani commented 2 years ago

Weird, but it seems it was not necessary.

I was going to test your suggestion, but the error stopped. Probably because of the restarts/reopenings (both on browser and PWA)

Thank you

alefragnani commented 2 years ago

BTW, I just noticed a delay for the Syntax Highlight (md, js, html) to work in Insiders, both on web and PWA. It took about 10 min after the initial opening of an instance, before the text to be properly highlighted.

Is there any download required for that? Maybe AnyCode related?