sg-wireless / pymakr-vsc

GNU General Public License v3.0
97 stars 25 forks source link

cannot click button 'create project' #276

Closed AlanaAckermans closed 1 year ago

AlanaAckermans commented 1 year ago

Type: Bug

cannot click button 'create project', i have tried uninstalling and installing both vscode and the extension but it stays the same issue. i also cannot open a workspace or do anything at all

Extension version: 2.22.5 VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:35:13.448Z) OS version: Windows_NT x64 10.0.22000 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 1190)| |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
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|7.60GB (1.73GB free)| |Process Argv|--crash-reporter-id 08228522-154e-4aef-b5db-5e01a954cecf| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411cf:30542925 vsaa593:30376534 pythonvs932:30410667 wslgetstarted:30449410 cppdebug:30492333 pylanb8912:30545647 vsclangdf:30486550 c4g48928:30535728 d7fjc500:30543455 dsvsc012:30540252 azure-dev_surveyone:30548225 ```
jakobrosenberg commented 1 year ago

Hi @AlanaAckermans . Thanks for reporting this. Do you have this issue with both Pymakr and Pymakr - Preview? Both are available in the VSCode store.

If so, can I ask you to post your logs from VSCode? You can open them by clicking Help -> Toggle Developer Tools.

AlanaAckermans commented 1 year ago

Hi @jakobrosenberg, I indeed have this issue with both pymakr extensions. These are the logs from VSCode :

[Extension Host] --- Starting Pymakr --- console.ts:137 [Extension Host] 12:05:17.486 info: > [Pymakr] > pymakr v2.22.5 log.ts:313 ERR [Extension Host] 'node' is not recognized as an internal or external command, operable program or batch file. console.ts:137 [Extension Host] 'node' is not recognized as an internal or external command, operable program or batch file. I @ console.ts:137 mainThreadExtensionService.ts:111 Activating extension 'Pycom.pymakr' failed: Command failed: node -v 'node' is not recognized as an internal or external command, operable program or batch file. . $onExtensionActivationError @ mainThreadExtensionService.ts:111 localProcessExtensionHost.ts:298 Extension Host localProcessExtensionHost.ts:299 'node' is not recognized as an internal or external command,operable program or batch file. log.ts:313 ERR command 'pymakr.createProjectPrompt' not found: Error: command 'pymakr.createProjectPrompt' not found at p._tryExecuteCommand (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1692:3532) at p.executeCommand (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1692:3414) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async i.open (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:602:47316) at async l.open (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:602:49092) 3log.ts:313 ERR command 'pymakr.createProjectPrompt' not found: Error: command 'pymakr.createProjectPrompt' not found at p._tryExecuteCommand (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1692:3532) at p.executeCommand (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1692:3414) at async i.open (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:602:47316) at async l.open (vscode-file://vscode-app/c:/Users/alana/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:602:49092) contextKeyService.ts:452 Element already has context attribute: pane, expanded, horizontal

G234i commented 1 year ago

Similar issue here. Installing Node.js (v18.8.0) seems to fix the issue and "Create project" works. @AlanaAckermans try installing a version of node.js and see if your problem persists?

@jakobrosenberg if node.ds is a dependency maybe it should be listed in GET_STARTED.md and/or README.md?

jakobrosenberg commented 1 year ago

@G234i it used to be a dependency, but it shouldn't be anymore.

EDIT: there's a mention here https://github.com/pycom/pymakr-vsc/blob/next/FAQ.md#do-i-need-node

G234i commented 1 year ago

@G234i it used to be a dependency, but it shouldn't be anymore.

EDIT: there's a mention here https://github.com/pycom/pymakr-vsc/blob/next/FAQ.md#do-i-need-node

A quick look at AlanaAckermans's logs - something is calling "node -v", and indeed src/PyMakr.js contains that on line 111.

So I guess that there are still some leftover calls made towards node.js in the code.

PS: I also believe that I saw some "npm" calls in the code and that would be another node.js dependency, unless it is somehow installed standalone by the pymakr extension?

jakobrosenberg commented 1 year ago

@G234i well spotted. That line is actually supposed to detect if node is present and if not, then use prebuilt binaries. It seems it throws an error when node isn't detected.

I've published a new fix on the preview-branch. If it works I'll push it to the stable branch.

I can't test it locally, but it's available on v2.25.2 .

G234i commented 1 year ago

I can confirm that with v2.25.2 the project creation process works after uninstalling node.js. PS: It also works with node.js aswell.

jakobrosenberg commented 1 year ago

Thanks @G234i I'm delighted to hear that. And thanks again for catching spotting the culprit. 😊

jakobrosenberg commented 1 year ago

I'm closing this as resolved as the fix is not available in the preview version.