Student access error in imported courses

Hi, @regis

Tutor version: 13.1.1

Fresh install, without plugins

When I import a course already made, with the advanced options of only by invitation and hidden in the catalog, it shows the error “There was an error loading this course.” to students who are added through the instructor/membership menu.

If I remove the option of only by invitation and that it be shown in the catalog, so that the students self-enroll in the course they can enter to course without problems.

This is the log of the imported course and I don’t see any problem in its import

I have tried it on the demo platform of demo.openedx.overhang.io and got the same error

In the logs I don’t find anything abnormal, more than a caddy

caddy_1                      | {"level":"error","ts":1643396379.462577,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"192.168.88.251:6773","proto":"HTTP/1.1","method":"GET","host":"dev.lan","uri":"/api/course_home/course_metadata/course-v1:BUnited+BU-0001+2022_S1?browser_timezone=America%2FMexico_City"},"duration":0.084659797,"size":23,"status":404}

I still add all the log generated by the user when trying to enter the course.

lms_1                        | 2022-01-28 18:59:39,391 INFO 8 [tracking] [user 5] [ip 192.168.88.251] logger.py:41 - {"name": "/theming/asset/images/logo.png", "context": {"user_id": 5, "path": "/theming/asset/images/logo.png", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "neto", "session": "df4afa353473e81bd79a832726183f05", "ip": "192.168.88.251", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69", "host": "dev.lan", "referer": "http://apps.dev.lan/", "accept_language": "es-419,es;q=0.9,es-ES;q=0.8,en;q=0.7,en-GB;q=0.6,en-US;q=0.5", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-01-28T18:59:39.391382+00:00", "event_type": "/theming/asset/images/logo.png", "event_source": "server", "page": null}
caddy_1                      | {"level":"info","ts":1643396379.412809,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"192.168.88.251:6774","proto":"HTTP/1.1","method":"GET","host":"dev.lan","uri":"/theming/asset/images/logo.png"},"duration":0.038397906,"size":0,"status":302}
lms_1                        | [pid: 8|app: 0|req: 1883/2051] 172.18.0.4 () {42 vars in 2828 bytes} [Fri Jan 28 18:59:39 2022] GET /theming/asset/images/logo.png => generated 0 bytes in 37 msecs (HTTP/1.1 302) 7 headers in 358 bytes (1 switches on core 0)
lms_1                        | 2022-01-28 18:59:39,429 INFO 8 [tracking] [user 5] [ip 192.168.88.251] logger.py:41 - {"name": "/api/course_home/course_metadata/course-v1:BUnited+BU-0001+2022_S1", "context": {"user_id": 5, "path": "/api/course_home/course_metadata/course-v1:BUnited+BU-0001+2022_S1", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "neto", "session": "df4afa353473e81bd79a832726183f05", "ip": "192.168.88.251", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69", "host": "dev.lan", "referer": "http://apps.dev.lan/", "accept_language": "es-419,es;q=0.9,es-ES;q=0.8,en;q=0.7,en-GB;q=0.6,en-US;q=0.5", "event": "{\"GET\": {\"browser_timezone\": [\"America/Mexico_City\"]}, \"POST\": {}}", "time": "2022-01-28T18:59:39.429171+00:00", "event_type": "/api/course_home/course_metadata/course-v1:BUnited+BU-0001+2022_S1", "event_source": "server", "page": null}
caddy_1                      | {"level":"error","ts":1643396379.462577,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"192.168.88.251:6773","proto":"HTTP/1.1","method":"GET","host":"dev.lan","uri":"/api/course_home/course_metadata/course-v1:BUnited+BU-0001+2022_S1?browser_timezone=America%2FMexico_City"},"duration":0.084659797,"size":23,"status":404}
lms_1                        | [pid: 8|app: 0|req: 1884/2052] 172.18.0.4 () {46 vars in 3018 bytes} [Fri Jan 28 18:59:39 2022] GET /api/course_home/course_metadata/course-v1:BUnited+BU-0001+2022_S1?browser_timezone=America%2FMexico_City => generated 23 bytes in 49 msecs (HTTP/1.1 404) 9 headers in 424 bytes (1 switches on core 0)
lms_1                        | 2022-01-28 18:59:39,479 INFO 8 [tracking] [user 5] [ip 192.168.88.251] logger.py:41 - {"name": "/api/course_home/outline/course-v1:BUnited+BU-0001+2022_S1", "context": {"user_id": 5, "path": "/api/course_home/outline/course-v1:BUnited+BU-0001+2022_S1", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "neto", "session": "df4afa353473e81bd79a832726183f05", "ip": "192.168.88.251", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69", "host": "dev.lan", "referer": "http://apps.dev.lan/", "accept_language": "es-419,es;q=0.9,es-ES;q=0.8,en;q=0.7,en-GB;q=0.6,en-US;q=0.5", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-01-28T18:59:39.479133+00:00", "event_type": "/api/course_home/outline/course-v1:BUnited+BU-0001+2022_S1", "event_source": "server", "page": null}
lms_1                        | 2022-01-28 18:59:40,480 INFO 8 [edx.certificate] [user 5] [ip 192.168.88.251] api.py:378 - Checking if student 5 has an invalidated certificate in course course-v1:BUnited+BU-0001+2022_S1.
cms-worker_1                 | [2022-01-28 18:59:40,760: INFO/ForkPoolWorker-1] Task lms.djangoapps.discussion.tasks.update_discussions_map[fb2a027a-f575-4ebc-9ece-3e22b7713152] succeeded in 0.11364550402504392s: None
lms_1                        | 2022-01-28 18:59:40,814 INFO 8 [tracking] [user 5] [ip 192.168.88.251] logger.py:41 - {"name": "edx.course.grade.now_failed", "context": {"user_id": 5, "path": "/api/course_home/outline/course-v1:BUnited+BU-0001+2022_S1", "course_id": "course-v1:BUnited+BU-0001+2022_S1", "org_id": "BUnited", "enterprise_uuid": ""}, "username": "neto", "session": "df4afa353473e81bd79a832726183f05", "ip": "192.168.88.251", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69", "host": "dev.lan", "referer": "http://apps.dev.lan/", "accept_language": "es-419,es;q=0.9,es-ES;q=0.8,en;q=0.7,en-GB;q=0.6,en-US;q=0.5", "event": {"user_id": "5", "course_id": "course-v1:BUnited+BU-0001+2022_S1", "event_transaction_id": "None", "event_transaction_type": "None"}, "time": "2022-01-28T18:59:40.813706+00:00", "event_type": "edx.course.grade.now_failed", "event_source": "server", "page": null}
lms_1                        | 2022-01-28 18:59:40,817 INFO 8 [lms.djangoapps.grades.course_grade_factory] [user 5] [ip 192.168.88.251] course_grade_factory.py:218 - Grades: Update, Course: course_key: course-v1:BUnited+BU-0001+2022_S1, version: 61f433fdda04d9b079250954, edited_on: 2022-01-28 18:20:45.183000+00:00, grading_policy: f/WAil4+095adS6WOPWvqD50w84=, User: 5, Course Grade: percent: 0.0, letter_grade: None, passed: False, persisted: False
lms_1                        | [pid: 8|app: 0|req: 1885/2053] 172.18.0.4 () {46 vars in 2925 bytes} [Fri Jan 28 18:59:39 2022] GET /api/course_home/outline/course-v1:BUnited+BU-0001+2022_S1 => generated 67145 bytes in 1396 msecs (HTTP/1.1 200) 10 headers in 457 bytes (1 switches on core 0)
caddy_1                      | {"level":"info","ts":1643396380.8605883,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"192.168.88.251:6775","proto":"HTTP/1.1","method":"GET","host":"dev.lan","uri":"/api/course_home/outline/course-v1:BUnited+BU-0001+2022_S1"},"duration":1.482027198,"size":67145,"status":200}
lms-worker_1                 | 2022-01-28 18:59:41,996 INFO 17 [openedx.core.djangoapps.content.block_structure.store] [user None] [ip None] store.py:165 - BlockStructure: Added to cache; block-v1:BUnited+BU-0001+2022_S1+type@course+block@course, size: 25491
lms-worker_1                 | 2022-01-28 18:59:41,998 INFO 17 [celery.app.trace] [user None] [ip None] trace.py:125 - Task openedx.core.djangoapps.content.block_structure.tasks.update_course_in_cache_v2[e3763612-3e5e-4b7c-8e3d-a4872774b6f7] succeeded in 1.652635703998385s: None
lms_1                        | 2022-01-28 19:00:19,415 INFO 8 [tracking] [user 4] [ip 192.168.88.251] logger.py:41 - {"name": "/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks", "context": {"course_id": "course-v1:BUnited+BU-0006+2022_S1", "course_user_tags": {}, "user_id": 4, "path": "/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks", "org_id": "BUnited", "enterprise_uuid": ""}, "username": "sbernesto", "session": "1a6d667095df2910f05d3ab2def75b1e", "ip": "192.168.88.251", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36", "host": "dev.lan", "referer": "http://dev.lan/courses/course-v1:BUnited+BU-0006+2022_S1/instructor", "accept_language": "es-ES,es;q=0.9", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-01-28T19:00:19.414908+00:00", "event_type": "/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks", "event_source": "server", "page": null}
caddy_1                      | {"level":"info","ts":1643396419.449604,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"192.168.88.251:3131","proto":"HTTP/1.1","method":"POST","host":"dev.lan","uri":"/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks"},"duration":0.053621268,"size":17,"status":200}
lms_1                        | [pid: 8|app: 0|req: 1886/2054] 172.18.0.4 () {50 vars in 3054 bytes} [Fri Jan 28 19:00:19 2022] POST /courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks => generated 17 bytes in 52 msecs (HTTP/1.1 200) 9 headers in 544 bytes (1 switches on core 0)
lms_1                        | 2022-01-28 19:01:19,420 INFO 8 [tracking] [user 4] [ip 192.168.88.251] logger.py:41 - {"name": "/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks", "context": {"course_id": "course-v1:BUnited+BU-0006+2022_S1", "course_user_tags": {}, "user_id": 4, "path": "/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks", "org_id": "BUnited", "enterprise_uuid": ""}, "username": "sbernesto", "session": "1a6d667095df2910f05d3ab2def75b1e", "ip": "192.168.88.251", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36", "host": "dev.lan", "referer": "http://dev.lan/courses/course-v1:BUnited+BU-0006+2022_S1/instructor", "accept_language": "es-ES,es;q=0.9", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-01-28T19:01:19.420192+00:00", "event_type": "/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks", "event_source": "server", "page": null}
caddy_1                      | {"level":"info","ts":1643396479.4568594,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"192.168.88.251:3131","proto":"HTTP/1.1","method":"POST","host":"dev.lan","uri":"/courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks"},"duration":0.055858292,"size":17,"status":200}
lms_1                        | [pid: 8|app: 0|req: 1887/2055] 172.18.0.4 () {50 vars in 3054 bytes} [Fri Jan 28 19:01:19 2022] POST /courses/course-v1:BUnited+BU-0006+2022_S1/instructor/api/list_instructor_tasks => generated 17 bytes in 54 msecs (HTTP/1.1 200) 9 headers in 544 bytes (1 switches on core 0)

After several tests I have found that it is the MFE that gives me an error, since I have deactivated it with these options in this post, users can enter the course without problems.

But as it says right there in that post, it is not recommended to disable it since it has not been tested.

On the other hand, install tutor in its lilac 12.2.0 version and it works perfectly.

I have tried to see the mfe logs but I can’t find it, since unfortunately both the lms and caddy logs don’t say where the mfe fails when rendering the course

I have no idea how to troubleshoot this, but just to give you a pointer: MFE don’t have logs, because they don’t have server-side code. The whole point of microfrontends is that all the code is javascript that runs in the browser. Thus, to troubleshoot this issue you should have a look at the developer console in your browser.

Thanks @regis for reminding me of the browser console.

I didn’t know that’s why there are no logs, but you just gave me an idea and it seems to work.

Check the console and indeed the MFE sends to call an api and it returns the following result

Checking in detail the url of the error the api sends this message

{"detail":"Not found."}

Then go back to studio.

I changed the Course Visibility In Catalog option from none to about and it seems to let me into the course with no problem.

and the api already returns information

{"can_show_upgrade_sock":false,"verified_mode":null,"can_load_courseware":true,"celebrations":{"first_section":false,"streak_length_to_celebrate":null,"streak_discount_enabled":false},"course_access":{"has_access ":true,"error_code":null,"developer_message":null,"user_message":null,"additional_context_user_message":null,"user_fragment":null},"course_id":"course-v1:BUnited+BU-0001+ 2022_S1","is_enrolled":true,"is_self_paced":false,"is_staff":false,"number":"BU-0001","org":"BUnited","original_user_is_staff":false,"start":" 2020-06-06T00:00:00Z","tabs":[{"tab_id":"courseware","title":"Course","url":"http://apps.dev.lan/learning/ course/course-v1:BUnited+BU-0001+2022_S1/home"},{"tab_id":"progress","title":"Progress","url":"http://apps.dev.lan/ learning/course/course-v1:BUnited+BU-0001+2022_S1/progress"},{"tab_id":"dates","title":"Dates","url":"http://apps.dev. lan/learning/course/course-v1:BUnited+BU-0001+2022_S1/dates"},{"tab_id":"discussion","title":"Discussion","url":"http://dev. lan/courses/c ourse-v1:BUnited+BU-0001+2022_S1/discussion/forum/"}],"title":"Basic Word","username":"net","user_timezone":null}

In summary or solution for the moment is: Avoid setting courses to none in the Course Visibility In Catalog variable and using about, for invite-only courses

Do you think that this is a bug? Should you report it to the BTR? Issues · openedx/build-test-release-wg · GitHub

Thanks, I have opened a post in the open edx forum, since github won’t let me.

@sbernesto were you able to find a solution?, I am facing the same exact problem

hi,

I managed to solve the error by changing the visibility variable in the catalog from none to about

Yeah we went around it by setting it to “both”, setting it to “about”, would it still be visible in dashboard?, or just if someone has the same link I guess

It just doesn’t list it on the dashboard, but it can be found with discovery and let into the about page.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.