Skip to content

Odoo Assets Bundle 404 — 'Failed to Load Resource' and Missing JS/CSS Fix

DeployMonkey Team · March 24, 2026 8 min read

Asset Bundle 404 Errors in Odoo

After an Odoo update or module installation, the web interface may break completely with errors in the browser console:

GET /web/assets/123-456/web.assets_backend.min.js 404 (Not Found)
Failed to load resource: the server responded with a status of 404
Uncaught SyntaxError: Unexpected token '<' (at web.assets_backend.min.js:1)

The following assets are not loaded:
  - web.assets_backend
  - web.assets_frontend

The Odoo web interface appears unstyled, with broken layouts, missing buttons, or a completely blank page.

Why Asset Bundles Break

Odoo compiles JavaScript and CSS files into bundles and caches them with unique hashes. Bundles break when:

  • The cache references bundles compiled before an update (hash mismatch)
  • A module's JavaScript or SCSS has syntax errors
  • The filestore is corrupted or inaccessible
  • Browser cache holds stale bundle URLs

Fix 1: Regenerate Asset Bundles

The quickest fix is to delete and regenerate all asset bundles:

# Method 1: Via Odoo debug mode
# 1. Add ?debug=assets to the URL: https://your-odoo.com/web?debug=assets
# 2. Go to Settings > Technical > Attachments
# 3. Search for 'assets' in name
# 4. Select all and delete
# 5. Refresh the page (Ctrl+Shift+R)

# Method 2: Via database (faster for production)
sudo -u postgres psql -d mydb -c "
  DELETE FROM ir_attachment
  WHERE res_model = 'ir.ui.view'
  AND name LIKE '%assets%';
"

# Restart Odoo to regenerate
sudo systemctl restart odoo

Fix 2: Clear Browser Cache

Sometimes the browser caches old bundle URLs:

# Hard refresh
Ctrl+Shift+R (Windows/Linux)
Cmd+Shift+R (Mac)

# Or clear all cached data
Chrome: Settings > Privacy > Clear browsing data > Cached images and files
Firefox: Settings > Privacy > Clear Data > Cached Web Content

Fix 3: Fix SCSS/JavaScript Syntax Errors

If a custom module has invalid SCSS or JavaScript, the entire bundle fails to compile:

# Check Odoo logs for compilation errors
grep -i "asset" /var/log/odoo/odoo.log | tail -20
grep -i "scss" /var/log/odoo/odoo.log | tail -20
grep -i "SyntaxError" /var/log/odoo/odoo.log | tail -20

# Common SCSS errors:
# - Missing semicolon at end of line
# - Invalid SCSS variable reference
# - Importing a non-existent file

# Debug: load assets in debug mode to see which file fails
# URL: https://your-odoo.com/web?debug=assets
# Check browser console for the specific file with errors

Fix 4: Filestore Permission Issues

Asset bundles are stored in the Odoo filestore. If Odoo cannot write to it:

# Check filestore path
grep data_dir /etc/odoo.conf
# Default: /var/lib/odoo/.local/share/Odoo/filestore/

# Check permissions
ls -la /var/lib/odoo/.local/share/Odoo/filestore/mydb/

# Fix ownership
sudo chown -R odoo:odoo /var/lib/odoo/
sudo chmod -R 750 /var/lib/odoo/

Fix 5: Docker Volume Issues

# Ensure the filestore volume persists between container restarts
# docker-compose.yml
volumes:
  - odoo-filestore:/var/lib/odoo

# If filestore was lost, regenerate assets
docker compose exec odoo bash -c "
  psql -h db -U odoo -d mydb -c \"DELETE FROM ir_attachment WHERE name LIKE '%assets%' AND res_model='ir.ui.view';\"
"
docker compose restart odoo

Fix 6: Nuclear Option — Full Asset Reset

When nothing else works:

# Delete ALL asset-related attachments and caches
sudo -u postgres psql -d mydb -c "
  DELETE FROM ir_attachment WHERE name LIKE '%.assets_%';
  DELETE FROM ir_attachment WHERE name LIKE '%web.assets%';
  DELETE FROM ir_attachment WHERE url LIKE '/web/assets/%';
"

# Clear Odoo's in-memory cache
sudo systemctl restart odoo

# Hard refresh browser
# Ctrl+Shift+R

Prevention

DeployMonkey handles asset compilation during deployments automatically. The AI agent detects SCSS and JavaScript errors before they break production bundles and regenerates assets after every module update.