Error using matlab.addons.installedAddons when using OspreyLoad

I cloned Osprey locally. I did not install GUI components and I am not using the Osprey GUI.
I created a Matlab script in which I add the SPM12 and Osprey paths with Matlab addpath().

When I run this script I get the following error:
Timestamp January 17, 2023 17:26:26 Osprey 2.4.0
Timestamp January 17, 2023 17:26:26 Osprey 2.4.0 OspreyLoad
Error using matlab.addons.installedAddons
Error: File: /export/apps/linux-x86_64/matlab/R2021a/toolbox/matlab/addon_enable_disable_management/matlab/+matlab/+addons/installedAddons.m Line: 33 Column: 8
Unable to find or import ‘com.mathworks.addons_common.notificationframework.InstalledAddOnsCache’. Imported names must end with ‘.*’ or be fully qualified.

Error in osp_Toolbox_Check (line 41)
addons = matlab.addons.installedAddons;

Error in osp_CheckRunPreviousModule (line 79)
[hasSPM,OspreyVersion ] = osp_Toolbox_Check (module,MRSCont.flags.isGUI);

Error in OspreyLoad (line 50)
[~,MRSCont.ver.CheckOsp ] = osp_CheckRunPreviousModule(MRSCont, ‘OspreyLoad’);

Error in run_osprey (line 14)
MRSCont = OspreyLoad(MRSCont);

Am I missing something that still needs to be installed or added to my path?

[edit:20230120] OspreyLoad works if i comment out “%[hasSPM,OspreyVersion ] = osp_Toolbox_Check (module,MRSCont.flags.isGUI);” in file osp_CheckRunPreviousModule.m


Hi @jling

Thanks for reaching out.

What MATLAB version are you on?


R2021a Update 7 (

I believe the toolbox check code failed in 2017b as well.