VSCode 'Add Build Configuration' fails - blank window

My installation of VSCode on Linux Mint has never worked properly.  I am able to open an existing application however the "Add Build Configuration" window is blank, for example:

As I said, this has "never worked".  Originally, when I installed VSCode (and NRF Connect etc) my computer was running Linux Mint 20.  It did not work, however at that time I believe I discovered that it was not supported by Mint-20 or by the related version of Ubuntu, so I never pursued it at the time.

Since then I have upgraded to Mint 21.2, which is based on Ubuntu 22.04, which is indicated to be supported at "Tier 3".  This has not fixed the problem.

I have tried uninstalling and reinstalling VS-Code, and the NRF Connect extensions inside VS-Code - this has not helped.

Thoughts, suggestions of where I might look for some clues...?

Parents
  • Hi,

     

    Have you installed vscode + extensions manually, or used the toolchain manager from nRF connect sdk for desktop?

    I've noticed that sometimes it is important where you open vscode from for it to inherit your environment correctly, especially if using different distros than stock Ubuntu.

    Try to open up a terminal and run vscode (default path: /usr/share/code/bin/code) and see if this then behaves differently. If it still misbehaves, could you share a detailed log (ie. code --verbose) ?

     

    Kind regards,

    Håkon

  • Hello Håkon, thank you for the suggestions.

    I am not 100% sure how I originally installed things, it was a while ago.  I *THINK* I used nRF Connect for Desktop "toolchain manager" to install the SDK, and I think I manually installed vscode.  Before opening this ticket, I un-installed vscode and I then installed it through the operating system's software repository ("synaptic")

    Thank you for the suggestion of running "code --verbose" from the command line.  My gosh it sure is verbose(!!).  Here is the initial spewage:


    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    dmc@daniel-desktop:~$ code --verbose
    [663592:1220/074034.796518:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
    [main 2023-12-20T11:40:34.946Z] [File Watcher (node.js)] Request to start watching: /home/dmc/.config/Code/User (excludes: <none>, includes: <all>, correlationId: <none>),/home/dmc/.config/Code/User/settings.json (excludes: <none>, includes: <all>, correlationId: <none>)
    [main 2023-12-20T11:40:34.968Z] Starting VS Code
    [main 2023-12-20T11:40:34.968Z] from: /usr/share/code/resources/app
    [main 2023-12-20T11:40:34.968Z] args: {
    _: [],
    diff: false,
    merge: false,
    add: false,
    goto: false,
    'new-window': false,
    'reuse-window': false,
    wait: false,
    help: false,
    'list-extensions': false,
    'show-versions': false,
    'pre-release': false,
    version: false,
    verbose: true,
    status: false,
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    After starting "code" and the log messages settled down, I clicked on "+ create new build configuration" and got the same blank page; here are the messages it created:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [663592:1220/074136.721901:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 Comments: URIs of continue on comments to add to storage .", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.853355:INFO:CONSOLE(643)] "%cTRACE color: #888 CommandService#executeCommand __vsc215502a3-7ffd-4061-939a-ecfb956e1ea0", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.858776:INFO:CONSOLE(643)] "%cTRACE color: #888 onWillActivateByEvent: onCommand:nrf-connect.app.newConfig", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.884478:INFO:CONSOLE(1188)] "An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (1188)
    [663592:1220/074141.898031:INFO:CONSOLE(643)] "%cTRACE color: #888 [History stack global-default]: notifyNavigation() (editor: webview-panel:webview-panel/webview-f54c4895-4708-4dcf-9027-43c55c75de56, event: <none>)", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.898299:INFO:CONSOLE(643)] "%cTRACE color: #888 [History stack global-default]: notifyNavigation() not ignoring (editor: webview-panel:webview-panel/webview-f54c4895-4708-4dcf-9027-43c55c75de56, event: <none>)", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.898764:INFO:CONSOLE(643)] "%cTRACE color: #888 [History stack global-default]: onNonSelectionAwareEditorNavigation() (editor: webview-panel:webview-panel/webview-f54c4895-4708-4dcf-9027-43c55c75de56, event: <none>)", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.899066:INFO:CONSOLE(643)] "%cTRACE color: #888 [History stack global-default]: add() (editor: webview-panel:webview-panel/webview-f54c4895-4708-4dcf-9027-43c55c75de56, event: <none>)", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.899295:INFO:CONSOLE(643)] "%cTRACE color: #888 [History stack global-default]: index: 1, navigating: false
    - group: 0, editor: walkThrough://vscode_getting_started_page, selection: <none>
    - group: 0, editor: webview-panel:webview-panel/webview-f54c4895-4708-4dcf-9027-43c55c75de56, selection: <none>
    ", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.920543:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 Webview(44264209-5519-4666-b368-c88b54feac51): will update content", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074141.991117:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 Webview(44264209-5519-4666-b368-c88b54feac51): webview ready", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074142.064359:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 loadLocalResource - begin. requestUri=file:///a2/home/dmc/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/dist/webview/styles.css", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074142.064856:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 loadLocalResource - found resource to load. requestUri=file:///a2/home/dmc/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/dist/webview/styles.css, resourceToLoad=undefined", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074142.065153:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 loadLocalResource - begin. requestUri=file:///a2/home/dmc/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/dist/webview/generateConfig.css", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074142.065389:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 loadLocalResource - found resource to load. requestUri=file:///a2/home/dmc/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/dist/webview/generateConfig.css, resourceToLoad=undefined", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074142.065616:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 loadLocalResource - begin. requestUri=file:///a2/home/dmc/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/dist/webview/codicon.css", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074142.065874:INFO:CONSOLE(643)] "%cDEBUG background: #eee; color: #888 loadLocalResource - found resource to load. requestUri=file:///a2/home/dmc/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/dist/webview/codicon.css, resourceToLoad=undefined", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

     

    Your first log shows several errors:

    Fullscreen
    1
    2
    3
    [663592:1220/074036.743566:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'file:///home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json': Unable to read file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json' (Error: Unable to resolve nonexistent file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074036.746097:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'file:///home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/tasks.json': Unable to read file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/tasks.json' (Error: Unable to resolve nonexistent file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/tasks.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074036.746498:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'file:///home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/launch.json': Unable to read file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/launch.json' (Error: Unable to resolve nonexistent file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/launch.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     

    And further down, it seems that the /home/dmc/.config/Code directory is not setup properly, or has permission issues? You're getting "ENOENT" in most vscode configuration:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    [663592:1220/074038.308856:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/dmc/.config/Code/User/keybindings.json'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.309178:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Started watching: '/a2/home/dmc/.config/Code/Workspaces/1702933829764/workspace.json'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.309488:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.309780:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.310094:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/tasks.json'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.310389:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/launch.json'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.455067:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Request to start watching: /home/dmc/.config/Code/User/tasks.json (excludes: <none>, includes: <all>, correlationId: <none>)", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.473460:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'vscode-userdata:/home/dmc/.config/Code/User/tasks.json': Unable to read file 'vscode-userdata:/home/dmc/.config/Code/User/tasks.json' (Error: Unable to resolve nonexistent file 'vscode-userdata:/home/dmc/.config/Code/User/tasks.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    [663592:1220/074038.631945:INFO:CONSOLE(643)] "%cTRACE color: #888 [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/dmc/.config/Code/User/tasks.json'", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     

    Code also has problems resolving what shell is running on your system:

    Fullscreen
    1
    [main 2023-12-20T11:40:42.300Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

    This one should return:

    Fullscreen
    1
    resolveShellEnv(): running (macOS/Linux)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

    When you uninstalled vscode, did you also delete ~/.config/Code directory?

     

    Kind regards,

    Håkon

  • Thanks for your help so far.  Please let me know what I should do/try next.

    I did not delete ~/.config/Code when I did the previous run.  I will now do this....

    I have now completely uninstalled "code", which however still left ~/.config/Code (which BTW is mode 775).  So, I got rid of ".config/Code" and then reinstalled "code".  Same problems as far as I can tell (no more, no less):

    • resolveShellEnv(): skipped (VSCODE_CLI is set)
      • still happening.  What might I do to fix this?
    • [689433:1220/101402.357820:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'file:///home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json': Unable to read file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json' (Error: Unable to resolve nonexistent file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
      • However, ..."hello_world" is mode 775 and ".vscode" does not exist.  So there's nothing stopping ".vscode" from being created, but it isn't being created
      • Fullscreen
        1
        drwxrwxr-x 4 dmc dmc 4096 Dec 18 15:23 /home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    • "+ create new build configuration" page is still blank.

    Messages from a new run of "code --verbose", with freshly-reinstalled "code" and with freshly-created ~/.config/Code...  I don't think there is any meaningful change or improvement?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [689433:1220/101305.858149:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
    ·[90m[main 2023-12-20T14:13:06.075Z]·[0m [File Watcher (node.js)] Request to start watching: /home/dmc/.config/Code/User (excludes: <none>, includes: <all>, correlationId: <none>),/home/dmc/.config/Code/User/settings.json (excludes: <none>, includes: <all>, correlationId: <none>)
    ·[90m[main 2023-12-20T14:13:06.120Z]·[0m Starting VS Code
    ·[90m[main 2023-12-20T14:13:06.120Z]·[0m from: /usr/share/code/resources/app
    ·[90m[main 2023-12-20T14:13:06.120Z]·[0m args: {
    _: [],
    diff: false,
    merge: false,
    add: false,
    goto: false,
    'new-window': false,
    'reuse-window': false,
    wait: false,
    help: false,
    'list-extensions': false,
    'show-versions': false,
    'pre-release': false,
    version: false,
    verbose: true,
    status: false,
    'prof-startup': false,
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reply
  • Thanks for your help so far.  Please let me know what I should do/try next.

    I did not delete ~/.config/Code when I did the previous run.  I will now do this....

    I have now completely uninstalled "code", which however still left ~/.config/Code (which BTW is mode 775).  So, I got rid of ".config/Code" and then reinstalled "code".  Same problems as far as I can tell (no more, no less):

    • resolveShellEnv(): skipped (VSCODE_CLI is set)
      • still happening.  What might I do to fix this?
    • [689433:1220/101402.357820:INFO:CONSOLE(643)] "%cTRACE color: #888 Error while resolving configuration file 'file:///home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json': Unable to read file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json' (Error: Unable to resolve nonexistent file '/home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world/.vscode/settings.json')", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (643)
      • However, ..."hello_world" is mode 775 and ".vscode" does not exist.  So there's nothing stopping ".vscode" from being created, but it isn't being created
      • Fullscreen
        1
        drwxrwxr-x 4 dmc dmc 4096 Dec 18 15:23 /home/dmc/blo/nrf-dmc/ncs/zephyr/samples/hello_world
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    • "+ create new build configuration" page is still blank.

    Messages from a new run of "code --verbose", with freshly-reinstalled "code" and with freshly-created ~/.config/Code...  I don't think there is any meaningful change or improvement?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [689433:1220/101305.858149:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
    ·[90m[main 2023-12-20T14:13:06.075Z]·[0m [File Watcher (node.js)] Request to start watching: /home/dmc/.config/Code/User (excludes: <none>, includes: <all>, correlationId: <none>),/home/dmc/.config/Code/User/settings.json (excludes: <none>, includes: <all>, correlationId: <none>)
    ·[90m[main 2023-12-20T14:13:06.120Z]·[0m Starting VS Code
    ·[90m[main 2023-12-20T14:13:06.120Z]·[0m from: /usr/share/code/resources/app
    ·[90m[main 2023-12-20T14:13:06.120Z]·[0m args: {
    _: [],
    diff: false,
    merge: false,
    add: false,
    goto: false,
    'new-window': false,
    'reuse-window': false,
    wait: false,
    help: false,
    'list-extensions': false,
    'show-versions': false,
    'pre-release': false,
    version: false,
    verbose: true,
    status: false,
    'prof-startup': false,
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Children
  • Hi,

     

    Is your home dir a symbolic link to /a2/ directory?

    Fullscreen
    1
    ·[90m[main 2023-12-20T14:13:06.322Z]·[0m [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: /home/dmc/.config/Code/User, real: /a2/home/dmc/.config/Code/User)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

    You might be running into problems with that, as discussed in the comments and linked issues here:

    https://github.com/microsoft/vscode/issues/143034

     

    Kind regards,

    Håkon

  • Hello Håkon, sorry for my delay replying - so: a very Happy New Year to you and your co-workers!! ;-)

    Darn it, a symlinked home directory does indeed seem to be the cause of the problem.  Yes my home directory was a symlink.  Total respect for figuring that one out (!!!)

    I have now solved (actually, worked-around, grumble-grumble) the problem.

    If it helps anybody else, here is what I now know about what works and what does not work.  I can make the problem appear or disappear depending on the directory ".vscode" in my home directory:

    • If my home directory is a symlink, then things fail
    • If my home directory is a real directory, and everything in it is a symlink except for ".vscode", then things work.