Monaco-editor: "ReferenceWidget depends on UNKNOWN service IPeekViewService" error since 0.17

Created on 1 Jun 2019  路  7Comments  路  Source: microsoft/monaco-editor


monaco-editor version: 0.17.1
Browser: Chrome / Firefox
OS: Win

Steps or JS usage snippet reproducing the issue:

Just open the Monaco Editor playground and hit Shift+F12 or Alt+F12 on a symbol.

Error in the browser console:
image

as text

simpleServices.js:206 Error: [createInstance] ReferenceWidget depends on UNKNOWN service IPeekViewService.
    at InstantiationService._createInstance (instantiationService.js:144)
    at InstantiationService.createInstance (instantiationService.js:118)
    at StandaloneReferencesController.ReferencesController.toggleWidget (referencesController.js:248)
    at ReferenceAction.run (referenceSearch.js:140)
    at ReferenceAction.EditorAction.runEditorCommand (editorExtensions.js:230)
    at editorExtensions.js:187
    at InstantiationService.invokeFunction (instantiationService.js:94)
    at StandaloneEditor.CodeEditorWidget.invokeWithinContext (codeEditorWidget.js:298)
    at ReferenceAction.EditorCommand.runCommand (editorExtensions.js:179)
    at handler (editorExtensions.js:101)
    at InstantiationService.invokeFunction (instantiationService.js:94)
    at StandaloneCommandService.executeCommand (simpleServices.js:260)
    at StandaloneKeybindingService.AbstractKeybindingService._doDispatch (abstractKeybindingService.js:195)
    at StandaloneKeybindingService.AbstractKeybindingService._dispatch (abstractKeybindingService.js:142)
    at HTMLDivElement.<anonymous> (simpleServices.js:287)

Both worked in Monaco Editor 0.16.2.

Most helpful comment

Awesome. Thanks for the fix. Any chance for a patch release of monaco-editor/monaco-editor-core? :)

All 7 comments

we experienced the same in our project, when upgrading to latest monaco-editor-core.
it appears the registry in monaco-editor-core/esm/vs/platform/instantiation/common/extensions.js is not being exported or registered to the InstantiationService.
In vscode, workbench.ts calls getServices() and registers them (in initServices()).

@mjbvz Could you maybe have a look at this? (Still broken in 0.17.1)

@AviVahl Thanks for info. Do you have any workaround?

We are using 0.16 until issue is resolved. No workaround from our end, as the service registration/initialization flow is quite complex.

Nice. Many, many thanks @jrieken !

Awesome. Thanks for the fix. Any chance for a patch release of monaco-editor/monaco-editor-core? :)

Pleeease release a new version containing the fix.

purr

Was this page helpful?
0 / 5 - 0 ratings

Related issues

poloten4uk picture poloten4uk  路  3Comments

Spongman picture Spongman  路  3Comments

aarinsmith picture aarinsmith  路  3Comments

SoftTimur picture SoftTimur  路  3Comments

Kang-Jun-sik picture Kang-Jun-sik  路  3Comments