Strange error - SL3, LMS
Jan 09, 2018
By
Snorre Rubin
I am experiencing a very weird error:
In a quiz, when advancing to a certain slide, I get this error:
This is what the console tells me:
app.min.js:31 Uncaught TypeError: Cannot read property 'toString' of undefined
at m (app.min.js:31)
at s (app.min.js:1)
at D.n.getEncodedString (app.min.js:31)
at D.n.getEncodedValue (app.min.js:31)
at D.n.encodeVariable (app.min.js:31)
at Array.reduce (<anonymous>)
at D.n.getResumeData (app.min.js:31)
at D.n.meetConditionOrReturn (app.min.js:31)
at D.n.s [as getResumeDataOrReturn] (app.min.js:1)
at Object.collectResumeData (app.min.js:20)
11 Replies
Hi Snorre,
Have you tested the file in SCORM Cloud yet? If so, does the same problem happen there?
If you'd like some help with that testing, attach your file here. I'll take care of the rest!
Any update on this? I have the exact same error after performing a JS call, and then clicking the BACK button in a SL3 course (not with latest update as I have had other issues with that update so reverted).
Never fails in SCORMCloud, fails everytime in Cornerstone LMS. Published as HTML5, SCORM2004 vs 3.
Thank you.
Hi Jeff,
It doesn't look like we heard back from Snorre, so I do not have an update to provide here. No associated case for me to take a peek at either.
You mention that this is not happening in SCORM Cloud, so just your LMS? Have you reached out to your Cornerstone team?
Thanks for your reply. This is for a client that uses Cornerstone. I have checked their forums and emailed them but no luck yet. Thx
Hi, I've got the same error : app.min.js:3 Uncaught TypeError: Cannot read property 'toString'
I think the LMS is sending a variable undefined instead of empty string. How can I do to inspect which variable is impacted? It would be easy adding console logs if I had a not minimize file but I just have a app_min.js that I can not read...
Does someone have a solution? or news?
Hi Uta,
I don't see an update from Jeff here, and I'm not sure if he's still subscribed to this discussion.
Were you also using Cornerstone? If so, you may want to try reaching out to their Support or your LMS admin to narrow down what's causing that error.
Let us know if you need anything else!
Hello,
I'm not using Cornerstone and I think the LMS providers won't change anything to their LMS.
I think the LMS is sending an undefined variable instead of empty string and the storyline blocks against that..
Is it the reason to your mind?
Regards,
Uta von Stebut
Chef de projets
14, bd Raymond Poincaré - 92380 Garches
+33 (0)1 47 01 38 85
www.takoma.fr [picto
Good day. Out of office right now but when I return Wednesday I can send you what I used.
Hi Uta,
If you're trying to use some JS to call those variables from your LMS into Storyline, that's something I'll have to defer to the community for as well as it's a bit over my head, and not something we offer support on.
It looks like Jeff may be able to help you when he returns to his office!
Also, it looks like your email signature came through when you replied via email. You can remove that if needed by clicking ‘Edit’ beneath your response. Here’s a quick Peek video if you need help.
Just wanted to update the status on this. Jeff's issue was caused by a JS error.
JS was written to pull the learner name from the LMS and inject it into Storyline as both a first and last name.
SCORM Cloud gives the learner name as Last Name, First Name, but Cornerstone give the learner name as First Name Last Name.
The code was written for SCORM Cloud so it parsed the string with a ", ". When it was moved to Cornerstone, there was no ", " in the name so the first name was undefined and the last name was the full name.
Storyline tries to save its state when leaving the slide, to do that it serializes variables but doesn't check if a variable is undefined. This giving you the error of "Cannot read property 'toString' of undefined".
If you see an error like this, and are using JS to send variables into Storyline, check to make sure that they are not sending in undefined values.
Undefined is the source of my problem!
For clarification then, should I replace the undefined entries in the code with "" or null? Xxx
This discussion is closed. You can start a new discussion or contact Articulate Support.