LMS Error: Synchronous XMLHttpRequest on the main thread is deprecated... because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/
Copy link to clipboard
Copied
We're getting the following error when uploading a Captivate 8 course on a client LMS:
LMS Error: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/
A white screen shows, and the course content never loads.
This course functions fine in all versions and all browsers except for this specific new LMS. Interestingly, this is the first version of this course that we've done using Captivate 8, whereas previous versions were published with Captivate 6, and the legacy courses have ported to the new LMS just fine.
It seems to me like this would be an issue with the LMS, and the only reason the Synchronous AJAX would be called would be to set/get data from the LMS...
We'll keep digging on our end, any help or guidance is appreciated.
-Nick
Copy link to clipboard
Copied
Have you tried publishing to a different SCORM version for that LMS?
Copy link to clipboard
Copied
That's a very good callout Rod! I'll ping our developer in the AM, publish to all the versions we can, send all the packages over for testing, and see what sticks. Thanks for the tip!!
Best.
-Nick
Copy link to clipboard
Copied
I think your issue is because Captivate uses LazyLoader to load Script files in the following function in the index.html:
var lJSFiles = [ 'assets/js/jquery-1.6.1.min.js','assets/js/OpenAjaxManagedHub-all.js','assets/js/CPM.js' ];
cpXHRJSLoader.js(lJSFiles,function()
{
//console.log("js loaded");
lJSLoaded = true;
constructDIVs();
});
This ensures that the CPM.js is loaded before the constructDIVs function is called. I don't think a SCORM version is going to solve the issue.
Your course content is in the CPM.js which is then loaded into DIVs created with the contructDIVs function. The whole index page would need to be re-written to get rid of the cpXHRJSLoader.js.
.
Copy link to clipboard
Copied
Makes sense on the lazy loading of the scripts...so it'd be the server that is "disallowing" the synchronous requests, right...is there a server setting that could be tweaked on their end to allow for this?
What is the rewrite? Remove xpXHRJSLoader.js and just inline the other script files (in order) into the index.html file?
<script></script>
...
...
<script></script>
etc.?
You guys rock!! Thanks for giving us ideas to at least try. #FistBump
-Nick
Copy link to clipboard
Copied
Well, and then running the constructDIVS() function after all scripts load.
<script src="script1.js"></script>
...
...
<script src="lastScript.js"></script>
<script>
constructDIVs();
</script>
Copy link to clipboard
Copied
That's the theory.
Copy link to clipboard
Copied
I've got the SCORM package from the developer, and it doesn't appear the xpXHRJSLoader.js exists in the package...here's a screenshot of what we have in the SCORM package.
I'm not seeing any XHR requests in any of the JS files included in the output either...strange. Thanks for your tips, any further help/ideas would be much appreciated, I'm very new to Captivate & troubleshooting publish issues.
Best.
- Nick

