vscode-circuitpython icon indicating copy to clipboard operation
vscode-circuitpython copied to clipboard

[BUG] 0.2.0 does not include metadata.json in extension payload

Open Glutnix opened this issue 1 year ago • 1 comments

Got this error in the Extension Host output panel:

2024-05-26 22:28:58.932 [error] Activating extension joedevivo.vscode-circuitpython failed due to an error:
2024-05-26 22:28:58.932 [error] Error: ENOENT: no such file or directory, open 'c:\Users\brett\.vscode\extensions\joedevivo.vscode-circuitpython-0.2.0-win32-x64\boards\metadata.json'
	at Object.openSync (node:fs:605:3)
	at Object.func [as openSync] (node:electron/js2c/node_init:2:2214)
	at Object.readFileSync (node:fs:473:35)
	at t.readFileSync (node:electron/js2c/node_init:2:9771)
	at Board.loadBoards (c:\Users\brett\.vscode\extensions\joedevivo.vscode-circuitpython-0.2.0-win32-x64\out\boards\board.js:24:27)
	at new Container (c:\Users\brett\.vscode\extensions\joedevivo.vscode-circuitpython-0.2.0-win32-x64\out\container.js:27:23)
	at Container.newInstance (c:\Users\brett\.vscode\extensions\joedevivo.vscode-circuitpython-0.2.0-win32-x64\out\container.js:14:35)
	at activate (c:\Users\brett\.vscode\extensions\joedevivo.vscode-circuitpython-0.2.0-win32-x64\out\extension.js:13:49)
	at Z.kb (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:159:13465)
	at Z.jb (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:159:13175)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:159:11197
	at async h.n (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:143:6281)
	at async h.m (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:143:6244)
	at async h.l (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:143:5701)

I checked, yes, metadata.json is not present in that folder.

When trying to invoke the 'CircuitPython: Check for latest bundle' command I get:

[Window Title]
Visual Studio Code

[Main Instruction]
Command 'CircuitPython: Check for latest bundle' resulted in an error

[Content]
command 'circuitpython.library.fetch' not found

[OK]

I am using joedevivo.vscode-circuitpython v0.2.0 as found on the marketplace. Latest Windows 11. Mu Editor has no problem listening and talking to the device over serial.

I have a Raspberry Pi Pico H (2021) with adafruit-circuitpython-raspberry_pi_pico-en_GB-9.0.5.uf2 installed. usbview.exe reports:

idVendor:                        0x239A = Adafruit Industries LLC
idProduct:                       0x80F4
bcdDevice:                       0x0100
iManufacturer:                     0x01
     English (United States)  "Raspberry Pi"
iProduct:                          0x02
     English (United States)  "Pico"
iSerialNumber:                     0x03
     English (United States)  "XXXXXXXXXXXXXXXX"

And FWIW, I can't find a board that matches that vendor/product id within the boards folder of the extension. I see 0x239A/0x80F2 which seems close. shrug

Glutnix avatar May 26 '24 10:05 Glutnix

Go into the vscode extension page and find the “install previous version” and install .19 or whatever was just before .20, it fixed my problems. Something about the way the extension is compiled doesn’t let it work with the most up to date version of Electron that vscode is based on, but .19 is just fine.

moviebrain avatar May 26 '24 11:05 moviebrain