-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Describe the bug
The MATLAB Language Server (matlabls) fails to attach properly to MATLAB R2024b when running under Node.js v22.19.0. The process logs show repeated connection attempts, followed by an UnhandledPromiseRejection error and automatic server restart.
To Reproduce
- Launch VS Code with MATLAB extension enabled.
- Open any
.mfile in the workspace. - Wait for MATLAB Language Server to initialize.
- Observe repeated "Retrying attach" and "UnhandledPromiseRejection" errors in the output log.
Expected behavior
The MATLAB Language Server should attach successfully to MATLAB R2024b without throwing unhandled promise rejections or restarting repeatedly.
Screenshots
(node:7576) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use Code --trace-deprecation ... to show where the warning was created)
(10:01:51) matlabls: Log Directory: C:\Users\prabh\AppData\Local\Temp\matlabls_7576
(10:10:28) matlabls: Launching MATLAB...
(10:10:28) matlabls: Found cached licensing information...
(10:10:28) matlabls: Directory created or already exists: C:\Users\prabh.matlab\MWI\hosts\prabha
(10:10:30) matlabls: Successfully fetched entitlements
Using cached Online Licensing to launch MATLAB.
(10:10:30) matlabls: File written successfully to C:\Users\prabh.matlab\MWI\hosts\prabha\proxy_app_config.json
(10:10:38) matlabls: Started MATLAB (session 1)
(10:10:38) matlabls: MATLAB session 1 connected to R2024b
[Error - 10:10:41 AM] (10:10:41) matlabls - ERROR: Timeout when attaching to release: 24b
(10:10:41) matlabls: Retrying attach
(10:10:41) matlabls: MVM attach success
(10:10:41) matlabls: Adding workspace folder(s) to the MATLAB Path:
d:\PRE
(10:10:42) matlabls: CWD set to: d:\PRE
node:internal/process/promises:392
new UnhandledPromiseRejection(reason);
^
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".
at throwUnhandledRejectionsMode (node:internal/process/promises:392:7)
at processPromiseRejections (node:internal/process/promises:475:17)
at process.processTicksAndRejections (node:internal/process/task_queues:106:32) {
code: 'ERR_UNHANDLED_REJECTION'
}
Node.js v22.19.0
[Info - 10:10:43 AM] Connection to server got closed. Server will restart.
true
(10:10:44) matlabls: Log Directory: C:\Users\prabh\AppData\Local\Temp\matlabls_17024
(node:17024) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use Code --trace-deprecation ... to show where the warning was created)
Useful Information
- MATLAB Version: R2024b
- OS Version: Windows 10 (x64)
- VS Code Version: 1.105
Additional context
Add any other context about the problem here.