Web UI not loading properly

I tried it already. I am getting this:

WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the packa
ge from PyPI with: pip install frappe-bench

WARN: Command not being executed in bench directory

it says " Command not being executed in bench directory"
first enter frappe directory then execute bench build
try cd frappe-bench
then bench build

Facing the same issue on AWS EC2. Tried bench build and other stuff. Couldn’t find a solution. My old instances on EC2 works fine. Just new ones are going stripped of CSS.

I ran bench build successfully but the issue is still there.

Its mostly not about building the asset files, but its about nginx configuration.
check the configuration if you did manual install not using the easy install script

I installed it using an easy install script:
My steps:
sudo apt update
sudo apt -y upgrade
apt install python3-minimal build-essential python3-setuptools
sudo add user erpnext
sudo usermod -aG sudo erpnext
su erpnext
sudo wget https://raw.githubusercontent.com/frappe/bench/develop/install.py
sudo python3 install.py --production --verbose

I deployed it by creating a 2GB instance and now it is working fine.
I just want to know why it is creating a problem while deploying it in a 1 GB instance. Also, i have created a swap file, still it is of no use.

1 Like

remember that 404 error mean the file not found so it can be either bad nginx config or the file really not exist.

for example in the browser console it says 404 frappe-web.min.js not found so if you go to sites/assets/js and if this file is not in this folder that mean it is not nginx config problem but bench build faild probably due to low memory with 1GB, you can try to increase memory limit with:
export NODE_OPTIONS=“–max-old-space-size=8192”
then run bench build, the file should be there and problem solved.

Actually, This installation incorrect / unusual, because you actually created a user erpnext and used it as a superuser to install frappe which in this case might install the software using incorrect permissions.

The best way to install it is actually by following the documentation step by step and make it easy with no or minimal modifications.

The usual user for bench is frappe and is created automatically by the installation file, you dont need to do more than that.

Are you using a custom Website Theme? When I’ve had this issue in the past, I’ve been able to solve it by rebuilding my custom theme doc, which can be done simply by editing and saving it.

Hi @peterg,

I have faced same issue.

Please help me
Thanks

The solution that worked with me is installing on a large memory instance 2GB for example

1 Like

Hi @A.Mas,

Thank you so much for help.

I have performed export NODE_OPTIONS="–max-old-space-size=8192 but issue still replicated.

500 Internal Server Error is shown in web page console.

Thanks

one of the problem, is your account directory has no permission for other daemon access.

in my case, I just add the command
chmod o+x /home/frappe

frappe is my erpnext install account, you should change it base on your environment

4 Likes

I upgraded my EC2 instance to a larger instance type (with 2 gigs of RAM) and installed again and everything works fine.

The minimum required RAM is 2GB for ERPNext.

Thanks Lawes. Its worked me

It’s Work for me.
it Means User not right’s to access some file…like css

Finally i fix the display problem after run production site.

So it just need to change the permission for the installation directory. On my case, I run this command in :~/frappe-bench$ directory. So go to cd ~/home/[youraccount]/frappe-bench then run:

sudo chmod o+x /home/[your-account-profile]/
eg: sudo chmod o+x /home/admin

The problem is, some answer on the other thread did not explain this properly, so newcomer like me can’t understand :smiley:

3 Likes

I had similar issue. On my cicd I havd 5 migaes from deployments and the assetsfrom the first one was being requsted by the browser, despite the running container had the latest in assets.json.

eg: container assets.json: “login.bundle.css”: “/assets/frappe/dist/css/login.bundle.BNLXGCOL.css”
broser was trying to fetch login.bundle.VNLPGCOL.css.

The possible issue with my environmnet was the Redis cache holding old stale outdated assets.json data.

Running these commands solved the issue:

docker exec -it redis-cli FLUSHALL
docker exec -it redis-cli FLUSHALL

The main reason for this error is related to user permissions. Frappe is unable to access required files such as CSS, JS, Python files, etc.

Additionally, if you’ve recently restored a site, make sure to update the encryption_key in the config file (sites/site_config.json) using the key from your backup.

How to Fix the Permission Issue:

Run the following commands carefully:

bash

cd /home/{your_frappe_bench_folder}
sudo chmod o+x /home/{your_frappe_bench_folder}
sudo usermod -aG sudo {your_user}
sudo supervisorctl reload
bench restart
bench --site {your-site-name} clear-cache
bench --site {your-site-name} migrate

Example:

bash

cd /home/frappe-bench
sudo chmod o+x /home/frappe-bench
sudo usermod -aG sudo frappe-user
sudo supervisorctl reload
bench restart
bench --site my-site.domain.com clear-cache
bench --site my-site.domain.com migrate

These steps ensure that the necessary user has proper access to the bench folder and can execute the required files.

Hope this will help !!!



ERROR LOG

Traceback (most recent call last):
File “env/lib/python3.12/site-packages/cryptography/fernet.py”, line 130, in _verify_signature
h.verify(data[-32:])
cryptography.exceptions.InvalidSignature: Signature did not match digest.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/utils/password.py”, line 194, in decrypt
return cstr(cipher_suite.decrypt(encode(txt)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “env/lib/python3.12/site-packages/cryptography/fernet.py”, line 89, in decrypt
return self._decrypt_data(data, timestamp, time_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “env/lib/python3.12/site-packages/cryptography/fernet.py”, line 148, in _decrypt_data
self._verify_signature(data)
File “env/lib/python3.12/site-packages/cryptography/fernet.py”, line 132, in _verify_signature
raise InvalidToken
cryptography.fernet.InvalidToken