VS Code Extension Error Activating extension ServiceNow.now-vscode failed: Cannot find module keytar

Todd O
Tera Guru

I've been using the ServiceNow VS Code extension for years and love it.  As of yesterday, the extension stopped working and I see this message when I toggle the developer tools with the help menu. 

Activating extension 'ServiceNow.now-vscode' failed: Cannot find module 'keytar'

ToddO_0-1696520268367.png

 

If I try to activate the Extension (cmd-shift-p Activate Now Extension), I get this error.

ToddO_1-1696520362346.png

 

I did make a few changes yesterday to my system and they may be related but I'm not finding any solutions for this on the web, communities, etc. Here is my system details and what I've done recently that may be related to my issue.

 

  1. I upgraded my Macmini yesterday MacOS to Sonoma yesterday. I also restarted VS Code as it asked me to update as well. Therefore, my system is fully up to date with latest MacOS, VS Code, the SN Extension and the extension dependencies.
  2. I completely removed VS Code from my system and reinstalled. Still getting same error. 
  3. I completely uninstalled extensions and reinstalled. Still getting same error.
    1. Version of Extension: ServiceNow® Extension for VS Codev1.6.1
    2. Version of VS Code:Version: 1.83.0 (Universal)

Here is a very interesting detail as well. I have a Macbook Pro computer too and work on that just the same. I did all the exact same upgrades on my Macbook Pro that I did on my Macmini. However, my Macbook Pro does NOT have this problem after the upgrade. That is, the SN VS Code extension works perfectly on my Macbook Pro while it's broken on my Macmini. Any help is greatly appreciated.

Todd

 

 

 

3 ACCEPTED SOLUTIONS

chrisf
Kilo Expert

I started getting the error after VScode updated to its September release. Once I installed the August 2023 version the extension started working again.

View solution in original post

@Tobias Persson_ I can't give your exact date but we are planning to fix and release a working extension by November month.

View solution in original post

Kundan Thakur
ServiceNow Employee
ServiceNow Employee

Hi @Todd O ,

Thrilled to announce the arrival of our latest update, Vscode ServiceNow extension (v1.7.0), where we've tackled that pesky issue head-on!
https://marketplace.visualstudio.com/items?itemName=ServiceNow.now-vscode

Please mark the answer correct/helpful based on impact.

View solution in original post

17 REPLIES 17

chrisf
Kilo Expert

I started getting the error after VScode updated to its September release. Once I installed the August 2023 version the extension started working again.

rohitsengar
ServiceNow Employee
ServiceNow Employee

@Todd O Unfortunately, at this point in time solution proposed by @chrisf is the recommended one. If you are on an old version of VSCode do not upgrade to its September or beyond releases. If you already upgraded we would recommend you to install the August 2023 version in order to work with SN extension. 


SN relies on Keytar for storing secret info/credentials. Now it has been removed from the VSCode September release. So, the SN extension won't work with September v1.83 and beyond releases of VSCode. Kindly wait for the next version of the ServiceNow extension where we will replace Keytar with the SecretStorage API (that VS Code provides on the ExtensionContext) as per VSCode recommendation. 

Thank you for confirming the official short-term solution @rohitsengar!

Hi @rohitsengar ,

do you happen to know when the fixed SN extension will be available?

Thanks and kind regards,
Tobias

@Tobias Persson_ I can't give your exact date but we are planning to fix and release a working extension by November month.