This will be down to a checklist not being completed - If you have done this then ensure that the syssetuplog and retailsetuplog contain the right values and actions are finished.
A common issue is the need to add a row to the retailsetuplog table for the following
name - SysCheckList_Upgrade
description - Finished
retailbuild - 6.1.1108.0
Below is some code that I used to solve the issue of retail beta images.
It goes through the logic surrounding SysCheckList_Upgrade::isUpgradeMode - this was the reason for empty workspaces and EP URL not being found when configured.
Please keep in mind that this was from the retail beta and the version number used in the insert is because of that you must ensure that the version number is corect for your version if retail is in used on your system.
------------
RetailSetupLog retailSetupLog;
#SysCheckList
info (strFmt("EP Site: %1", EPGlobalParameters::homepageSiteURL()));
info(strFmt("SysCheckList_Upgrade-isUpgradeMode : %1", SysCheckList_Upgrade::isUpgradeMode()));
info(strFmt("SysSetupLog-SysCheckList_Upgrade-Finished: %1", SysSetupLog::find(classStr(SysCheckList_Upgrade), #CheckListFinished).RecId!=0));
info(strFmt("Retail config enabled: %1", isConfigurationkeyEnabled(configurationKeyNum(Retail))));
retailSetupLog = RetailSetupLog::find(classStr(SysCheckList_Upgrade), #CheckListFinished);
info(strFmt("RetailSetupLog-SysCheckList_Upgrade-Finished: %1", retailSetupLog.RecId!=0));
if (retailSetupLog.RecId == 0)
{
info("created RetailSetupLog entry");
retailSetupLog.clear();
retailSetupLog.Description = #CheckListFinished;
retailSetupLog.Name = classStr(SysCheckList_Upgrade);
retailSetupLog.RetailBuild = '6.0.968.281';
retailSetupLog.insert();
info (strFmt("EP Site: %1", EPGlobalParameters::homepageSiteURL()));
info(strFmt("SysCheckList_Upgrade-isUpgradeMode : %1", SysCheckList_Upgrade::isUpgradeMode()));
}