Web UI doesnt Load properly in production mode


After bench build --production, assets build successfully but return 404 errors.
and i tried every thing like sudo chmod o+x /home/ and migrate and build , its only works well in developer mode .

try the following:
1- bench restart if you are using supervisor
or stop the bech with ctrl + c then bench start

if still not working then
2- clear caches
bench --site [your-site] clear-cache
bench --site [your-site] clear-website-cache

if still not working then
3- bench build --app frappe

if still not working then
4- use incognito mode or use another browser

if still not working then
5- delete the app then reinstall them or delete the entire site and create new one because mostly this happens out of corrupted installation
bench --site [your-site] uninstall-app [your-app]
or drop the entire site and make new one
bench drop-site [your-site]

1 Like

Hello @AhmedShihata

Try this command :

sudo chmod o+rx /home/username
bench restart

1 Like

Thanks much mohamed , i tried most of that , but if you have any idea why this only in production mode and when i enable develop mode it works like charm , or any idea to get the issued app because there is alot of work on site

i tried this hundred of times and still not working.

the develop mode automaticaly watch the changes and live rebuild,
so i think may be you need to build the site again and make sure that assets folder contain the static files

or maybe nginx doesn’t serve them!
try these commands:
bench setup nginx
then reload
sudo service nginx restart