• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

error in CPXHRLoader.js

Community Beginner ,
Nov 28, 2023 Nov 28, 2023

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. 

Views

549

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Nov 28, 2023 Nov 28, 2023

Does the webserver support JSON? It is used for PNG images.

Votes

Translate

Translate
Community Expert , Nov 29, 2023 Nov 29, 2023

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.

Votes

Translate

Translate
Community Expert ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

Does the webserver support JSON? It is used for PNG images.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 29, 2023 Nov 29, 2023

Copy link to clipboard

Copied

 

Yes. I am using firebase hosting. Screenshot 2023-11-29 at 2.20.16 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2023 Nov 29, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 29, 2023 Nov 29, 2023

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. Screenshot 2023-11-29 at 2.29.43 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2024 Jan 30, 2024

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2024 Jan 30, 2024

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2024 Jan 30, 2024

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2024 Jan 30, 2024

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 22, 2024 Feb 22, 2024

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 20, 2024 May 20, 2024

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.  

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2024 May 21, 2024

Copy link to clipboard

Copied

LATEST

@jamess77796422 Thanks for pointing out a possible cause of this problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources