JavaScript errors in SL360
Aug 11, 2017
We've been using SL on our LMS with no issues for years. In recent months, the LMS began randomly displaying an alert (JavaScript alert("An error occurred in the course")) that the course had an uncaught JavaScript error. Sadly, the error description isn't reported so I've got no further information to hand over. Once more, this isn't reproducible on-demand, so handing over the course won't help.
I have seen this error in my own testing and customers have also reported this error (with screenshots).
I assume(?) SL doesn't install an uncaught JS error handler at window-top, so testing by Articulate QA and Developers could be experiencing the same JavaScript error at random times, but the error isn't reported (or alerted) and the error remains unidentified and unresolved.
Sam
12 Replies
Hi Sam,
We don't have a Javascript error handler, but our team is happy to take a look at try to recreate the error to figure out what's occurring.
With SL360, there are some Javascript set ups that used to work in SL2 and earlier, but no longer work in 360 due to changes in our publishing and output. We have that reported to our team and are keeping an eye on it to evaluate how many customers are impacted and what impact it has on courses.
If you'd like our team to take a look, can you upload a copy here to our Support Engineers?
If there were a known way to recreate the error I would upload a copy right now.
Interesting production code policy to discard an error rather than log it in a retrievable container, or provide a soft notification.
Sam
Hi Sam,
Did you use Javascript code in Storyline, or if there error generated from your LMS? If it's a newly seen error, perhaps the LMS changed something about how it's being presented to users?
Have you reached out to them to see if they had any thoughts?
We've not added any JavaScript of our own.
Our LMS has always fielded uncaught JavaScript errors in courses. This error is something new that started around Q2 of this year.
Sam
Hi Sam,
If the Javascript error is only coming from code in your LMS and not something you've added into Storyline, I'd recommend reaching out to your LMS Admin directly.
Please feel free to keep us posted in case it's something that would help others in the community!
I guess I hadn't made the situation clear. The LMS is catching uncaught course errors. The exact line of code the LMS applies to the course frame is:
window.frames[0].onerror = function(){alert(window.opener.Translator.LESSON_ERROR); return true;}
I got this from the LMS vendor who pointed to Articulate. The suggestion is that Storyline should install a similar line to catch "uncaught" errors and handle them in an appropriate manner, such as soft reporting or error logging.
Sam
Hi Sam,
Sorry to have misunderstood you - but I did pass this forum discussion along to my team. If these error messages are new or recent, I'd also push back on your LMS admin to see if they had further info, and take a look at if it's happening in every supported browser or just particular ones.
<Office Space Voice>Yeah... that would be great...
Seriously, I tried my best to get the LMS folks to at least alert the error description which is tossed away. Their argument which I don't agree with is that the learner would only get confused.
If we're ever to catch and identify these uncaught JavaScript errors, some top-Window error catch routine must be implemented by Articulate.
Sam
I had to write an error handler to catch this. It happens in HTML5, in app.min.js, using Google Chrome, latest version. It isn't repeatable on demand.
The physical path is intentionally redacted for privacy below.
Uncaught TypeError: Cannot read property 'close' of null", "source":"REDACTED/html5/lib/scripts/app.min.js",
"lineNumber":26,
"columnNumber":11015,
"name":"TypeError",
"errorMessage":"Cannot read property 'close' of null"
This learner didn't get their completion recorded on the LMS.
Can Articulate chase this down and fix it?
Sam
Hi Sam! Thanks for sharing the additional details. What LMS are you utilizing? So, when the error is happening the user completion is not being reported, is that correct? I assume you still cannot make this consistently happen.
The LMS shouldn't be a factor. We had to modify the LMS frameset to catch the error generated in SL 360 to get these details.
Hi Sam,
Magnus let us know that you two were in touch regarding this issue, so he'll have the team take a look.
This discussion is closed. You can start a new discussion or contact Articulate Support.