Open brian-smith-tcril opened 9 months ago
I thought this may be fixed by https://github.com/openedx/edx-platform/commit/5e732f9d1e278dea5b164d3c0fbfb6a48980a43f, but after pulling the latest devstack images I'm now getting
Access to fetch at 'http://example.com/put_video' from origin 'http://localhost:2001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
When contentstore.mock_video_uploads
is enabled, it does not actually function as mocking the upload. It just mocks a success response to adding the video to the backend with an upload url for a fake server. To actually test if the pipeline was set up correctly, you need to disable contentstore.mock_video_uploads
after turning off contentstore.mock_video_uploads
I'm still getting
but I'm no longer seeing any errors in the console or network tabs of the browser developer tools
This issue is fully reproducible on master (https://github.com/openedx/frontend-app-course-authoring/commit/815ddbe94ea8348d3322930cc51cfd6e542f6756 as of writing)
In my
.env.development
file I setAt first I was getting 404 errors when trying to upload videos, so I went digging through
edx-platform
code and foundhttps://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/cms/djangoapps/contentstore/toggles.py#L433-L437 https://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/cms/djangoapps/contentstore/toggles.py#L217-L231 https://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/xmodule/course_block.py#L1506-L1514 https://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/cms/djangoapps/contentstore/video_storage_handlers.py#L570-L589 https://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/cms/djangoapps/contentstore/video_storage_handlers.py#L181-L231 https://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/cms/djangoapps/contentstore/video_storage_handlers.py#L216-L220 and https://github.com/openedx/edx-platform/blob/6edc0c2dd9084a6892fd3a504ae71f2900d5ad4b/cms/djangoapps/contentstore/toggles.py#L500-L516
After which I set the following waffle flags
As well as the following Video Pipeline settings
I then started getting
403
errors when trying to upload videosI then looked through https://openedx.atlassian.net/wiki/spaces/AC/pages/645726427/Video+Pipeline+Testing+Sandbox (thanks for pointing me to this @KristinAoki!)
I tried adding
{"course_video_upload_token": "shared_course_token"}
to the "Video Upload Credentials" textbox in Studio -> Advanced Settings as recommended there.I could not find
Oauth2 > Clients
in django admin.After that, I am still getting
403
errors.Digging into the response a bit shows CSRF issues
@arbrandes has also been trying to get this working, but he has been using tutor instead