MATLAB-extension-for-vscode icon indicating copy to clipboard operation
MATLAB-extension-for-vscode copied to clipboard

MATLAB was unable to start

Open denissagaydak opened this issue 1 year ago • 11 comments

Windows 10 21H2 VSCode 1.82.2 MATLAB Extension 1.1.3 MATLAB 2022b

Tried restarting/closing VSCode, MATLAB and restarting PC. Tried installing MATLAB in folder without whitespace. Tried MATLAB 2021b and previous versions of MATLAB Extension;

image

denissagaydak avatar Sep 19 '23 10:09 denissagaydak

Can you provide the following info:

  1. Launch MATLAB separately and run matlabroot. Is the value you have provided in the "Install Path" setting the same as what MATLAB is outputting?
  2. Can you confirm that there is no trailing or preceding whitespace in the "Install Path" text field?
  3. In VS Code, open the Output tab (Ctrl+Shift+U) and select "MATLAB Language Server" from the dropdown. Please share any errors displayed in this log.

dklilley avatar Sep 20 '23 15:09 dklilley

Hello @dklilley,

  1. matlabroot returns the same path, as specified in "Install Path" setting image
  2. Yes, there are no extra whitespaces in "Install Path" setting image
  3. Here is "MATLAB Language Server" output : (08:58:36) matlabls: Launching MATLAB... [Error - 8:58:36 AM] (08:58:36) matlabls - ERROR: Error launching MATLAB: spawn C:\Program Files\MATLAB\R2022b\bin\matlab ENOENT [Error - 8:58:36 AM] (08:58:36) matlabls - ERROR: Error launching MATLAB: Error [Error - 8:58:36 AM] (08:58:36) matlabls - ERROR: Error launching MATLAB: Error: spawn C:\Program Files\MATLAB\R2022b\bin\matlab ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) (08:58:36) matlabls: MATLAB process terminated

denissagaydak avatar Sep 21 '23 07:09 denissagaydak

Same issue.

Windows 10.0.19045 22H2 VS Code 1.85.1 VS Code MATLAB extension v1.1.5 MATLAB 2023b

Steps taken:

  • Restarted VS Code, MATLAB and PC.
  • Reinstalled VS Code and MATLAB extension.
  • Quadruple checked the MATLAB path in the extension and ensured it was the same as the 'matlabroot' output.

MATLAB Language Server output:

(13:17:04) matlabls: Log Directory: C:\Users\z5165928\AppData\Local\Temp\matlabls_1052 (13:17:04) matlabls: Launching MATLAB... [Error - 1:17:04 PM] (13:17:04) matlabls - ERROR: Error finding mlint executable in C:\Program Files\MATLAB\R2023b\bin [Error - 1:17:04 PM] (13:17:04) matlabls - ERROR: Error launching MATLAB: spawn C:\Program Files\MATLAB\R2023b\bin\matlab ENOENT [Error - 1:17:04 PM] (13:17:04) matlabls - ERROR: Error launching MATLAB: Error [Error - 1:17:04 PM] (13:17:04) matlabls - ERROR: Error launching MATLAB: Error: spawn C:\Program Files\MATLAB\R2023b\bin\matlab ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) (13:17:04) matlabls: MATLAB process terminated

M-Moschetti avatar Jan 11 '24 02:01 M-Moschetti

Thanks for reporting this. I have not been able to reproduce this on my machine, but here are a few things to try/check:

  1. Is there any leading/trailing whitespace in the installPath setting's text field in VS Code? This probably isn't the issue, but has been known to cause problems.
  2. From a system command window, does running the following (including the double quotes) launch MATLAB correctly? "C:\Program Files\MATLAB\R2023b\bin\matlab.exe"
  3. Does running matlab from a system command window launch MATLAB? On Windows, the extension will attempt to launch MATLAB with the matlab command if no path is provided in the setting. If this command works on your machine, try clearing the installPath setting.

dklilley avatar Jan 11 '24 15:01 dklilley

I can confirm that there are no leading/trailing white spaces.

Both options 2. and 3. successfully launch MATLAB. Clearing the InstallPath settings changed nothing.

Thanks for your help.

M-Moschetti avatar Jan 11 '24 16:01 M-Moschetti

One more quick question - Are you running VS Code from the Windows Subsystem for Linux (WSL)?

dklilley avatar Jan 12 '24 14:01 dklilley

No, I am not.

On Sat, 13 Jan 2024, 1:52 am Duncan Lilley, @.***> wrote:

One more quick question - Are you running VS Code from the Windows Subsystem for Linux (WSL)?

— Reply to this email directly, view it on GitHub https://github.com/mathworks/MATLAB-extension-for-vscode/issues/58#issuecomment-1889419932, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARXTSSGCJAXYS4DRD73A6F3YOFE2RAVCNFSM6AAAAAA46CVIMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBZGQYTSOJTGI . You are receiving this because you commented.Message ID: @.***>

M-Moschetti avatar Jan 12 '24 23:01 M-Moschetti

Same problem in MATLAB-language-server, https://github.com/mathworks/MATLAB-language-server/issues/33. So May cause by MATLAB-language-server ?

MiuKaShi avatar Jan 13 '24 14:01 MiuKaShi

Hi all, If you have a chance, can you try this again with the new release of the extension (v1.2.1) and let us know if you are still encountering this issue?

dklilley avatar Apr 04 '24 17:04 dklilley

I no longer have access to the offending machine, so I cannot test this. My apologies.

On Fri, Apr 5, 2024 at 4:27 AM Duncan Lilley @.***> wrote:

Hi all, If you have a chance, can you try this again with the new release of the extension (v1.2.1) and let us know if you are still encountering this issue?

— Reply to this email directly, view it on GitHub https://github.com/mathworks/MATLAB-extension-for-vscode/issues/58#issuecomment-2037785746, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARXTSSF5B2S5R7VH6REDN3DY3WEQTAVCNFSM6AAAAAA46CVIMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZXG44DKNZUGY . You are receiving this because you commented.Message ID: @.***>

M-Moschetti avatar Apr 05 '24 00:04 M-Moschetti

@M-Moschetti no worries, thank you for the response!

dklilley avatar Apr 10 '24 15:04 dklilley

I believe this is likely resolved. Closing this issue for now.

dklilley avatar Jun 26 '24 17:06 dklilley

I am experiencing the same problem VS code - 1.91.1 MATLAB - 2023b Matlab Extension for VS Code - v1.2.4 Windows - 11Pro 23H2

image

image

This is the only error message I keep getting: image (I do not get/see any errros outputed to the OUTPUT tab in VS Code)

Edit 1: Running matlab from the system command window succesfully does launch Matlab

Any help is appreciated.

sbom641 avatar Jul 23 '24 10:07 sbom641

Hi @sbom641 , since this issue is closed, can you open a new issue for this? Thanks!

dklilley avatar Jul 23 '24 12:07 dklilley