vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Bug Report - VSCode not showing MongoDB in activity bar and side bar

Open diberry opened this issue 2 years ago • 8 comments

Bug Report

Current Behavior

On Windows 10, VS Code dev container (Node.js + Mongo) started and the Command Palette shows MongoDB commands are available, but the green leaf icon isn't available in the activity bar and so I can't open the MongDB side bar.

When I review the Output window items, I can see the mongdb and MongoDB Language Server are in the list.

Code/Gist

Expected Behavior/Code

Can see the green leaf icon in activity bar in order to get to side bar and interact with MongoDB playground files.

Environment

  • node.js / npm versions:

outside container versions:

{ npm: '6.14.13', ares: '1.17.1', brotli: '1.0.9', cldr: '39.0', icu: '69.1', llhttp: '2.1.3', modules: '83', napi: '8', nghttp2: '1.42.0', node: '14.17.1', openssl: '1.1.1k', tz: '2021a', unicode: '13.0', uv: '1.41.0', v8: '8.4.371.23-node.67', zlib: '1.2.11' }

inside container versions

{ 'msdocs-javascript-nodejs-server': '0.0.1', npm: '8.5.0', node: '16.14.2', v8: '9.4.146.24-node.20', uv: '1.43.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.18.1', modules: '93', nghttp2: '1.45.1', napi: '8', llhttp: '6.0.4', openssl: '1.1.1n+quic', cldr: '40.0', icu: '70.1', tz: '2021a3', unicode: '14.0', ngtcp2: '0.1.0-DEV', nghttp3: '0.1.0-DEV' }

  • OS: Windows 10 Enterprise: 10.0.19044 Build 19044

Possible Solution

I've stopped and started the computer and visual studio code and neither work. The extension is installed on the local computer's version of vs code and within the container via the .devcontainer file.

Additional Context/Screenshots

image image image

diberry avatar May 02 '22 17:05 diberry

Hey, thank you for reporting this! Which version of VSCode do you use? Could you pls try with the recent version of it, or any other version, or maybe with Visual Studio Code Insiders?

alenakhineika avatar May 23 '22 09:05 alenakhineika

the green leaf icon

I'm relatively new to this extension, so I can't say I know what this is referring to.

I'm aware that the extension contributes a status bar to Visual Studio Code which is used to tell the user if actions being performed in the background. i.e. connecting or disconnecting from a database, or saving and fetching documents.

I've never seen anything in the extension or code that resembles a static green logo to open the view, however. 🤔

As a work around though, have you tried opening the view from the Command Pallet? This should at least allow you to open the sidebar until the status menu thing is cleared up.

> MongoDB: Focus on Connections View

SethFalco avatar May 28 '22 06:05 SethFalco

Notice in image below the extension is installed and enabled but the mongoDB icon isn't in the far-right menu with the other controls.

@alenakhineika

Not working - Win 10

  • Windows 10
  • VSCode: April 2022 (version 1.67)
  • MongoDB for VS Code: v0.9.3

Working - Win 11 (& Mac also)

  • Windows 11
  • VSCode: April 2022 (version 1.67)
  • MongoDB for VS Code: v0.9.3

@SethFalco Thank you for that suggestion, as you can see in the image, that command pallet command isn't available. Other ideas?

Windows 10 - no leaf icon/no command palette focus option image

Windows 11 - leaf icon/command palette focus image

diberry avatar May 31 '22 15:05 diberry

Can you please check the value of the config.mdb.showMongoDBConnectionExplorer setting?

I just checked the extension's code, it looks like the view/commands might not be available when that's disabled.

If it's false, please try setting it to true.

SethFalco avatar Jun 03 '22 10:06 SethFalco

Please forgive my ignorance - how/where do I check this setting?

diberry avatar Jun 03 '22 14:06 diberry

Either:

  • File → Preferences → Settings (Menu navigation via mouse.)
  • ALT + F, P, S (Menu navigation via keyboard.)
  • CTRL + , (Keyboard shortcut to access settings.)

SethFalco avatar Jun 03 '22 23:06 SethFalco

image

diberry avatar Jun 06 '22 15:06 diberry

I have two ideas to check.

  1. Right-click on one of the visible icons on the sidebar/activity bar. If MongoDB is unchecked, recheck it and the icon should appear.
Screenshot 2022-06-13 at 11 49 03
  1. In general in VSCode, if you have moved views around and get messed up, try to run the View: Reset View Locations command from the command palette. Maybe it also can help with missing icons.
Screenshot 2022-06-13 at 11 52 16

alenakhineika avatar Jun 13 '22 09:06 alenakhineika

Closing the ticket. Feel free to reopen if you encounter the issue again!

alenakhineika avatar Dec 08 '22 11:12 alenakhineika

hey i am having same issue but i have tried the above solutions but no luck

MehfoozurRehman avatar Sep 27 '23 09:09 MehfoozurRehman

Hey @MehfoozurRehman, could you please share the OS, VSCode, and MongoDB extension version you are using? Do you have other extensions installed that properly display icons? Could you share some screenshots of your sidebar to see how this looks for you?

alenakhineika avatar Sep 28 '23 14:09 alenakhineika

yes so i am running Version: 1.82.2 (user setup) Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d Date: 2023-09-14T05:55:25.390Z Electron: 25.8.1 ElectronBuildId: 23779380 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.25951 Mongodb extension: 1.2.1 image i have other extension that are showing in sidebar

{
  "workbench.startupEditor": "none",
  "editor.guides.bracketPairs": true,
  "editor.inlineSuggest.enabled": true,
  "workbench.iconTheme": "material-icon-theme",
  "workbench.colorTheme": "One Dark Pro Darker",
  "liveServer.settings.donotShowInfoMsg": true,
  "editor.bracketPairColorization.enabled": true,
  "terminal.integrated.defaultProfile.windows": "Command Prompt",
  "editor.bracketPairColorization.independentColorPoolPerBracketType": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "github.copilot.enable": {
    "*": true,
    "plaintext": false,
    "markdown": true,
    "scminput": false,
    "yaml": false,
    "javascriptreact": true
  },
  "files.associations": {
    "*.js": "javascriptreact"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "git.enableSmartCommit": true,
  "editor.formatOnSave": true
}

these are my vscode settings image the extension was running on my pc for a few weeks before that then one day i needed it and i noticed no icon i tried vscode command pallet to connect to a mongodb atlas database it says connected in notification but no icon still i hope these details can help and thanks in advance for helping

MehfoozurRehman avatar Sep 28 '23 19:09 MehfoozurRehman

Was trying to reproduce, but no luck so far. Could you please try downloading VSCode Insiders and installing the MongoDB extension there?

I am trying to understand if this is something about a particular version of VSCode, or this happens for other VSCode builds as well.

alenakhineika avatar Sep 28 '23 20:09 alenakhineika

ok so i did install the insider version it shows the mongodb extension icon in side bar but if i sync my vscode to my old settings it disappers again so i am thinking its something with my configuration i dont know what or why that would be as i dont have any rules about this in my settings.json any idea?

MehfoozurRehman avatar Sep 28 '23 20:09 MehfoozurRehman

oh ok i found it. it was in a different panel may be i dragged it accidently into explorer panel thats why it was not showing in the side bar anyways thanks for help i dragged it outside now so its fine

MehfoozurRehman avatar Sep 28 '23 20:09 MehfoozurRehman

Glad that you've solved the issue 🎊 Feel free to reach out in the future if any troubles!

alenakhineika avatar Sep 28 '23 21:09 alenakhineika