frappe / lms

Easy to Use, 100% Open Source Learning Management System
https://frappe.io/learning
GNU Affero General Public License v3.0
1.05k stars 477 forks source link

Uncaught (in promise) SyntaxError: JSON.parse #940

Open johnwslongland opened 3 months ago

johnwslongland commented 3 months ago

Describe the bug An error is thrown in the browser console

To Reproduce Steps to reproduce the behavior:

  1. Install ERPNext V15
  2. Install Education
  3. Install LMS
  4. Create course, chapter, Lesson
  5. Goto LMS portal
  6. OPen browser console
  7. Click on Course
  8. Click on Lesson

Expected behavior No error in browser console view

Screenshots Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data d Lesson.vue:271 onSuccess Lesson.vue:246 i resources.js:109 i frappe-ui-Kpe5jT7O.js:1 promise callbackl frappe-ui-Kpe5jT7O.js:1 St frappe-ui-Kpe5jT7O.js:1 St frappe-ui-Kpe5jT7O.js:1 i resources.js:53 En resources.js:207 setup Lesson.vue:233 Hr runtime-core.esm-bundler.js:195 L_ runtime-core.esm-bundler.js:7631 Zv runtime-core.esm-bundler.js:7591 I runtime-core.esm-bundler.js:5917 R runtime-core.esm-bundler.js:5883 v runtime-core.esm-bundler.js:5351 Z runtime-core.esm-bundler.js:6107 run reactivity.esm-bundler.js:177 update runtime-core.esm-bundler.js:6151 Hr runtime-core.esm-bundler.js:195 sv runtime-core.esm-bundler.js:410 promise callbackiv runtime-core.esm-bundler.js:319 Eu runtime-core.esm-bundler.js:339 dv runtime-core.esm-bundler.js:1761 k runtime-core.esm-bundler.js:1972 cp reactivity.esm-bundler.js:263 Fy reactivity.esm-bundler.js:307 ns reactivity.esm-bundler.js:1069 set value reactivity.esm-bundler.js:1114 O vue-router.mjs:3400 x vue-router.mjs:3265 promise callback*x vue-router.mjs:3232 h vue-router.mjs:3157 l vue-router.mjs:2223 Hr runtime-core.esm-bundler.js:195 Mn runtime-core.esm-bundler.js:202 n runtime-dom.esm-bundler.js:697 Dr runtime-dom.esm-bundler.js:647 dS runtime-dom.esm-bundler.js:665 yS runtime-dom.esm-bundler.js:742 g runtime-core.esm-bundler.js:5524 y runtime-core.esm-bundler.js:5471 v runtime-core.esm-bundler.js:5339 Z runtime-core.esm-bundler.js:6028 run reactivity.esm-bundler.js:177 update runtime-core.esm-bundler.js:6151 T runtime-core.esm-bundler.js:6161 I runtime-core.esm-bundler.js:5930 R runtime-core.esm-bundler.js:5883 v runtime-core.esm-bundler.js:5351 C runtime-core.esm-bundler.js:5600 g runtime-core.esm-bundler.js:5506 y runtime-core.esm-bundler.js:5471 v runtime-core.esm-bundler.js:5339 C runtime-core.esm-bundler.js:5600 g runtime-core.esm-bundler.js:5506 y runtime-core.esm-bundler.js:5471 v runtime-core.esm-bundler.js:5339 Z runtime-core.esm-bundler.js:6028 run reactivity.esm-bundler.js:177 update runtime-core.esm-bundler.js:6151 T runtime-core.esm-bundler.js:6161 I runtime-core.esm-bundler.js:5930 R runtime-core.esm-bundler.js:5883 v runtime-core.esm-bundler.js:5351 C runtime-core.esm-bundler.js:5600 g runtime-core.esm-bundler.js:5506

Desktop (please complete the following information):

Smartphone (please complete the following information): None

Additional context Link that is displayed together with error explains possible causes https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default

pateljannat commented 3 months ago

@johnwslongland I am unable to replicate this. I need to have an idea about the content that you have in your lesson. Please attach a video replicating this issue to help me debug.

kptdaaron commented 1 month ago

Hi I am experiencing the same issue.

ERPNext version: v15 Bench version: v5.22.3

For context: I am deploying using Docker.

apps.json image

docker-compose.yaml image

Kindly see attached screen recording.

https://github.com/user-attachments/assets/ee53254a-a520-445c-a371-a10fc3692c43