Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATLAB was unable to start #58

Closed
denissagaydak opened this issue Sep 19, 2023 · 14 comments
Closed

MATLAB was unable to start #58

denissagaydak opened this issue Sep 19, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@denissagaydak
Copy link

denissagaydak commented Sep 19, 2023

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 denissagaydak added the bug Something isn't working label Sep 19, 2023
@dklilley
Copy link
Member

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.

@denissagaydak
Copy link
Author

denissagaydak commented Sep 21, 2023

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

@M-Moschetti
Copy link

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

@dklilley
Copy link
Member

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.

@M-Moschetti
Copy link

M-Moschetti commented Jan 11, 2024 via email

@dklilley
Copy link
Member

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

@M-Moschetti
Copy link

M-Moschetti commented Jan 12, 2024 via email

@MiuKaShi
Copy link

Same problem in MATLAB-language-server, mathworks/MATLAB-language-server#33.
So May cause by MATLAB-language-server ?

@dklilley
Copy link
Member

dklilley commented Apr 4, 2024

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?

@M-Moschetti
Copy link

M-Moschetti commented Apr 5, 2024 via email

@dklilley
Copy link
Member

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

@dklilley
Copy link
Member

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

@sbom641
Copy link

sbom641 commented Jul 23, 2024

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.

@dklilley
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants