Picture of Sheryl Ann Lim
Preview of course in authoring tool returns error
by Sheryl Ann Lim - Tuesday, 3 October 2023, 7:27 AM
 

Hi Adapt community,

Would like to ask for help regarding a course that I am building on Adapt Authoring tool v0.11.1 and Framework version v5.31.28.

I suddenly cannot get the preview to work after editing some of the lessons. Specific changes made:

-Overhauled the content of a lesson, but did not introduce any new components

-Added a new lesson mostly containing text components

 

In Windows Powershell, this is the output when I click preview button:

info [03 Oct 23 15:18:10 +08:00] Retrieving JSON
info [03 Oct 23 15:18:10 +08:00] All theme assets processed
info [03 Oct 23 15:18:10 +08:00] All assets processed

The preview page loops forever in the loading animation.

The browser development tool displayed the following error:

Uncaught TypeError: Cannot read properties of undefined (reading '0')

at Device.checkScreenSize (adapt.min.js:1:12846)
at Device.onConfigDataLoaded (adapt.min.js:1:11965)
at p (backbone.min.js:2:3239)
at v (backbone.min.js:2:3081)
at u (backbone.min.js:2:902)
at a.trigger (backbone.min.js:2:2961)
at Wait.<anonymous> (adapt.min.js:1:45003)
at Wait.<anonymous> (backbone.min.js:2:2770)
at Wait.<anonymous> (underscore.min.js:6:8434)
at p (backbone.min.js:2:3239)

 

Weird thing was, the course previewed fine in the morning. Then I removed some Display Titles on component boxes this afternoon and the preview broke from there.

Publishing the course yields an output that fully loads and works. It is just the preview that's broken.

Appreciate any advise that can be given.

Picture of Ignacio Cinalli
Re: Preview of course in authoring tool returns error
by Ignacio Cinalli - Tuesday, 3 October 2023, 5:20 PM
 

Hi, Sheryl, try going to Configuration Settings and then clicking Save.

Probably because of this issue.

Picture of Sheryl Ann Lim
Re: Preview of course in authoring tool returns error
by Sheryl Ann Lim - Saturday, 14 October 2023, 1:40 AM
 

Hi Ignacio, Thank you for the reply.

I tried the fix you recommended and it did allow me to preview per normal.

Another thing I noticed, I can also force a rebuild to get the preview working again.

Thanks for sharing the link to the issue as well. It gave me more context about what is going on.