Forum Discussion
Trouble with CMI5 compliance
Hello all,
I was given the task to create a CMI5 compliant course and made a brief one for trial in Storyline 360. I cannot get it to work in Moodle with the cmi5 plugin. It can never load the AU because it receives this error:
Failed to initialize: Failed to start AU - load LMS Launchdata: Error: Failed to retrieve LMS.Launchdata State 403
I eventually ran the error down to a function in the file created by articulate storyline "scorm_driver.js" To this function:
@method start
@param {Function} callback Function to call on error or success
@param {Object} [events] Functions to run at specific execution points
@param {Function} [events.postFetch] Function to run after retrieving fetchUrl result
@param {Function} [events.launchData] Function to run after retrieving launch data
@param {Function} [events.learnerPrefs] Function to run after retrieving learner preferences
@param {Function} [events.initializeStatement] Function to run after saving initialization statement
*/
start: function (callback, events) {
this.log("start");
var self = this;
events = events || {};
self.postFetch(
function (err) {
var prefix = "Failed to start AU - ";
if (typeof events.postFetch !== "undefined") {
events.postFetch.apply(this, arguments);
}
if (err !== null) {
callback(new Error(prefix + " POST to fetch: " + err));
return;
}
self.loadLMSLaunchData(
function (err) {
if (typeof events.launchData !== "undefined") {
events.launchData.apply(this, arguments);
}
if (err !== null) {
callback(new Error(prefix + " load LMS LaunchData: " + err));
return;
}
self.loadLearnerPrefs(
function (err) {
if (typeof events.learnerPrefs !== "undefined") {
events.learnerPrefs.apply(this, arguments);
}
if (err !== null) {
callback(new Error(prefix + " load learner preferences: " + err));
return;
}
self.initialize(
function (err) {
if (typeof events.initializeStatement !== "undefined") {
events.initializeStatement.apply(this, arguments);
}
if (err !== null) {
callback(new Error(prefix + " send initialized statement: " + err));
return;
}
callback(null);
}
);
}
);
}
);
}
);
},
The course DOES work in SCORM cloud, but not in Moodle. So I decided to test it with the CATAPULT test suite for CMI5 compliance (https://aicc.github.io/CMI-5_Spec_Current/catapult/). First even though I told it to make index.html it still outputted index_lms.html. Not a big deal, I manually fixed, then ran in the test suite.
It also failed at the load AU part but this time the error was: In DisplayError, strMessage=Failed to initialize: Failed to start AU - POST to fetch: Error: Aborted, offline, or invalid CORS endpoint. I am including logs below.
My question is, am I doing something wrong when I export the project to cmi5? Is this a known issue? Thank you!
The logs:
0:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - <h1>SCORM Driver starting up</h1>
1:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - ----------------------------------------
2:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - ----------------------------------------
3:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In Start - Version: 7.7.0 Last Modified=03/27/2025 11:09:16
4:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - Browser Info (Netscape 5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36)
5:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - URL: http://localhost:3398/player/content/1/37/index.html?endpoint=https%3A%2F%2Flocalhost%2Fapi%2Fv1%2Fsessions%2F44%2Flrs&fetch=https%3A%2F%2Flocalhost%2Fapi%2Fv1%2Fsessions%2F44%2Ffetch&actor=%7B%22name%22%3A%22Tabitha+Spinka%22%2C%22account%22%3A%7B%22name%22%3A%22d8c4b2a%22%2C%22homePage%22%3A%22urn%3Acatapult-cts%3Aafcff76%22%7D%2C%22objectType%22%3A%22Agent%22%7D&activityId=https%3A%2F%2Fw3id.org%2Fxapi%2Fcmi5%2Fcatapult%2Fplayer%2Fcourse%2F46ee9fba-b579-4833-9dfd-c51045308c6f%2Fau%2F0®istration=58b161e1-30c8-4895-b7ef-3b566521992e
6:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - ----------------------------------------
7:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - ----------------------------------------
8:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In ClearErrorInfo
9:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - GetQueryStringValue Element 'StandAlone' Not Found, Returning: empty string
10:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - GetQueryStringValue Element 'ShowDebug' Not Found, Returning: empty string
11:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - strStandAlone= strShowInteractiveDebug=
12:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - Standard From Configuration File - CMI5
13:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - Using Standard From Configuration File - CMI5
14:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In LMSStandardAPI strStandard=CMI5
15:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - Calling Standard Initialize
16:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In CMI5_Initialize
17:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In CMI5_GetLaunchUrl
18:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - CMI5_Initialize - instantiating cmi5 object from launch URL = http://localhost:3398/player/content/1/37/index.html?endpoint=https%3A%2F%2Flocalhost%2Fapi%2Fv1%2Fsessions%2F44%2Flrs&fetch=https%3A%2F%2Flocalhost%2Fapi%2Fv1%2Fsessions%2F44%2Ffetch&actor=%7B%22name%22%3A%22Tabitha+Spinka%22%2C%22account%22%3A%7B%22name%22%3A%22d8c4b2a%22%2C%22homePage%22%3A%22urn%3Acatapult-cts%3Aafcff76%22%7D%2C%22objectType%22%3A%22Agent%22%7D&activityId=https%3A%2F%2Fw3id.org%2Fxapi%2Fcmi5%2Fcatapult%2Fplayer%2Fcourse%2F46ee9fba-b579-4833-9dfd-c51045308c6f%2Fau%2F0®istration=58b161e1-30c8-4895-b7ef-3b566521992e
19:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: constructor http://localhost:3398/player/content/1/37/index.html?endpoint=https%3A%2F%2Flocalhost%2Fapi%2Fv1%2Fsessions%2F44%2Flrs&fetch=https%3A%2F%2Flocalhost%2Fapi%2Fv1%2Fsessions%2F44%2Ffetch&actor=%7B%22name%22%3A%22Tabitha+Spinka%22%2C%22account%22%3A%7B%22name%22%3A%22d8c4b2a%22%2C%22homePage%22%3A%22urn%3Acatapult-cts%3Aafcff76%22%7D%2C%22objectType%22%3A%22Agent%22%7D&activityId=https%3A%2F%2Fw3id.org%2Fxapi%2Fcmi5%2Fcatapult%2Fplayer%2Fcourse%2F46ee9fba-b579-4833-9dfd-c51045308c6f%2Fau%2F0®istration=58b161e1-30c8-4895-b7ef-3b566521992e
20:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: setFetch: https://localhost/api/v1/sessions/44/fetch
21:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: setLRS: https://localhost/api/v1/sessions/44/lrs undefined
22:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - TinCan.LRS: constructor
23:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - TinCan.LRS: init
24:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - TinCan.LRS: adding trailing slash to endpoint
25:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - CMI5_Initialize - calling start on cmi5 instance
26:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: start
27:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: postFetch
28:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: sendRequest using XMLHttpRequest
29:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: sendRequest using XMLHttpRequest - async: undefined
30:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In IsLoaded, returning -false
31:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: xhr.onreadystatechange - xhr.readyState: 4
32:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: requestComplete: false, xhr.status: 0
33:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: [warning] There was a problem communicating with the server. Aborted, offline, or invalid CORS endpoint (0)
34:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: postFetch::cbWrapper
35:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: postFetch::cbWrapper 0
36:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - cmi5.js: postFetch::cbWrapper {}
37:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - CMI5_Initialize - cmi5 start failed: Error: Failed to start AU - POST to fetch: Error: Aborted, offline, or invalid CORS endpoint
38:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In InitializeExecuted, blnSuccess=false, strErrorMessage=Failed to initialize: Failed to start AU - POST to fetch: Error: Aborted, offline, or invalid CORS endpoint
39:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - ERROR - LMS Initialize Failed
40:Thu Mar 27 2025 11:19:06 GMT-0400 (Eastern Daylight Time) - In DisplayError, strMessage=Failed to initialize: Failed to start AU - POST to fetch: Error: Aborted, offline, or invalid CORS endpoint
41:Thu Mar 27 2025 11:19:08 GMT-0400 (Eastern Daylight Time) - In IsLoaded, returning -false
4 Replies
Hi MBohland,
I noticed you modified the published output when you tested it in your LMS.
First even though I told it to make index.html it still outputted index_lms.html. Not a big deal, I manually fixed, then ran in the test suite.
Would you mind testing the output in another LMS that does not require course modification? Since your course works in SCORM Cloud, we can't be certain if the changes being made to the published output are causing the problem.
Based on experience, if a course works in SCORM Cloud, there's a high probability that something in your LMS is preventing it from getting the same results. This usually requires modification or configuration changes to the LMS, which we don't support. I recommend comparing the LMS debug logs from SCORM Cloud with those from Moodle/Catapult LMS for a clearer idea of what's happening.- MBohlandCommunity Member
Thanks so much for getting back with me. Worked on debugging this with a team member. He pointed out the name change error on my part. Turns out the test suite does not need it to be index.html. So I corrected, didn't change and retested. I am still having the same issue. I tried exporting with LRS credentials too, just in case, to see if that helps. So far nothing. I will also look at the logs from Scorm cloud.
- MBohlandCommunity Member
Thanks Jose,
I originally thought it was just a Moodle problem, but with it not working on the Catapult test suite, which is used for cmi5 compliance, I'm wanting to investigate that.
Hello MBohland,
Good call on testing in SCORM Cloud! Your LMS testing results usually indicate that the behavior is LMS-specific. I would recommend posting your question in Moodle's community to get more eyes on the issue from people who are more used to troubleshooting Moodle issues.