[SOLVED] ERPNext Docker "App is not in apps.txt"


I am trying to start in a docker a simple setup (version-12) with three custom apps.

I followed step by step the two following examples :


And in both cases I end up with a non starting instance (500 Internal Server Error).

In the logs of the site-creator, I get this weird message :

`Updating DocTypes for erpnext : [========================================]`


`Updating customizations for Address`


`Traceback (most recent call last):`

`File "/home/frappe/frappe-bench/commands/new.py", line 118, in <module>`


`File "/home/frappe/frappe-bench/commands/new.py", line 70, in main`


`File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 90, in _new_site`

`_install_app(app, verbose=verbose, set_as_patched=not source_sql)`

`File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 61, in install_app`

`raise Exception("App not in apps.txt")`

`Exception: App not in apps.txt`

I looked on the forums, even connected to the site-creator docker, apps are correctly set in the Apps.txt.

Moreover, I also see some issues in the erpnext-python docker :

erpnext-python_1          |   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 684, in _read_packet
erpnext-python_1          |     packet.check_error()
erpnext-python_1          |   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py", line 220, in check_error
erpnext-python_1          |     err.raise_mysql_exception(self._data)
erpnext-python_1          |   File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
erpnext-python_1          |     raise errorclass(errno, errval)
erpnext-python_1          | pymysql.err.OperationalError: (1045, "Access denied for user '_ca89ff92470ceefa'@'' (using password: YES)") 

For that I saw some post where it is needed to grant access to the user to the whole database. Could it be related? If not, where to investigate why the site-creator docker is not going through the end.

Of course, in Development container, everything runs fine.

Thanks for you support.



can you add it to the apps.txt manually? Or delete the apps.txt file and restart the python container, it’ll create the file again from the list of apps available in new image/container.

This may happen when, volume was created and frappe + erpnext was installed first and new image was added later.

Just tried.

Indeed the file is recreated. When I restart the docker, still the error 500. I fixed it by doing the commend grant all privileges on <db_name>.* to '<db_name>'@'%' identified by '<db_password>';

I can now connect to the website, no error 500. But my app were not installed.

What concerns me here is that the site creator didn’t go through the whole process. So I guess that everything is not installed correctly.

I could of course connect to the docker and reinstall the apps with the bench command. But I look for a solution that works from the docker compose command without any further interventions. This will run through a CD pipeline.

Tried the following, the same issue :

  • On docker python : bench reinstall : Apps not installed
  • On docker python : bench drop-site mysite.localhost then restarted the site-creator docker.

Still got the same issue after updating the customisation for address.

Will continue digging

did you set the environment variable INSTALL_APPS=erpnext,your_app_name for site-creator container?

to install it later,

bench --site site.name.com install-app your_app_name

Thanks for your answer.

I had a little trailing comma on the INSTALL_APPS environment variable that produced the installation of a blank name app, which is obviously not in the apps.txt

And as soon as the site-creator can do all it’s job, everything works fine. Event the privileges issues.