Closed rebelstartupper closed 7 months ago
I just did a fresh install on Ubuntu 22.04.4 LTS and used the installer. After configuring a domain and a user, I tried to access /calendars/ and got also an error:
OSError at /calendars/
Error reading /srv/modoboa/env/lib/python3.10/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json. Are you sure webpack has generated the file and the path is correct?
Environment:
Request Method: GET Request URL: https://mail.net/calendars/
Django Version: 4.2.11 Python Version: 3.10.12 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', 'drf_spectacular', 'phonenumber_field', 'django_otp', 'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_static', 'django_rename_app', 'django_rq', 'modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.transport', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa.dnstools', 'modoboa.policyd', 'modoboa.maillog', 'modoboa.pdfcredentials', 'modoboa.dmarc', 'modoboa.imap_migration', 'modoboa_amavis', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_webmail', 'modoboa_contacts', 'modoboa_radicale', 'webpack_loader') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'x_forwarded_for.middleware.XForwardedForMiddleware', '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.clickjacking.XFrameOptionsMiddleware', 'modoboa.core.middleware.LocalConfigMiddleware', 'modoboa.lib.middleware.AjaxLoginRedirect', 'modoboa.lib.middleware.CommonExceptionCatcher', 'modoboa.lib.middleware.RequestCatcherMiddleware')
Traceback (most recent call last): File "/srv/modoboa/env/lib/python3.10/site-packages/webpack_loader/loader.py", line 26, in load_assets with open(self.config['STATS_FILE'], encoding="utf-8") as f:
During handling of the above exception ([Errno 2] No such file or directory: '/srv/modoboa/env/lib/python3.10/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json'), another exception occurred:
File "/srv/modoboa/env/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/srv/modoboa/env/lib/python3.10/site-packages/django/core/handlers/base.py", line 220, in _get_response
response = response.render()
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/response.py", line 114, in render
self.content = self.rendered_content
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/response.py", line 92, in rendered_content
return template.render(context, self._request)
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/base.py", line 175, in render
return self._render(context)
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/base.py", line 167, in _render
return self.nodelist.render(context)
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/srv/modoboa/env/lib/python3.10/site-packages/django/template/base.py", line 1005, in
Exception Type: OSError at /calendars/ Exception Value: Error reading /srv/modoboa/env/lib/python3.10/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json. Are you sure webpack has generated the file and the path is correct?
Any ideas?
I've just released a new version of the calendar plugin which should fix this issue.
Impacted versions
Steps to reproduce
Current behaviour
Sorry An internal error has occured.
Expected behavior
Open calendar module
Screenshot link
When I went to /var/log/uwsgi/app/modoboa_instance.log. I found in the log the following:
mail.DOMAIN.com [pid: 1298|app: 1|req: 216/412] xxx.xxx.xxx.xxx () {64 vars in 1312 bytes} [Sun Feb 18 01:02:34 2024] GET /contacts/ => generated 5449 bytes in 86 msecs (HTTP/2.0 200) 6 headers in 307 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 217/413] xxx.xxx.xxx.xxx () {60 vars in 1114 bytes} [Sun Feb 18 01:02:34 2024] GET /jsi18n/ => generated 3343 bytes in 39 msecs (HTTP/2.0 200) 5 headers in 171 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 218/414] xxx.xxx.xxx.xxx () {64 vars in 1249 bytes} [Sun Feb 18 01:02:34 2024] GET /api/v1/contacts/ => generated 2 bytes in 52 msecs (HTTP/2.0 200) 6 headers in 193 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 171/415] xxx.xxx.xxx.xxx () {64 vars in 1253 bytes} [Sun Feb 18 01:02:34 2024] GET /api/v1/categories/ => generated 2 bytes in 76 msecs (HTTP/2.0 200) 6 headers in 193 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 219/416] xxx.xxx.xxx.xxx () {64 vars in 1275 bytes} [Sun Feb 18 01:02:34 2024] GET /api/v1/address-books/default/ => generated 95 bytes in 67 msecs (HTTP/2.0 200) 6 headers in 188 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 172/417] xxx.xxx.xxx.xxx () {64 vars in 1311 bytes} [Sun Feb 18 01:02:35 2024] GET /webmail/ => generated 8883 bytes in 183 msecs (HTTP/2.0 200) 7 headers in 404 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 220/418] xxx.xxx.xxx.xxx () {60 vars in 1113 bytes} [Sun Feb 18 01:02:36 2024] GET /jsi18n/ => generated 3343 bytes in 47 msecs (HTTP/2.0 200) 5 headers in 171 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 173/419] xxx.xxx.xxx.xxx () {62 vars in 1294 bytes} [Sun Feb 18 01:02:37 2024] GET /webmail/?action=listmailbox&resetpage=true&=1708214554611 => generated 3883 bytes in 103 msecs (HTTP/2.0 200) 6 headers in 252 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 174/420] xxx.xxx.xxx.xxx () {64 vars in 1314 bytes} [Sun Feb 18 01:02:37 2024] GET /calendars/ => generated 870 bytes in 137 msecs (HTTP/2.0 500) 5 headers in 181 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 175/421] xxx.xxx.xxx.xxx () {60 vars in 1115 bytes} [Sun Feb 18 01:02:37 2024] GET /jsi18n/ => generated 3343 bytes in 61 msecs (HTTP/2.0 200) 5 headers in 171 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 221/422] xxx.xxx.xxx.xxx () {62 vars in 1262 bytes} [Sun Feb 18 01:02:39 2024] GET /webmail/?action=listmailbox&_=1708214557403 => generated 3883 bytes in 79 msecs (HTTP/2.0 200) 6 headers in 252 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 176/423] xxx.xxx.xxx.xxx () {64 vars in 1312 bytes} [Sun Feb 18 01:02:40 2024] GET /contacts/ => generated 5449 bytes in 119 msecs (HTTP/2.0 200) 6 headers in 307 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 222/424] xxx.xxx.xxx.xxx () {60 vars in 1114 bytes} [Sun Feb 18 01:02:40 2024] GET /jsi18n/ => generated 3343 bytes in 38 msecs (HTTP/2.0 200) 5 headers in 171 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 223/425] xxx.xxx.xxx.xxx () {64 vars in 1253 bytes} [Sun Feb 18 01:02:40 2024] GET /api/v1/categories/ => generated 2 bytes in 63 msecs (HTTP/2.0 200) 6 headers in 193 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1296|app: 1|req: 177/426] xxx.xxx.xxx.xxx () {64 vars in 1249 bytes} [Sun Feb 18 01:02:40 2024] GET /api/v1/contacts/ => generated 2 bytes in 66 msecs (HTTP/2.0 200) 6 headers in 193 bytes (1 switches on core 0) mail.DOMAIN.com [pid: 1298|app: 1|req: 224/427] xxx.xxx.xxx.xxx () {64 vars in 1275 bytes} [Sun Feb 18 01:02:40 2024] GET /api/v1/address-books/default/ => generated 95 bytes in 53 msecs (HTTP/2.0 200) 6 headers in 188 bytes (1 switches on core 0)
We can see, the /api/v1/contacts is queried. But for calendar, no API requests (something like /api/v1/user-calendars/ )
As a fix, I tried downgrading django-webpack-loader to version 0.7.0, both contacts and calendars gave error, I brought it to version 2.0.1