VSCode Server Setup #790
Answered
by
CGNonofr
cemalgnlts
asked this question in
Q&A
-
|
Hi, I followed this guide while setting up my server: https://github.com/CodinGame/monaco-vscode-api/wiki I tried installing VSCode Server on my server and connecting to it, but I’m getting the following error in the console. Uncaught (in promise) TypeError: can't access property "toString", resource is undefined
defaultToKey map.js:23
get map.js:46
createLogger log.js:275
_LogService2 index.js:34
_createInstance instantiationService.js:135
idle instantiationService.js:271
_executor async.js:793
get value async.js:808
get instantiationService.js:315
[map.js:23:43](http://localhost:3000/node_modules/@codingame/monaco-vscode-api/vscode/src/vs/base/common/map.js)This error occurs only if the following code has been added. ...getRemoteAgentServiceOverride({
scanRemoteExtensions: true
})SetupService OverridesWorkersasync function init(container: HTMLDivElement) {
if (isInitialized) return;
isInitialized = true;
const authority = "?.?.?.?:8000";
await initUserConfiguration(userConfig);
fileSystem.register();
await initializeServices(
{
...getLogServiceOverride(),
...getExtensionsServiceOverride({ enableWorkerExtensionHost: true }),
...getModelServiceOverride(),
...getNotificationsServiceOverride(),
...getTerminalServiceOverride(),
...getDialogsServiceOverride(),
...getConfigurationServiceOverride(),
...getSearchServiceOverride(),
...getMarkersServiceOverride(),
...getFileServiceOverride(),
...getTextmateServiceOverride(),
...getHostServiceOverride(),
...getThemeServiceOverride(),
...getViewsServiceOverride(undefined, undefined, () => ({
editor: { restoreEditors: false, editorsToOpen: Promise.resolve([]) },
views: {
containerToRestore: { auxiliaryBar: "", panel: "", sideBar: "" },
defaults: []
},
layout: { editors: undefined }
})),
...getStatusBarServiceOverride(),
...getTimelineServiceOverride(),
...getSnippetsServiceOverride(),
...getBaseServiceOverride(),
...getQuickAccessServiceOverride({
isKeybindingConfigurationVisible: () => false,
shouldUseGlobalPicker: (_, isStandalone) =>
!isStandalone && isEditorPartVisible()
}),
...getOutputServiceOverride(),
// ...getMarkersServiceOverride(),
...getStorageServiceOverrride({
fallbackOverride: {
"workbench.activity.showAccounts": false
}
}),
...getLifecycleServiceOverride(),
...getEnvironmentServiceOverride(),
...getLanguagesServiceOverride(),
...getTitleBarServiceOverride(),
...getExplorerServiceOverride(),
...getRemoteAgentServiceOverride({
scanRemoteExtensions: true
})
},
container,
{
remoteAuthority: authority,
developmentOptions: {
logLevel: LogLevel.Info // Default value
},
workspaceProvider: {
trusted: true,
async open() {
window.open(window.location.href);
return true;
},
// workspace: { folderUri: Uri.file("/") }
workspace: {
folderUri: Uri.from({
scheme: "vscode-remote",
path: "/",
authority
})
}
},
additionalTrustedDomains: ["https://github.com", location.origin],
productConfiguration: {
nameLong: "Code",
nameShort: "code"
// version: "1.0.0",
// date: __APP_DATE,
commandPaletteSuggestedCommandIds: ["workbench.action.files.openFile"],
enableTelemetry: false
}
},
{ userHome: Uri.file("/") }
);
await activateDefaultExtensions();
commands.registerCommand("workbench.action.toggleFullScreen", () => {
if (document.fullscreenElement !== null) {
document.exitFullscreen();
return;
}
document.body.requestFullscreen({ navigationUI: "hide" }).catch(() => {});
});
} |
Beta Was this translation helpful? Give feedback.
Answered by
CGNonofr
Apr 15, 2026
Replies: 1 comment 3 replies
-
|
Do you mind providing a minimal reproduction repo? I see nothing obvious |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your issue is related to https://github.com/CodinGame/monaco-vscode-api/wiki/Troubleshooting#duplicate-versions