gabrieldoty / simplify-scorm

Scorm 1.2 Javascript API
MIT License
230 stars 77 forks source link

Cannot read property 'charAt' of undefined #33

Open badal1976 opened 4 years ago

badal1976 commented 4 years ago

After upload the attached scrom content, fail to open the content. Loader is continuously running and behind the page throwing javascript error as mentioned below.

Scrom file Attachment:

Draft 5s training Module SCORM 1.2.zip

Error Details:

Uncaught TypeError: Cannot read property 'charAt' of undefined at cp.QuizState.readNumber (eval at e (CPXHRLoader.js:37), :1374:423) at cp.QuizState.readString (eval at e (CPXHRLoader.js:37), :1376:34) at cp.PlaybackController.restoreObjectsFromState (eval at e (CPXHRLoader.js:37), :1455:20) at Function.cp.resumeValuesFromDataChunk (eval at e (CPXHRLoader.js:37), :1369:460) at cp.PlaybackController.RestoreQuizState (eval at e (CPXHRLoader.js:37), :1496:35) at Function.cp.NewQuizLibraryInit (eval at e (CPXHRLoader.js:37), :982:3) at Function.cp.CPPreInit (eval at e (CPXHRLoader.js:37), :990:246) at Function.cp.ContinueCPInit (eval at e (CPXHRLoader.js:37), :1936:33) at LoadContent (eval at e (CPXHRLoader.js:37), :1368:439) at InitializeExecuted (eval at e (CPXHRLoader.js:37), :1879:36)

xob commented 4 years ago

Did you turn on debugging? To turn on debugging, execute window.API.apiLogLevel = 1; before loading the course.

I would help more, but CPXHRLoader.js is a minified file that is unrelated to Simplify SCORM, and is impossible to debug. Seeing what the course is doing before the error would help understand what is happening.