How to resolve the connector.​ensureServ​iceOn error when the MATLAB starts?

23 views (last 30 days)
When I am starting MATLAB, I am getting the following errors on the command window:
Unable to resolve the same connector.ensureServiceOn.
Unable to resolve the same connector.resetLocalePreference
or
Undefined function or variable 'connector.ensureServiceOn'.
Undefined function or variable 'mls.internal.FevalService.init'.
Undefined function or variable 'connector.internal.lifecycle.callConnectorStarted'.
Undefined variable “connector” or class “connector.resetLocalePreference”.
How can I resolve the above errors?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Jul 2022
Edited: MathWorks Support Team on 22 Jul 2022
These types of issues happen due to path issues and also when the cache is not up to date. The following steps will help resolve this issue. 
Before modifying the search path, it is important to take a backup of your 'pathdef.m' file, which can be located by using the following command. Ensure that the copy is placed in a folder outside of the MATLAB path.
>> which -all pathdef
After taking the backup, please execute the following commands in the MATLAB Command Window to restore the default MATLAB search path and rehash the toolbox cache:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations 
After this step, please use MATLAB/ Simulink to see if the issue occurs again. If the issue is resolved, then you may want to save the new MATLAB search path by executing the following command:
>> savepath
NOTE: This will remove any custom paths you may have created.
The following MATLAB Answers post is an additional resource on how to back them up:

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!