Contacts and Calendar throw internal error
Impacted versions
- OS Type: Debian
- OS Version: 10
- Database Type: MySQL
- Database version: 10.3.27-MariaDB-0+deb10u1
- Modoboa: 1.17.0
- installer used: Yes
- Webserver: Nginx
- python --version: Python 3.7.3
Steps to reproduce
- Do a default install of Modoboa on Debian 10.
- [Using "mailsrv" instead of "mail" as the mail server's subdomain. Using Let's Encrypt.]
- Set up a first mail domain for testing (modoboa.MY-DOMAIN-HERE.de)
- Set up a domain administrator account with mail box ([email protected])
- Using fresh account, try to access "Contacts" or "Calendar" from the menu.
Current behavior
Sorry
An internal error has occured.
Expected behavior
Open contacts or calendar module.
+1 I have the same issue with a fresh Ubuntu 20.04 install. Nothing I tried to configure worked.
+1 Same here on Debian 10 using the installer with default settings and letsencrypt
I've done some further investigations. The problem seems to resist in uwsgi in combination with django.
On a working server in /var/log/uwsgi/app/modoboa_instance.log
[RADACTED] [pid: 2434|app: 1|req: 317/519] [RADACTED] () {52 vars in 985 bytes} [Fri May 28 08:20:08 2021] GET /contacts/ => generated 5334 bytes in 92 msecs (HTTP/1.1 200) 5 headers in 163 bytes (1 switches on core 0)
[RADACTED] [pid: 2433|app: 1|req: 203/520] [RADACTED] () {50 vars in 874 bytes} [Fri May 28 08:20:08 2021] GET /jsi18n/ => generated 5535 bytes in 55 msecs (HTTP/1.1 200) 5 headers in 171 bytes (1 switches on core 0)
[RADACTED] [pid: 2434|app: 1|req: 318/521] [RADACTED] () {54 vars in 1049 bytes} [Fri May 28 08:20:08 2021] GET /api/v1/categories/ => generated 2 bytes in 58 msecs (HTTP/1.1 200) 6 headers in 193 bytes (1 switches on core 0)
[RADACTED] [pid: 2433|app: 1|req: 204/522] [RADACTED] () {54 vars in 1045 bytes} [Fri May 28 08:20:08 2021] GET /api/v1/contacts/ => generated 2 bytes in 51 msecs (HTTP/1.1 200) 6 headers in 193 bytes (1 switches on core 0)
[RADACTED] [pid: 2434|app: 1|req: 319/523] [RADACTED] () {54 vars in 1071 bytes} [Fri May 28 08:20:08 2021] GET /api/v1/address-books/default/ => generated 108 bytes in 41 msecs (HTTP/1.1 200) 6 headers in 189 bytes (1 switches on core 0)
[RADACTED] [pid: 2433|app: 1|req: 205/524] [RADACTED] () {52 vars in 986 bytes} [Fri May 28 08:20:09 2021] GET /calendars/ => generated 5649 bytes in 106 msecs (HTTP/1.1 200) 5 headers in 163 bytes (1 switches on core 0)
[RADACTED] [pid: 2434|app: 1|req: 320/525] [RADACTED] () {50 vars in 875 bytes} [Fri May 28 08:20:09 2021] GET /jsi18n/ => generated 5535 bytes in 55 msecs (HTTP/1.1 200) 5 headers in 171 bytes (1 switches on core 0)
[RADACTED] [pid: 2433|app: 1|req: 206/526] [RADACTED] () {54 vars in 1058 bytes} [Fri May 28 08:20:10 2021] GET /api/v1/user-calendars/ => generated 286 bytes in 44 msecs (HTTP/1.1 200) 6 headers in 195 bytes (1 switches on core 0)
[RADACTED] [pid: 2434|app: 1|req: 321/527] [RADACTED] () {54 vars in 1062 bytes} [Fri May 28 08:20:10 2021] GET /api/v1/shared-calendars/ => generated 2 bytes in 49 msecs (HTTP/1.1 200) 6 headers in 193 bytes (1 switches on core 0)
[RADACTED] [pid: 2433|app: 1|req: 207/528] [RADACTED] () {52 vars in 1192 bytes} [Fri May 28 08:20:10 2021] GET /api/v1/user-calendars/2/events/?start=2021-05-24T00%3A00%3A00%2B02%3A00&end=2021-05-31T00%3A00%3A00%2B02%3A00&_=1622182810023 => generated 889 bytes in 340 msecs (HTTP/1.1 500) 5 headers in 181 bytes (1 switches on core 0)
you can see, the /api/v1/contacts and /api/v1/user-calendars/ will be queried.
On the other hand, in the fault instance:
[RADACTED] [pid: 1712|app: 1|req: 11/29] [RADACTED] () {54 vars in 1011 bytes} [Fri May 28 08:23:30 2021] GET /contacts/ => generated 870 bytes in 154 msecs (HTTP/1.1 500) 5 headers in 181 bytes (1 switches on core 0)
[RADACTED] [pid: 1715|app: 1|req: 19/30] [RADACTED] () {52 vars in 905 bytes} [Fri May 28 08:23:30 2021] GET /jsi18n/ => generated 3223 bytes in 73 msecs (HTTP/1.1 200) 5 headers in 171 bytes (1 switches on core 0)
[RADACTED] [pid: 1715|app: 1|req: 20/31] [RADACTED] () {50 vars in 889 bytes} [Fri May 28 08:23:31 2021] GET /favicon.ico => generated 878 bytes in 53 msecs (HTTP/1.1 404) 5 headers in 169 bytes (1 switches on core 0)
[RADACTED] [pid: 1712|app: 1|req: 12/32] [RADACTED] () {52 vars in 982 bytes} [Fri May 28 08:23:32 2021] GET /calendars/ => generated 870 bytes in 152 msecs (HTTP/1.1 500) 5 headers in 181 bytes (1 switches on core 0)
[RADACTED] [pid: 1715|app: 1|req: 21/33] [RADACTED] () {50 vars in 875 bytes} [Fri May 28 08:23:32 2021] GET /jsi18n/ => generated 3223 bytes in 63 msecs (HTTP/1.1 200) 5 headers in 171 bytes (1 switches on core 0)
no API requests ...
Radicale itself seems to work. I can access the cal from remote
+1 It goes somewhat like this:
Request Method: | GET https://mail.mydomain.de/contacts/
KeyError
'assets'
Will provide stacktraces if that helps.... Can you nudge me in the direction where to start debugging this?
[Browser: Firefox, Server: Ubuntu 20.04]
/var/log/uwsgi/app/modoboa_instance.log :
[...] GET /contacts/ => generated 870 bytes in 116 msecs (HTTP/1.1 500) 5 headers in 181 bytes (2 switches on core 0)
[...] GET /jsi18n/ => generated 3223 bytes in 46 msecs (HTTP/1.1 200) 5 headers in 171 bytes (1 switches on core 0)
I am encountering the same issue when attempting to install in a container, but not on a default Ubuntu Server isntance.
You have more information if you enable debug traces: edit /srv/modoboa/instance/instance/settings.py, set DEBUG to True, save and reload uwsgi. Then, go to the contacts or calendars app and you should see a different page.
@tonioo
Stacktrace
KeyError at /contacts/
'assets'
Request Method: GET
Request URL: https://[REDACTED]/contacts/
Django Version: 2.2.23
Exception Type: KeyError
Exception Value:
'assets'
Exception Location: /srv/modoboa/env/lib/python3.8/site-packages/webpack_loader/loader.py in get_bundle, line 90
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.8.5
Python Path:
['.',
'',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/srv/modoboa/env/lib/python3.8/site-packages']
Server time: Mon, 7 Jun 2021 11:30:37 +0200
Environment:
Request Method: GET
Request URL: https://[REDACTED]/contacts/
Django Version: 2.2.23
Python Version: 3.8.5
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'reversion',
'ckeditor',
'ckeditor_uploader',
'rest_framework',
'rest_framework.authtoken',
'phonenumber_field',
'django_otp',
'django_otp.plugins.otp_totp',
'django_otp.plugins.otp_static',
'modoboa',
'modoboa.core',
'modoboa.lib',
'modoboa.admin',
'modoboa.transport',
'modoboa.relaydomains',
'modoboa.limits',
'modoboa.parameters',
'modoboa.dnstools',
'modoboa.policyd',
'modoboa.maillog',
'modoboa_amavis',
'modoboa_pdfcredentials',
'modoboa_postfix_autoreply',
'modoboa_sievefilters',
'modoboa_webmail',
'modoboa_contacts',
'modoboa_radicale',
'webpack_loader')
Installed Middleware:
('x_forwarded_for.middleware.XForwardedForMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_otp.middleware.OTPMiddleware',
'modoboa.core.middleware.TwoFAMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'modoboa.core.middleware.LocalConfigMiddleware',
'modoboa.lib.middleware.AjaxLoginRedirect',
'modoboa.lib.middleware.CommonExceptionCatcher',
'modoboa.lib.middleware.RequestCatcherMiddleware')
Traceback:
File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
145. response = self.process_exception_by_middleware(e, request)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
143. response = response.render()
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/response.py" in render
106. self.content = self.rendered_content
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/response.py" in rendered_content
83. content = template.render(context, self._request)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/backends/django.py" in render
61. return self.template.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render
171. return self._render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in _render
163. return self.nodelist.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/loader_tags.py" in render
150. return compiled_parent._render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in _render
163. return self.nodelist.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/loader_tags.py" in render
150. return compiled_parent._render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in _render
163. return self.nodelist.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/loader_tags.py" in render
62. result = block.nodelist.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/defaulttags.py" in render
309. return nodelist.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render
937. bit = node.render_annotated(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/base.py" in render_annotated
904. return self.render(context)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/template/library.py" in render
192. output = self.func(*resolved_args, **resolved_kwargs)
File "/srv/modoboa/env/lib/python3.8/site-packages/webpack_loader/templatetags/webpack_loader.py" in render_bundle
12. tags = utils.get_as_tags(bundle_name, extension=extension, config=config, attrs=attrs)
File "/srv/modoboa/env/lib/python3.8/site-packages/webpack_loader/utils.py" in get_as_tags
62. bundle = _get_bundle(bundle_name, extension, config)
File "/srv/modoboa/env/lib/python3.8/site-packages/webpack_loader/utils.py" in _get_bundle
40. bundle = get_loader(config).get_bundle(bundle_name)
File "/srv/modoboa/env/lib/python3.8/site-packages/webpack_loader/loader.py" in get_bundle
90. asset = assets['assets'][chunk]
Exception Type: KeyError at /contacts/
Exception Value: 'assets'
ENV
Request information
USER
[REDACTED]
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
Variable Value
csrftoken
'[REDACTED]'
sessionid
'[REDACTED]'
META
Variable Value
CONTENT_LENGTH
''
CONTENT_TYPE
''
CSRF_COOKIE
'[REDACTED]'
DOCUMENT_ROOT
'/srv/modoboa/instance'
HTTPS
'on'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
HTTP_ACCEPT_ENCODING
'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE
'de,en-US;q=0.7,en;q=0.3'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
('csrftoken=[REDACTED]; '
'sessionid=[REDACTED]')
HTTP_HOST
'[REDACTED]'
HTTP_REFERER
'https://[REDACTED]/user/'
HTTP_UPGRADE_INSECURE_REQUESTS
'1'
HTTP_USER_AGENT
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0'
PATH_INFO
'/contacts/'
QUERY_STRING
''
REMOTE_ADDR
'[REDACTED]'
REMOTE_PORT
'59636'
REQUEST_METHOD
'GET'
REQUEST_SCHEME
'https'
REQUEST_URI
'/contacts/'
SCRIPT_NAME
''
SERVER_NAME
'[REDACTED]'
SERVER_PORT
'443'
SERVER_PROTOCOL
'HTTP/1.1'
UWSGI_APPID
'[REDACTED]|'
UWSGI_SCRIPT
'instance.wsgi:application'
uwsgi.node
b'[REDACTED]'
uwsgi.version
b'2.0.18-debian'
wsgi.errors
<_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper
''
wsgi.input
<uwsgi._Input object at 0x7fba9eb26d50>
wsgi.multiprocess
True
wsgi.multithread
False
wsgi.run_once
False
wsgi.url_scheme
'https'
wsgi.version
(1, 0)
Settings
Using settings module instance.settings
Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
[]
ALLOWED_HOSTS
['[REDACTED]']
AMAVIS_DEFAULT_DATABASE_ENCODING
'LATIN1'
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
AUTH_PASSWORD_VALIDATORS
'********************'
AUTH_USER_MODEL
'core.User'
BASE_DIR
'/srv/modoboa/instance'
CACHES
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS
'default'
CACHE_MIDDLEWARE_KEY_PREFIX
'********************'
CACHE_MIDDLEWARE_SECONDS
600
CKEDITOR_ALLOW_NONIMAGE_FILES
False
CKEDITOR_BROWSE_SHOW_DIRS
True
CKEDITOR_CONFIGS
{'default': {'allowedContent': True,
'toolbar': 'Modoboa',
'toolbar_Modoboa': [['Bold', 'Italic', 'Underline'],
['JustifyLeft',
'JustifyCenter',
'JustifyRight',
'JustifyBlock'],
['BidiLtr', 'BidiRtl', 'Language'],
['NumberedList',
'BulletedList',
'-',
'Outdent',
'Indent'],
['Undo', 'Redo'],
['Link', 'Unlink', 'Anchor', '-', 'Smiley'],
['TextColor', 'BGColor', '-', 'Source'],
['Font', 'FontSize'],
['Image'],
['SpellChecker']],
'width': None}}
CKEDITOR_IMAGE_BACKEND
'pillow'
CKEDITOR_RESTRICT_BY_USER
True
CKEDITOR_UPLOAD_PATH
'uploads/'
CSRF_COOKIE_AGE
31449600
CSRF_COOKIE_DOMAIN
None
CSRF_COOKIE_HTTPONLY
False
CSRF_COOKIE_NAME
'csrftoken'
CSRF_COOKIE_PATH
'/'
CSRF_COOKIE_SAMESITE
'Lax'
CSRF_COOKIE_SECURE
True
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME
'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS
[]
CSRF_USE_SESSIONS
False
DATABASES
{'amavis': {'ATOMIC_REQUESTS': True,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'amavis',
'OPTIONS': {'init_command': 'SET foreign_key_checks = 0;'},
'PASSWORD': '********************',
'PORT': '',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': None,
'USER': 'amavis'},
'default': {'ATOMIC_REQUESTS': True,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'NAME': 'modoboa',
'OPTIONS': {'init_command': 'SET foreign_key_checks = 0;'},
'PASSWORD': '********************',
'PORT': '',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': None,
'USER': 'modoboa'}}
DATABASE_ROUTERS
['modoboa_amavis.dbrouter.AmavisRouter']
DATA_UPLOAD_MAX_MEMORY_SIZE
2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS
1000
DATETIME_FORMAT
'N j, Y, P'
DATETIME_INPUT_FORMATS
['%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M',
'%m/%d/%y']
DATE_FORMAT
'N j, Y'
DATE_INPUT_FORMATS
['%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y']
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DECIMAL_SEPARATOR
'.'
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISABLE_DASHBOARD_EXTERNAL_QUERIES
False
DISALLOWED_USER_AGENTS
[]
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SSL_CERTFILE
None
EMAIL_SSL_KEYFILE
'********************'
EMAIL_SUBJECT_PREFIX
'[Django] '
EMAIL_TIMEOUT
None
EMAIL_USE_LOCALTIME
False
EMAIL_USE_SSL
False
EMAIL_USE_TLS
False
FILE_CHARSET
'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
FILE_UPLOAD_HANDLERS
['django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_TEMP_DIR
None
FIRST_DAY_OF_WEEK
0
FIXTURE_DIRS
[]
FORCE_SCRIPT_NAME
None
FORMAT_MODULE_PATH
None
FORM_RENDERER
'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS
[]
INSTALLED_APPS
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'reversion',
'ckeditor',
'ckeditor_uploader',
'rest_framework',
'rest_framework.authtoken',
'phonenumber_field',
'django_otp',
'django_otp.plugins.otp_totp',
'django_otp.plugins.otp_static',
'modoboa',
'modoboa.core',
'modoboa.lib',
'modoboa.admin',
'modoboa.transport',
'modoboa.relaydomains',
'modoboa.limits',
'modoboa.parameters',
'modoboa.dnstools',
'modoboa.policyd',
'modoboa.maillog',
'modoboa_amavis',
'modoboa_pdfcredentials',
'modoboa_postfix_autoreply',
'modoboa_sievefilters',
'modoboa_webmail',
'modoboa_contacts',
'modoboa_radicale',
'webpack_loader')
INTERNAL_IPS
[]
LANGUAGES
[('af', 'Afrikaans'),
('ar', 'Arabic'),
('ast', 'Asturian'),
('az', 'Azerbaijani'),
('bg', 'Bulgarian'),
('be', 'Belarusian'),
('bn', 'Bengali'),
('br', 'Breton'),
('bs', 'Bosnian'),
('ca', 'Catalan'),
('cs', 'Czech'),
('cy', 'Welsh'),
('da', 'Danish'),
('de', 'German'),
('dsb', 'Lower Sorbian'),
('el', 'Greek'),
('en', 'English'),
('en-au', 'Australian English'),
('en-gb', 'British English'),
('eo', 'Esperanto'),
('es', 'Spanish'),
('es-ar', 'Argentinian Spanish'),
('es-co', 'Colombian Spanish'),
('es-mx', 'Mexican Spanish'),
('es-ni', 'Nicaraguan Spanish'),
('es-ve', 'Venezuelan Spanish'),
('et', 'Estonian'),
('eu', 'Basque'),
('fa', 'Persian'),
('fi', 'Finnish'),
('fr', 'French'),
('fy', 'Frisian'),
('ga', 'Irish'),
('gd', 'Scottish Gaelic'),
('gl', 'Galician'),
('he', 'Hebrew'),
('hi', 'Hindi'),
('hr', 'Croatian'),
('hsb', 'Upper Sorbian'),
('hu', 'Hungarian'),
('hy', 'Armenian'),
('ia', 'Interlingua'),
('id', 'Indonesian'),
('io', 'Ido'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('kab', 'Kabyle'),
('kk', 'Kazakh'),
('km', 'Khmer'),
('kn', 'Kannada'),
('ko', 'Korean'),
('lb', 'Luxembourgish'),
('lt', 'Lithuanian'),
('lv', 'Latvian'),
('mk', 'Macedonian'),
('ml', 'Malayalam'),
('mn', 'Mongolian'),
('mr', 'Marathi'),
('my', 'Burmese'),
('nb', 'Norwegian Bokmål'),
('ne', 'Nepali'),
('nl', 'Dutch'),
('nn', 'Norwegian Nynorsk'),
('os', 'Ossetic'),
('pa', 'Punjabi'),
('pl', 'Polish'),
('pt', 'Portuguese'),
('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'),
('ru', 'Russian'),
('sk', 'Slovak'),
('sl', 'Slovenian'),
('sq', 'Albanian'),
('sr', 'Serbian'),
('sr-latn', 'Serbian Latin'),
('sv', 'Swedish'),
('sw', 'Swahili'),
('ta', 'Tamil'),
('te', 'Telugu'),
('th', 'Thai'),
('tr', 'Turkish'),
('tt', 'Tatar'),
('udm', 'Udmurt'),
('uk', 'Ukrainian'),
('ur', 'Urdu'),
('vi', 'Vietnamese'),
('zh-hans', 'Simplified Chinese'),
('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI
['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE
'en'
LANGUAGE_COOKIE_AGE
None
LANGUAGE_COOKIE_DOMAIN
None
LANGUAGE_COOKIE_NAME
'django_language'
LANGUAGE_COOKIE_PATH
'/'
LOCALE_PATHS
[]
LOGGING
{'formatters': {'syslog': {'format': '%(name)s: %(levelname)s %(message)s'}},
'handlers': {'mail-admins': {'class': 'django.utils.log.AdminEmailHandler',
'include_html': True,
'level': 'ERROR'},
'modoboa': {'class': 'modoboa.core.loggers.SQLHandler'},
'syslog-auth': {'class': 'logging.handlers.SysLogHandler',
'facility': 4,
'formatter': 'syslog'},
'syslog-mail': {'class': 'logging.handlers.SysLogHandler',
'facility': 2,
'formatter': 'syslog'}},
'loggers': {'django': {'handlers': ['mail-admins'],
'level': 'ERROR',
'propagate': False},
'modoboa.admin': {'handlers': ['modoboa'],
'level': 'INFO',
'propagate': False},
'modoboa.auth': {'handlers': ['syslog-auth', 'modoboa'],
'level': 'INFO',
'propagate': False},
'modoboa.policyd': {'handlers': ['syslog-mail'],
'level': 'INFO',
'propagate': False}},
'version': 1}
LOGGING_CONFIG
'logging.config.dictConfig'
LOGIN_REDIRECT_URL
'/accounts/profile/'
LOGIN_URL
'/accounts/login/'
LOGOUT_REDIRECT_URL
None
MANAGERS
[]
MEDIA_ROOT
'/srv/modoboa/instance/media'
MEDIA_URL
'/media/'
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE
('x_forwarded_for.middleware.XForwardedForMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_otp.middleware.OTPMiddleware',
'modoboa.core.middleware.TwoFAMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'modoboa.core.middleware.LocalConfigMiddleware',
'modoboa.lib.middleware.AjaxLoginRedirect',
'modoboa.lib.middleware.CommonExceptionCatcher',
'modoboa.lib.middleware.RequestCatcherMiddleware')
MIGRATION_MODULES
{}
MODOBOA_API_URL
'********************'
MODOBOA_APPS
('modoboa',
'modoboa.core',
'modoboa.lib',
'modoboa.admin',
'modoboa.transport',
'modoboa.relaydomains',
'modoboa.limits',
'modoboa.parameters',
'modoboa.dnstools',
'modoboa.policyd',
'modoboa.maillog',
'modoboa_amavis',
'modoboa_pdfcredentials',
'modoboa_postfix_autoreply',
'modoboa_sievefilters',
'modoboa_webmail',
'modoboa_contacts',
'modoboa_radicale')
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
OTP_TOTP_ISSUER
'[REDACTED]'
PASSWORD_HASHERS
'********************'
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PHONENUMBER_DB_FORMAT
'INTERNATIONAL'
PREPEND_WWW
False
REDIS_HOST
'localhost'
REDIS_PORT
6379
REDIS_QUOTA_DB
0
REDIS_URL
'redis://localhost:6379/0'
REST_FRAMEWORK
{'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication')}
ROOT_URLCONF
'instance.urls'
SECRET_KEY
'********************'
SECURE_BROWSER_XSS_FILTER
False
SECURE_CONTENT_TYPE_NOSNIFF
False
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
SECURE_HSTS_PRELOAD
False
SECURE_HSTS_SECONDS
0
SECURE_PROXY_SSL_HEADER
None
SECURE_REDIRECT_EXEMPT
[]
SECURE_SSL_HOST
None
SECURE_SSL_REDIRECT
False
SERVER_EMAIL
'root@localhost'
SESSION_CACHE_ALIAS
'default'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_HTTPONLY
True
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SAMESITE
'Lax'
SESSION_COOKIE_SECURE
True
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE
'instance.settings'
SHORT_DATETIME_FORMAT
'm/d/Y P'
SHORT_DATE_FORMAT
'm/d/Y'
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS
['security.W019', 'fields.W342']
SITE_ID
1
STATICFILES_DIRS
('/srv/modoboa/env/lib/python3.8/site-packages/modoboa/bower_components',)
STATICFILES_FINDERS
['django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT
'/srv/modoboa/instance/sitestatic'
STATIC_URL
'/sitestatic/'
TEMPLATES
[{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'modoboa.core.context_processors.top_notifications'],
'debug': False}}]
TEST_NON_SERIALIZED_APPS
[]
TEST_RUNNER
'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR
','
TIME_FORMAT
'P'
TIME_INPUT_FORMATS
['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE
'Europe/Paris'
USE_I18N
True
USE_L10N
True
USE_THOUSAND_SEPARATOR
False
USE_TZ
True
USE_X_FORWARDED_HOST
False
USE_X_FORWARDED_PORT
False
WEBPACK_LOADER
{'CALENDAR': {'BUNDLE_DIR_NAME': 'modoboa_radicale/',
'CACHE': False,
'IGNORE': ['.+\\.hot-update.js', '.+\\.map'],
'STATS_FILE': '/srv/modoboa/env/lib/python3.8/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json'},
'CONTACTS': {'BUNDLE_DIR_NAME': 'modoboa_contacts/',
'CACHE': False,
'IGNORE': ['.+\\.hot-update.js', '.+\\.map'],
'STATS_FILE': '/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/static/modoboa_contacts/webpack-stats.json'}}
WSGI_APPLICATION
'instance.wsgi.application'
X_FRAME_OPTIONS
'SAMEORIGIN'
YEAR_MONTH_FORMAT
'F Y'
@nippold Thanks! It's actually an issue with one of the requirements: django-webpack-loader. A new version is available and it is not compatible anymore with the files embedded by Modoboa. Quick fix: downgrade the version to 0.7.0
(env)> pip install django-webpack-loader==0.7.0
@tonioo Thanks for your feedback (and patch). It works again 👍🏻
@tonioo Thanks for your feedback. Installed version 0.7.0 and rebooted, but no success. Still getting the same errors. Is there anything else I need to do?
@mas1701 Did you install it inside the virtualenv?
try this: sudo -u modoboa -i bash cd /srv/modoboa/ source env/bin/activate (env)> pip install django-webpack-loader==0.7.0 reboot
@tonioo No, I didn't. I have little experience with Python. I'm not a developer. ;-)
@KrystianPlichta Perfect, that really helped!
Thanks!
Potential cause: https://github.com/django-webpack/django-webpack-loader#migrating-from-version--100
In order to use django-webpack-loader>=1.0.0, you must ensure that [email protected] is being used on the JavaScript side.
After a search in code: https://github.com/search?q=org%3Amodoboa+webpack-bundle-tracker%40&type=code
--> modoboa uses either 0.4.3 and 0.4.2-beta (depending on package)
Files which need to get updated to [email protected]:
- modoboa/modoboa-contacts/frontend/package.json
- modoboa/modoboa-radicale/frontend/package.json
- modoboa/modoboa-imap-migration/frontend/package.json
- modoboa/modoboa-imap-migration/frontend/yarn.lock