Copy link to clipboard
Copied
I am using Captivate classic and I have published a project and uploaded to the web. When I run the project I get incesent error messages in console - Uncaught SyntaxError: "[object Object]" is not valid JSON.
This seems to be pointing to the CPM.js and CPXHRLoader.js files.
The main problem is that if i have any custom JS in the project, it will not run any of the functions and the project grinds to a halt. Any suggestions on how to fix this? I have also tried taking out all custom JS and I still get the errors in console, but the project plays normally then.
Does the webserver support JSON? It is used for PNG images.
I suspect in that case that it is linked with your custom JS. Sorry, I am not a JS expert, my focus is on Captivate itself and all of its features.
Copy link to clipboard
Copied
Does the webserver support JSON? It is used for PNG images.
Copy link to clipboard
Copied
Yes. I am using firebase hosting.
Copy link to clipboard
Copied
I suspect in that case that it is linked with your custom JS. Sorry, I am not a JS expert, my focus is on Captivate itself and all of its features.
Copy link to clipboard
Copied
Something that I have noticed also is that if i have external JS in the project, it will run without problem the first time, but the second time it throws an error. For instance if a user tries to login, it works the first time. But if they enter the incorrect details, for instance, and need to try again, it doesn't work.
Copy link to clipboard
Copied
I created a brand new Captivate Classic project.
It consists of one page. The only content is text blocks.
Completion/success is based on page views.
When I upload it to SCORM Cloud as a test, it also throws a constant stream of JSON parsing errors exactly like what saadlaws is seeing.
Copy link to clipboard
Copied
Which exact version are you using? The full number can be found under Help, About Captivate.
Do you use PNG images? They result in JSON files on publishing.
Copy link to clipboard
Copied
Version 11.8.2.254
No images at all. It's literally a one page project with only 2 text labels. The errors begin as soon as the course window is loaded.
Copy link to clipboard
Copied
It could be a bug, that version is rather buggy.
I would try the usual troubleshooting, in this case Cleaning Preferences. Find the subfolder 'utils' under the installation folder and run CleanPreferences while Captivate is closed.
Copy link to clipboard
Copied
Hi,
it could be a bug because I have exactly the same problem (just found out) and I am using the latest Captivate classic version 11.8.2.254. I have published several projects and uploaded them to the web. Important side information: I have not included any custom JS. When I run the projects, I get almost the same error messages in the console:
Uncaught SyntaxError: "[object Object Object]" is not a valid JSON
at JSON.parse (<anonymous>)
at eval (eval at e (CPXHRLoader.js:37:226), <anonymous>:1176:67)
As you can see, the error leads to the CPXHRLoader.js file, which is located in the "assets" subfolder of the project folder. The project plays normally, but it seems that the error slows down the loading process and partially causes the browser window to freeze, resulting in a poor user experience.
Could someone already fix this problem and help me further? Many thanks in advance!
Copy link to clipboard
Copied
In our case we found it was a browser plugin causing the issue. In our case the Angular DevTools extension.
Copy link to clipboard
Copied
@jamess77796422 Thanks for pointing out a possible cause of this problem.