frappe / frappe_docker

Docker images for production and development setups of the Frappe framework and ERPNext
MIT License
1.5k stars 1.39k forks source link

Running pwd.yml container does not work on Debian 12 #1459

Closed MrFastDie closed 2 months ago

MrFastDie commented 2 months ago

Description of the issue

When using the default pwd.json with or without the example.env file the ERPNext server is not fully starting.

Context information (for bug reports)

The docs stating:

git clone https://github.com/frappe/frappe_docker cd frappe_docker

Then run: docker compose -f pwd.yml up -d

However doing that on debian bookworm does leed to different errors.

  1. When using docker and docker-compose from the official repositories the page never comes up in the first place
  2. When using those from the official repositories from Docker itself the page comes up but not all modules seemed to be installed and therefore I cannot log in

Steps to reproduce the issue

  1. Install debian bookworm
  2. Install docker as described in Docker Docs
  3. Clone this git repo to /opt/frappe_docker and cd into it
  4. Start it like: docker compose -f pwd.yml up -d

Observed result

The Container starts and you will not see any errors in the logs

However when visiting the main page you get:

Uncaught Server Exception There was an error building this page

Error Code: 404

Expected result

The expected result would be seeing the main page or at least beeing able to navigate to Login and log into the account.

Stacktrace / full error message if available

The only error I do get is from the page itself:

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 19, in get_response
    endpoint, renderer_instance = path_resolver.resolve()
                                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/path_resolver.py", line 69, in resolve
    if renderer_instance.can_render():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 17, in can_render
    if self.search_in_doctypes_with_web_view():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 26, in search_in_doctypes_with_web_view
    if document := _find_matching_document_webview(self.path):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/caching.py", line 156, in redis_cache_wrapper
    val = func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 91, in _find_matching_document_webview
    condition_field = DocumentPage.get_condition_field(meta)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 80, in get_condition_field
    controller = get_controller(meta.name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/base_document.py", line 70, in get_controller
    site_controllers[doctype] = import_controller(doctype)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/base_document.py", line 95, in import_controller
    module = load_doctype_module(doctype, module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/modules/utils.py", line 248, in load_doctype_module
    app = get_module_app(module)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/modules/utils.py", line 273, in get_module_app
    frappe.throw(_("Module {} not found").format(module), exc=frappe.DoesNotExistError)
  File "apps/frappe/frappe/__init__.py", line 645, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 610, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 561, in _raise_exception
    raise exc
frappe.exceptions.DoesNotExistError: Module Manufacturing not found

When accessing the pages, docker actually created two log entries:

Where both of them return 404 but no more.

MrFastDie commented 2 months ago

After removing all volumes etc. it works, somehow it broke while I was on the docker from the system and not the latest version and I failed removing the right volume.