Search code examples
javascriptscormscorm2004

SCORM 2004 Error 403


I keep getting this error but there is nothing I can find about it on the Internet. What I am trying is get value of cmi.location but Chrome console and SCORM Cloud says

Set Error State: 403 - The Location field has not been set for this SCO


here is my code

locIdentifier = Number(scorm.get("cmi.location"));

Solution

  • 403: "Data Model Element Value Not Initialized"

    This just means there was no value so it's not really an error. SCORM has a few of these.

    The Specification requires the Runtime API to throw that error. I consider a few non-actionable errors within the spec which would of been handy if they were called warnings instead of errors.

    If your cmi.entry is 'ab-initio' you would have no reason to request cmi.location or cmi.suspend_data for example. It's a clean attempt. However, some platforms fail to set cmi.entry to 'resume' when the SCO is continuing an attempt. So you also have to watch for a '' blank entry type too.

    Hope that helps.