curdeveryday / vscode-m5stack-mpy

A extension to mange files for M5Stack micropython system
MIT License
32 stars 14 forks source link

Button "Add M5Stack" suddenly disappeared #45

Open WouterPH opened 1 year ago

WouterPH commented 1 year ago

Type: Bug

Install the extension and look at the left side of the bar at the bottom of the screen. You should see #errors , # warnings and a button "Add M5Stack" as in the documentation of the extension, see screenshot: afbeelding

I am working on two machines (Windows 10 and Windows 11). On both machines the option was available, but suddenly disappeared this week. In the screenshot below you can see that the extension is active and that the button is missing: afbeelding

Extension version: 1.1.9 VS Code version: Code 1.78.1 (6a995c4f4cc2ced6e3237749973982e751cb0bf9, 2023-05-04T09:48:08.683Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i5-13400 (16 x 2496)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.70GB (6.73GB free)| |Process Argv|--crash-reporter-id 5623efc6-fd0a-43a4-9f28-e6504dff170e| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30610678 3biah626:30602489 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 showlangstatbar:30737416 vsctsb:30705553 azdwalk:30721579 pythonms35:30701012 7ij38806:30736111 pythonfmttext:30731395 pythoncmvfstr:30731969 fixshowwlkth:30730052 hidesbindicator:30730055 pythongtdpath:30731978 ```
tim23x commented 1 year ago

Also having this problem - Extension version 1.1.9 VS Code version: 1.78.2 (user setup) OS: Windows_NT x64 10.0.19044 Sandboxed: Yes

joelurtubia commented 1 year ago

the same problem!! Extension version 1.1.9 Version: 1.78.2 (user setup) V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22621 Sandboxed: No

WouterPH commented 1 year ago

Appearently it is a compatibility problem. Uninstalling VSCode and installing a previous version worked for me.

Working configuration: afbeelding

After that I disabled updating VSCode (File>Preferences>Settings): afbeelding

I will leave the issure open for about a week so that anyone can share experiences. If this turns out to be an approprioate solution I will close the issue.

RealDekkia commented 1 year ago

If this turns out to be an approprioate solution I will close the issue.

That's not really a solution, it's a workaround at best. @curdeveryday might want to look into fixing it.

darul75 commented 1 year ago

Sorry had also no time to look into that issue, vscode updates are very frequent and they keep changing nodejs version, I would need to refresh my mind but main file is that one https://github.com/curdeveryday/vscode-m5stack-mpy/blob/master/serialPortBindingsLoader.js it does contains all supported version.

RealDekkia commented 1 year ago

Ok, so I was tinkering around a bit and the pull-request I made turned out to be partly wrong. Adding 16.17.1 to nodeJSVersions in serialPortBindingsLoader.js was the only neccessary change.

But this only works when I run the extension from source. If I make the change in the version downloaded from the store, clicking on "Add M5Stack" throws an error.

GavinBeattie commented 11 months ago

From a fresh install I have no Add M5 button. macOS Ventura 13.5.2 | VS Code 1.83.1 | vscode-m5stack-mpy 1.1.10 • Runtime status: No status available. • Settings > Extensions > [not present or no extended details] • Show running extensions: Activating... Ideas welcome.

agentx-cgn commented 11 months ago
image

Seems now v18.15 is needed. @curdeveryday

krgough commented 11 months ago

I was having the problem on an M1 mac running ios version = Sonoma. I fixed it using the above comments and the following steps...

Pull the github repo and using yarn to compile as per the github readme

git clone https://github.com/curdeveryday/vscode-m5stack-mpy.git
git clean -fdX
yarn cache clean
yarn

Edit serialPortBindingsLoader.js to include 18.15.0 js version....

const copyBindings = () => {
 const nodeJSVersions = ['12.14.1', '12.18.3', '12.4.0', '12.8.1', '14.16.0', '16.13.0', '16.13.2', '16.14.2', '16.17.1', '18.15.0' ];

Install the vs code extension packaging tool... npm install -g vsce

Then created and installed the package...

vsce package
code --install-extension vscode-m5stack-mpy-1.1.10.vsix 

and now it seems to work :-)

purplewish07 commented 10 months ago

Thank you very much, @krgough .

I followed your steps and successfully fixed this issue on Windows 10 with VS Code version 1.83.1 (user setup).

2023-11-01_164034 2023-11-01_164134

blog2i2j commented 10 months ago

@krgough thanks very much, it works well.

chr0m1ng commented 8 months ago

I was having the problem on an M1 mac running ios version = Sonoma. I fixed it using the above comments and the following steps...

Pull the github repo and using yarn to compile as per the github readme

git clone https://github.com/curdeveryday/vscode-m5stack-mpy.git
git clean -fdX
yarn cache clean
yarn

Edit serialPortBindingsLoader.js to include 18.15.0 js version....

const copyBindings = () => {
 const nodeJSVersions = ['12.14.1', '12.18.3', '12.4.0', '12.8.1', '14.16.0', '16.13.0', '16.13.2', '16.14.2', '16.17.1', '18.15.0' ];

Install the vs code extension packaging tool... npm install -g vsce

Then created and installed the package...

vsce package
code --install-extension vscode-m5stack-mpy-1.1.10.vsix 

and now it seems to work :-)

This almost worked 100% for me, the only extra thing I had to do was to run npm postinstall before vsce package to create the node_modules/...../18.5.0 files

FyrbyAdditive commented 8 months ago

After finding the stepper driver m5stack arduino example broken, I figured I would give vscode a go and try the micropython support, and here too I am falling at the first hurdle with this problem as this does not work on Visual Studio Code Version: 1.85.1 (Universal) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 on macOS 14.2.1 (apple silicon).

RichardD012 commented 7 months ago

So following these steps and adding the latest node (18.17.1) get the button to show up but now sending to device shows "Cannot read properties of undefined (reading'sendCommand')