MATLAB Answers

Why do I receive the error "The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s)," at 0% when installing MATLAB?

126 views (last 30 days)
When installing MATLAB I get the error above at 0% in the installer. The error additionally suggest looking at the installation log. The installation log has the following error:
    at com.mathworks.install.ComponentSizeAggregator.add(
    at com.mathworks.install.ProductInstallerImpl.downloadProducts(
    at com.mathworks.install.ProductInstallerImpl.installProducts(
    at com.mathworks.install.InstallerImpl.install(
    at com.mathworks.installwizard.model.InstallTask.execute(
    at com.mathworks.installwizard.model.AbstractBackgroundTask.execute(
    at com.mathworks.wizard.worker.WorkerImpl.doInBackground(
    at javax.swing.SwingWorker$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
Error: The application encountered an unexpected error and needs to close.  You may want to try re-installing your product(s).  More information can be found at /var/folders/4l/_2c57spd59vcxrz3kb8t3s600000gn/T/mathworks_username.log

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Sep 2017
The issue is likely related to old cached files in the MathWorks folder in Downloads.  Removing this folder will allow the installation to continue.


Show 3 older comments
Birte Toussaint
Birte Toussaint on 5 Apr 2018
I have deleted th MathWorks folder but am still getting the error message when trying to install a new toolbox. Is there any workaround?
Steven Lord
Steven Lord on 5 Apr 2018
I recommend you contact Technical Support directly using the Contact Us link in the upper-right corner of this page. They can work with you to determine why you're still experiencing this problem and how to correct or avoid it.

Sign in to comment.

More Answers (3)

yangyang on 11 Jul 2017
I have the exactly same problem. How did you fix this?

  1 Comment

Anjuri Kelaiya
Anjuri Kelaiya on 21 Feb 2018
Earlier I was trying to install MATLAB 2017b with the floating licenses assigned and it was throwing above error. After that, I have downloaded MATLAB 2017b from mathworks site with the trial license key and it got successfully installed with trial license key. So, I guess there is some problem with the license key which you are using. Please check it and try to install it with proper license key. It should work.

Sign in to comment.

Vasco Sampaio
Vasco Sampaio on 21 Feb 2018
Same problem here! Any updates on this issue? Thanks


Piriya Sivalingam
Piriya Sivalingam on 7 Jan 2019
You have to delete the folder containing the preleases of MATLAB and also delete the "_temp_matlab_xxxxx_xxxxx" folder which also can contain the preleases file.
So that MATLAB can be installed into a new clean directory.
It worked fine for me.

Sign in to comment.

thurdsak lucksanahut
thurdsak lucksanahut on 7 Mar 2019
You have to change the regional setting to English before matlab installation. Go to Control Panel->Region and Language->Formats->Format:English


Sign in to comment.


No tags entered yet.

Community Treasure Hunt

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

Start Hunting!