## Description of the issue
Installed adding the latest `pwd.yml | frappe/erp…next:v15.11.1` with file content into a `portainer stack` [ works with docker compose ] and deployed just changing the port as
```
ports:
- "4444:8080"
```
Everything was good but the domain selection wizard was not there at the initialization steps.
After manually installing the HRMS and Education app using the following commands:
```bash
bench get-app hrms
bench --site frontend install-app hrms
bench migrate --skip-failing
```
The app is successfully downloaded in the apps folder. However, when running the following commands inside both the frontend and backend containers and restarting all Docker containers for proper scheduling, the website breaks and stops functioning.
Used operating system details is
```
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
.
.
```
The error as shown below (while installing hrms)
```
frappe@d276381ce4fd:~/frappe-bench/sites$ bench --site frontend install-app hrms
App erpnext already installed
Installing hrms...
Setting up Frappe HR...
Installation for Frappe HR app failed due to an error. Please try re-installing the app or report the issue on https://github.com/frappe/hrms/issues/new if not resolved.
An error occurred while installing hrms: Employee: Options must be a valid DocType for field Employment Type in row 24
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 462, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {'sites': ['frontend'], 'force': False, 'verbose': False, 'profile': False}
apps = ('hrms',)
force = False
_install_app = <function install_app at 0x7f2d87360040>
filelock = <function filelock at 0x7f2d873560c0>
exit_code = 0
site = 'frontend'
app = 'hrms'
err = WrongOptionsDoctypeLinkError('Employee: Options must be a valid DocType for field Employment Type in row 24')
File "apps/frappe/frappe/installer.py", line 311, in install_app
frappe.get_attr(after_install)()
name = 'hrms'
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f2d85e98680>
sync_for = <function sync_for at 0x7f2d85e99620>
sync_customizations = <function sync_customizations at 0x7f2d8746e8e0>
sync_fixtures = <function sync_fixtures at 0x7f2d85e99800>
app_hooks = {'accounting_dimension_doctypes': ['Expense Claim', 'Expense Claim Detail', 'Expense Taxes and Charges', 'Payroll Entry'], 'advance_payment_payable_doctypes': ['Gratuity', 'Employee Advance'], 'after_app_install': ['hrms.setup.after_app_install'], 'after_install': ['hrms.install.after_install'], 'after_migrate': ['hrms.setup.update_select_perm_after_install'], 'app_description': ['Modern HR and Payroll Software'], 'app_email': ['contact@frappe.io'], 'app_include_css': ['hrms.bundle.css'], 'app_include_js': ['hrms.bundle.js'], 'app_license': ['GNU General Public License (v3)'], 'app_name': ['hrms'], 'app_publisher': ['Frappe Technologies Pvt. Ltd.'], 'app_title': ['Frappe HR'], 'bank_reconciliation_doctypes': ['Expense Claim'], 'before_app_uninstall': ['hrms.setup.before_app_uninstall'], 'before_tests': ['hrms.tests.test_utils.before_tests'], 'before_uninstall': ['hrms.uninstall.before_uninstall'], 'calendars': ['Leave Application'], 'doc_events': {'User': {'validate': ['erpnext.setup.d...
installed_apps = ['frappe', 'erpnext']
app = 'frappe/erpnext'
required_app = 'erpnext'
after_install = 'hrms.install.after_install'
File "apps/hrms/hrms/install.py", line 21, in after_install
raise e
BUG_REPORT_URL = 'https://github.com/frappe/hrms/issues/new'
File "apps/hrms/hrms/install.py", line 9, in after_install
setup()
BUG_REPORT_URL = 'https://github.com/frappe/hrms/issues/new'
File "apps/hrms/hrms/setup.py", line 15, in after_install
create_custom_fields(get_custom_fields())
File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 326, in create_custom_fields
create_custom_field(doctype, df, ignore_validate=ignore_validate)
custom_fields = {'Employee': [{'fieldname': 'employment_type', 'fieldtype': 'Link', 'ignore_user_permissions': 1, 'label': 'Employment Type', 'options': 'Employment Type', 'insert_after': 'department'}, {'fieldname': 'job_applicant', 'fieldtype': 'Link', 'label': 'Job Applicant', 'options': 'Job Applicant', 'insert_after': 'employment_details'}, {'fieldname': 'grade', 'fieldtype': 'Link', 'label': 'Grade', 'options': 'Employee Grade', 'insert_after': 'branch'}, {'fieldname': 'default_shift', 'fieldtype': 'Link', 'label': 'Default Shift', 'options': 'Shift Type', 'insert_after': 'holiday_list'}, {'collapsible': 1, 'fieldname': 'health_insurance_section', 'fieldtype': 'Section Break', 'label': 'Health Insurance', 'insert_after': 'health_details'}, {'fieldname': 'health_insurance_provider', 'fieldtype': 'Link', 'label': 'Health Insurance Provider', 'options': 'Employee Health Insurance', 'insert_after': 'health_insurance_section'}, {'depends_on': 'eval:doc.health_insurance_provider', 'fieldname': 'health...
ignore_validate = False
update = True
doctypes_to_update = {'Employee'}
doctypes = ('Employee',)
fields = [{'fieldname': 'employment_type', 'fieldtype': 'Link', 'ignore_user_permissions': 1, 'label': 'Employment Type', 'options': 'Employment Type', 'insert_after': 'department'}, {'fieldname': 'job_applicant', 'fieldtype': 'Link', 'label': 'Job Applicant', 'options': 'Job Applicant', 'insert_after': 'employment_details'}, {'fieldname': 'grade', 'fieldtype': 'Link', 'label': 'Grade', 'options': 'Employee Grade', 'insert_after': 'branch'}, {'fieldname': 'default_shift', 'fieldtype': 'Link', 'label': 'Default Shift', 'options': 'Shift Type', 'insert_after': 'holiday_list'}, {'collapsible': 1, 'fieldname': 'health_insurance_section', 'fieldtype': 'Section Break', 'label': 'Health Insurance', 'insert_after': 'health_details'}, {'fieldname': 'health_insurance_provider', 'fieldtype': 'Link', 'label': 'Health Insurance Provider', 'options': 'Employee Health Insurance', 'insert_after': 'health_insurance_section'}, {'depends_on': 'eval:doc.health_insurance_provider', 'fieldname': 'health_insurance_no...
doctype = 'Employee'
df = {'fieldname': 'employment_type', 'fieldtype': 'Link', 'ignore_user_permissions': 1, 'label': 'Employment Type', 'options': 'Employment Type', 'insert_after': 'department', 'owner': 'Administrator'}
field = None
File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 292, in create_custom_field
custom_field.insert()
doctype = 'Employee'
df = {'fieldname': 'employment_type', 'fieldtype': 'Link', 'ignore_user_permissions': 1, 'label': 'Employment Type', 'options': 'Employment Type', 'insert_after': 'department', 'owner': 'Administrator'}
ignore_validate = False
is_system_generated = True
custom_field = <CustomField: Employee-employment_type>
File "apps/frappe/frappe/model/document.py", line 310, in insert
self.run_post_save_methods()
self = <CustomField: Employee-employment_type>
ignore_permissions = None
ignore_links = None
ignore_if_duplicate = False
ignore_mandatory = None
set_name = None
set_child_names = True
File "apps/frappe/frappe/model/document.py", line 1122, in run_post_save_methods
self.run_method("on_update")
self = <CustomField: Employee-employment_type>
File "apps/frappe/frappe/model/document.py", line 954, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
self = <CustomField: Employee-employment_type>
method = 'on_update'
args = ()
kwargs = {}
fn = <function Document.run_method.<locals>.fn at 0x7f2d843be3e0>
File "apps/frappe/frappe/model/document.py", line 1320, in composer
return composed(self, method, *args, **kwargs)
self = <CustomField: Employee-employment_type>
args = ()
kwargs = {}
hooks = [<function clear_doctype_notifications at 0x7f2d843d3ec0>, <function process_workflow_actions at 0x7f2d843a1a80>, <function attach_files_to_document at 0x7f2d8638b560>, <function apply at 0x7f2d843bc860>, <function update_due_date at 0x7f2d843bc900>, <function apply_permissions_for_non_standard_user_type at 0x7f2d843be200>]
method = 'on_update'
doc_events = {'*': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions'], 'on_update_after_submit': ['frappe.workflow.doctype.workflow_action.workflow_action.process_w...
handler = 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type'
composed = <function Document.hook.<locals>.compose.<locals>.runner at 0x7f2d8400e2a0>
compose = <function Document.hook.<locals>.compose at 0x7f2d8400e340>
f = <function Document.run_method.<locals>.fn at 0x7f2d843be3e0>
File "apps/frappe/frappe/model/document.py", line 1302, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
self = <CustomField: Employee-employment_type>
method = 'on_update'
args = ()
kwargs = {}
add_to_return_value = <function Document.hook.<locals>.add_to_return_value at 0x7f2d8400e200>
fn = <function Document.run_method.<locals>.fn at 0x7f2d843be3e0>
hooks = (<function clear_doctype_notifications at 0x7f2d843d3ec0>, <function process_workflow_actions at 0x7f2d843a1a80>, <function attach_files_to_document at 0x7f2d8638b560>, <function apply at 0x7f2d843bc860>, <function update_due_date at 0x7f2d843bc900>, <function apply_permissions_for_non_standard_user_type at 0x7f2d843be200>)
File "apps/frappe/frappe/model/document.py", line 951, in fn
return method_object(*args, **kwargs)
self = <CustomField: Employee-employment_type>
args = ()
kwargs = {}
method_object = <bound method CustomField.on_update of <CustomField: Employee-employment_type>>
method = 'on_update'
File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 204, in on_update
validate_fields_for_doctype(self.dt)
self = <CustomField: Employee-employment_type>
validate_fields_for_doctype = <function validate_fields_for_doctype at 0x7f2d840c5d00>
File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1178, in validate_fields_for_doctype
validate_fields(meta)
doctype = 'Employee'
meta = <Meta: Employee>
File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1616, in validate_fields
check_link_table_options(meta.get("name"), d)
meta = <Meta: Employee>
check_illegal_characters = <function validate_fields.<locals>.check_illegal_characters at 0x7f2d840cce00>
check_invalid_fieldnames = <function validate_fields.<locals>.check_invalid_fieldnames at 0x7f2d840cc9a0>
check_unique_fieldname = <function validate_fields.<locals>.check_unique_fieldname at 0x7f2d840cc860>
check_fieldname_length = <function validate_fields.<locals>.check_fieldname_length at 0x7f2d840ccc20>
check_illegal_mandatory = <function validate_fields.<locals>.check_illegal_mandatory at 0x7f2d840ccd60>
check_link_table_options = <function validate_fields.<locals>.check_link_table_options at 0x7f2d840ccb80>
check_hidden_and_mandatory = <function validate_fields.<locals>.check_hidden_and_mandatory at 0x7f2d840cccc0>
check_width = <function validate_fields.<locals>.check_width at 0x7f2d840cca40>
check_in_list_view = <function validate_fields.<locals>.check_in_list_view at 0x7f2d840cc900>
check_in_global_search = <function validate_fields.<locals>.check_in_global_search at 0x7f2d840ccae0>
check_dynamic_link_options = <function validate_fields.<locals>.check_dynamic_link_options at 0x7f2d840cc540>
check_illegal_default = <function validate_fields.<locals>.check_illegal_default at 0x7f2d840cc680>
check_precision = <function validate_fields.<locals>.check_precision at 0x7f2d840cc720>
check_unique_and_text = <function validate_fields.<locals>.check_unique_and_text at 0x7f2d840cc5e0>
check_fold = <function validate_fields.<locals>.check_fold at 0x7f2d840cc7c0>
check_search_fields = <function validate_fields.<locals>.check_search_fields at 0x7f2d840cc220>
check_title_field = <function validate_fields.<locals>.check_title_field at 0x7f2d840cc360>
check_image_field = <function validate_fields.<locals>.check_image_field at 0x7f2d840cc400>
check_is_published_field = <function validate_fields.<locals>.check_is_published_field at 0x7f2d840cc2c0>
check_website_search_field = <function validate_fields.<locals>.check_website_search_field at 0x7f2d840cc4a0>
check_timeline_field = <function validate_fields.<locals>.check_timeline_field at 0x7f2d840cc040>
check_sort_field = <function validate_fields.<locals>.check_sort_field at 0x7f2d840cc0e0>
check_illegal_depends_on_conditions = <function validate_fields.<locals>.check_illegal_depends_on_conditions at 0x7f2d840cc180>
check_table_multiselect_option = <function validate_fields.<locals>.check_table_multiselect_option at 0x7f2d840a4040>
scrub_options_in_select = <function validate_fields.<locals>.scrub_options_in_select at 0x7f2d840a5580>
scrub_fetch_from = <function validate_fields.<locals>.scrub_fetch_from at 0x7f2d840a7ce0>
validate_data_field_type = <function validate_fields.<locals>.validate_data_field_type at 0x7f2d840a7e20>
check_child_table_option = <function validate_fields.<locals>.check_child_table_option at 0x7f2d840a7ec0>
check_max_height = <function validate_fields.<locals>.check_max_height at 0x7f2d840a7d80>
check_no_of_ratings = <function validate_fields.<locals>.check_no_of_ratings at 0x7f2d840a7f60>
d = <LinkDocField: employment_type parent=Employee>
fieldname_list = ['basic_details_tab', 'basic_information', 'employee', 'naming_series', 'first_name', 'middle_name', 'last_name', 'employee_name', 'column_break_9', 'gender', 'date_of_birth', 'salutation', 'column_break1', 'date_of_joining', 'image', 'status', 'erpnext_user', 'user_id', 'create_user', 'create_user_permission', 'company_details_section', 'company', 'department', 'employment_type', 'employee_number', 'column_break_25', 'designation', 'reports_to', 'column_break_18', 'branch', 'employment_details', 'scheduled_confirmation_date', 'column_break_32', 'final_confirmation_date', 'contract_end_date', 'col_break_22', 'notice_number_of_days', 'date_of_retirement', 'contact_details', 'cell_number', 'column_break_40', 'personal_email', 'company_email', 'column_break4', 'prefered_contact_email', 'prefered_email', 'unsubscribed', 'address_section', 'current_address', 'current_accommodation_type', 'column_break_46', 'permanent_address', 'permanent_accommodation_type', 'emergency_contact_details', 'pe...
fields = [<Tab BreakDocField: basic_details_tab parent=Employee>, <Section BreakDocField: basic_information parent=Employee>, <DataDocField: employee parent=Employee>, <SelectDocField: naming_series parent=Employee>, <DataDocField: first_name parent=Employee>, <DataDocField: middle_name parent=Employee>, <DataDocField: last_name parent=Employee>, <DataDocField: employee_name parent=Employee>, <Column BreakDocField: column_break_9 parent=Employee>, <LinkDocField: gender parent=Employee>, <DateDocField: date_of_birth parent=Employee>, <LinkDocField: salutation parent=Employee>, <Column BreakDocField: column_break1 parent=Employee>, <DateDocField: date_of_joining parent=Employee>, <Attach ImageDocField: image parent=Employee>, <SelectDocField: status parent=Employee>, <Section BreakDocField: erpnext_user parent=Employee>, <LinkDocField: user_id parent=Employee>, <ButtonDocField: create_user parent=Employee>, <CheckDocField: create_user_permission parent=Employee>, <Section BreakDocField: company_d...
not_allowed_in_list_view = ['Section Break', 'Column Break', 'Tab Break', 'HTML', 'Table', 'Table MultiSelect', 'Button', 'Image', 'Fold', 'Heading', 'Attach Image']
File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1253, in check_link_table_options
frappe.throw(
docname = 'Employee'
d = <LinkDocField: employment_type parent=Employee>
options = None
File "apps/frappe/frappe/__init__.py", line 578, in throw
msgprint(
msg = 'Employee: Options must be a valid DocType for field Employment Type in row 24'
exc = <class 'frappe.core.doctype.doctype.doctype.WrongOptionsDoctypeLinkError'>
title = None
is_minimizable = False
wide = False
as_list = False
File "apps/frappe/frappe/__init__.py", line 550, in msgprint
_raise_exception()
msg = 'Employee: Options must be a valid DocType for field Employment Type in row 24'
title = None
raise_exception = <class 'frappe.core.doctype.doctype.doctype.WrongOptionsDoctypeLinkError'>
as_table = False
as_list = False
indicator = 'red'
alert = False
primary_action = None
is_minimizable = False
wide = False
realtime = False
sys = <module 'sys' (built-in)>
_raise_exception = <function msgprint.<locals>._raise_exception at 0x7f2d840a79c0>
_strip_html_tags = <functools._lru_cache_wrapper object at 0x7f2d840149e0>
inspect = <module 'inspect' from '/usr/local/lib/python3.11/inspect.py'>
out = {'message': 'Employee: Options must be a valid DocType for field Employment Type in row 24', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '7b33ce174bfb74859d51cd2ac7242885ddf2d137c85039b54a4579ee'}
strip_html_tags = <function strip_html_tags at 0x7f2d88199760>
File "apps/frappe/frappe/__init__.py", line 501, in _raise_exception
raise exc
exc = WrongOptionsDoctypeLinkError('Employee: Options must be a valid DocType for field Employment Type in row 24')
inspect = <module 'inspect' from '/usr/local/lib/python3.11/inspect.py'>
msg = 'Employee: Options must be a valid DocType for field Employment Type in row 24'
out = {'message': 'Employee: Options must be a valid DocType for field Employment Type in row 24', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '7b33ce174bfb74859d51cd2ac7242885ddf2d137c85039b54a4579ee'}
raise_exception = <class 'frappe.core.doctype.doctype.doctype.WrongOptionsDoctypeLinkError'>
frappe.core.doctype.doctype.doctype.WrongOptionsDoctypeLinkError: Employee: Options must be a valid DocType for field Employment Type in row 24
```