mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab
MIT License
234 stars 15 forks source link

Error while communicating with MATLAB #76

Closed mrtnbrst closed 4 months ago

mrtnbrst commented 10 months ago

Describe the bug Extension crashes on every occasion where a running MATLAB instance is required (MATLAB license available, MATLAB is also running with GUI at the same time)

To Reproduce Steps to reproduce the behavior:

  1. Start VSCode
  2. Edit .m files
  3. Crash of MATLAB extension, which leads to intellisense, formatting and other features not working at any point

This description is very vague - what other information might be interesting / relevant?

Expected behavior Should be able to use the features described in the README.

Screenshots 2023-11-20 13_27_30-matlab not running 2023-11-20 13_27_54-matlab was closed 2023-11-20 13_28_28-matlab extension log within vscode

Useful Information VSCode: Version: 1.84.2 (user setup) Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:51:52.184Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0

OS: Windows_NT x64 10.0.19045

Additional context Log files: languageServerLog.txt matlabLog.txt matlabls_conn.json

VSCode settings: image

dklilley commented 10 months ago

Thank you for reaching out about this! We have had trouble reproducing this ourselves, and would like your assistance to look into this further.

Can you reach out to support@mathworks.com and reference this issue? This will allow us to investigate further and avoid sharing more sensitive log files over GitHub.

eric-dishman-ctct commented 10 months ago

I was having a same issue today with the MATLAB language server. I recently changed the proxy environment variables. I noticed that I would get an error when trying to check for updates of VSCode.

net::ERR_PROXY_CONNECTION_FAILED

I deleted the proxy environement variables and restarted VSCode. After this, I can check for updates as well as connect to the MATLAB language server.

Hope this helps.

mrtnbrst commented 10 months ago

I was having a same issue today with the MATLAB language server. I recently changed the proxy environment variables. I noticed that I would get an error when trying to check for updates of VSCode.

net::ERR_PROXY_CONNECTION_FAILED

I deleted the proxy environement variables and restarted VSCode. After this, I can check for updates as well as connect to the MATLAB language server.

Hope this helps.

Thanks for your reply. That's what I also found out after playing around with the http_proxy and https_proxy environment variables. Unfortunately removing those is not an option for me right now, as they are required for other tools like npm.

jankap commented 10 months ago

I do have the same issues, see also #38 I assume it's a proxy issue. My company has to use ZScaler.

mrtnbrst commented 10 months ago

Update from the conversation with support@mathworks.com: The support ticket is still open, the responsible developer is currently looking at the issue.

eric-dishman-ctct commented 10 months ago

@mrtnbrst , One other thing that I have noticed is that if I delete my proxy environment variables. I have to restart my computer in order to get the extension to connect again. Can you pass that information along to the developer please? Thanks.

mrtnbrst commented 10 months ago

@mrtnbrst , One other thing that I have noticed is that if I delete my proxy environment variables. I have to restart my computer in order to get the extension to connect again. Can you pass that information along to the developer please? Thanks.

Assuming that you are using windows I think that's very common and not a Matlab specific issue.

Can you try restarting explorer.exe from task manager to refresh the environment variables and see if that helps? Afterwards you still have to restart VSCode.

eric-dishman-ctct commented 10 months ago

Ah, yes I am on Windows. I'll try that next time. Thanks.

wzh4464 commented 10 months ago

My apple silicon M1 have the same problem. I am not using any proxy.

dklilley commented 9 months ago

@wzh4464 , if you do not have a proxy set up, this may be a separate issue. Can you reach out to support@mathworks.com and request an escalation so we can look into this further?