You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Video Block JS not available statically on sandbox/prod environment #479
As we have extracted the BuiltIn Blocks to xblocks-contrib we have started using local_resource_url method of runtime to load the static file that suppose to be bundled by the runtime and make it statically available.
It's working fine on local machine setup (tutor dev) but not working on the sandbox created in the PR's (Video, Problem)
Sanbox environment has been created in the following PR to test the Extracted Video Block (to xblocks-contrib) openedx/openedx-platform#37851
Test results:
Extracted Video Block is working fine (with static JS file) on local machine setup (tested on tutor dev).
Video Block JS not available statically on sandbox/prod environment in referenced PR.
In this story we will figure the root cause and fix the issue. It seems JS file is not bundled.
Video Block JS file is available in the sandbox for the Built In Video Block
Video Block JS file is available in the local machine (tutor dev) setup for the Extracted Video Block
Video Block JS file is not available in the sandbox for the Extracted Video Block
I have done its testing and verified JS file is bundling in the python package using following commands.
So we need to verify it what's the issue in the edx-platform webpack bundling for the sandbox/prod environment.
# Build the package
python -m build
# Install from the build distribution
pip install dist/your_package-0.1.0-py3-none-any.whl
# Or install in editable mode for development
pip install -e .# For source distributions
tar -tzf dist/your_package-0.1.0.tar.gz
@kdmccormick
Adding for the reference how we resolved it:
@staticmethoddef_video_js_resource_path():
""" Returns the URL for the local resource. Note: when running with the full Django pipeline, the file will be accessed as a static asset which will use a CDN in production. For more details, see platform's xblock_local_resource_url() define in: https://github.com/openedx/openedx-platform/blob/master/openedx/core/lib/xblock_utils/__init__.py """ifsettings.PIPELINE.get('PIPELINE_ENABLED', False) ornotgetattr(settings, 'REQUIRE_DEBUG', False):
return"video/public/js/video-xblock.js"else:
return"public/js/video-xblock.js"
Activity
farhan commentedon Jan 20, 2026
I have done its testing and verified JS file is bundling in the python package using following commands.
So we need to verify it what's the issue in the edx-platform webpack bundling for the sandbox/prod environment.
farhan commentedon Feb 3, 2026
I have done the testing for this issue on local machine sandbox (tutor dev env) and its working for both boolean values of following pipeline.
I have tried to update the pipeline settings on the following PR sandbox, but sandbox maintenance is on the way
openedx/openedx-platform#37851
farhan commentedon Feb 4, 2026
Following is working fine on the sandbox:
https://studio.pr-37136-1a7bbe.axim-sandboxes.opencraft.hosting/static/studio/xblock/resources/drag_and_drop_v2/public/css/drag_and_drop.fe8fcb1a6ea9.css
farhan commentedon Feb 6, 2026
I have verified js file is collected statically and available via url:
https://studio.pr-37851-1a7bbe.axim-sandboxes.opencraft.hosting/xblock/resource/video/public/js/video-xblock.js
Next: Why its unable to load via local_resource_url
farhan commentedon Feb 10, 2026
Issue is hoping to be fixed in this commit.
Testing on the sandbox is pending.
cc: @irtazaakram
farhan commentedon Feb 11, 2026
It's tested on the sandbox, things are working fine
https://apps.pr-37996-1a7bbe.axim-sandboxes.opencraft.hosting/authoring/course/course-v1:axim+2+2
kdmccormick commentedon Feb 11, 2026
Great!
farhan commentedon Feb 12, 2026
@kdmccormick
Adding for the reference how we resolved it:
copied from here
We should add the findings somewhere around following code references for the guidelines how to use the method.
xblock > local_resource_url
openedx-platform > xblock_local_resource_url
cc: @openedx/axim-aximprovements