Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Settings editor tab crashes when re-opening editor (no-provider error) #38267

Closed
ggilmore opened this issue Nov 14, 2017 · 6 comments
Closed
Assignees
Labels
important Issue identified as high-priority perf-startup
Milestone

Comments

@ggilmore
Copy link
Contributor

ggilmore commented Nov 14, 2017

  • VSCode Version: code-oss-dev 1.19.0 (Built from 0790dd3)
  • OS Version: Darwin x64 17.2.0
  • Extensions: none

Steps to Reproduce:

  1. Have welcome page or user settings open
  2. Hot exit the editor
  3. Re-open the editor
  4. Get this error message:
index.js:46 ENOPRO: no provider for vscode://defaultsettings/0/settings.json
    at file:///Users/ggilmore/mess/vscode/out/vs/workbench/services/files/electron-browser/remoteFileService.js:112:31
    at Object.notifySuccess [as _notify] (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:1170:59)
    at Object.enter (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:852:30)
    at _Base.Class.derive._creator._run (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:1068:29)
    at _Base.Class.derive._creator._completed (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:1036:18)
    at Object.notifySuccess [as _notify] (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:1170:59)
    at Object.enter (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:852:30)
    at Promise_ctor._run (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:1068:29)
    at Promise_ctor._completed (file:///Users/ggilmore/mess/vscode/out/vs/base/common/winjs.base.raw.js:1036:18)
    at LazyPromise.resolveOk (file:///Users/ggilmore/mess/vscode/out/vs/workbench/services/extensions/node/lazyPromise.js:43:22)
onError @ index.js:46

I suspect there is some sort of race condition going on.

@ggilmore ggilmore changed the title User Settings editor tab crashes when re-opening editor (no-provided error) User Settings editor tab crashes when re-opening editor (no-provider error) Nov 14, 2017
@roblourens
Copy link
Member

roblourens commented Nov 14, 2017

I see this too. The preferences model resolver is registered here: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/preferences/common/preferencesContribution.ts#L112

@jrieken
Copy link
Member

jrieken commented Nov 14, 2017

From some reason they are a TextFileEditorModel

screen shot 2017-11-14 at 08 26 06

@bpasero bpasero added the important Issue identified as high-priority label Nov 14, 2017
@bpasero bpasero added this to the November 2017 milestone Nov 14, 2017
@bpasero
Copy link
Member

bpasero commented Nov 14, 2017

@jrieken looks like a race condition between the preferencesContribution#start() method and the editor wanting to open the preferences.

I adopted the LifecyclePhase.Starting for all workbench contributions and it looks like the change here is that LifecycleService.when() executes with a timeout(0) where before it executed sync. We should ensure that the starting phase executes without timeout, which I thought the native promise does (or was it the other way around?)

@sandy081
Copy link
Member

@bpasero This is also happening for Welcome page

@jrieken
Copy link
Member

jrieken commented Nov 14, 2017

it looks like the change here is that LifecycleService.when() executes with a timeout(0)

Where? I didn't change anything since adding that method.

@bpasero
Copy link
Member

bpasero commented Nov 14, 2017

@jrieken nevermind, fix pushed.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
important Issue identified as high-priority perf-startup
Projects
None yet
Development

No branches or pull requests

5 participants