modoboa / modoboa-radicale

The Radicale frontend of Modoboa
MIT License
21 stars 14 forks source link

Calendar returns Sorry An internal error occured (Clean fresh Ubuntu setup) #134

Closed rebelstartupper closed 6 months ago

rebelstartupper commented 8 months ago

Impacted versions

Steps to reproduce

Current behaviour

Sorry An internal error has occured.

Expected behavior

Open calendar module

Screenshot link

305675619-99983812-055c-4c39-b53e-9ac9c6abb151

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&reset_page=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

xEkkhysis commented 8 months ago

Same here on a clean debian installation. Logs will be provided if needed.

rebelstartupper commented 8 months ago

I've just tried deleting the server and reinstall everything. Everything worked perfectly except this calendar. It's really annoying. Please, please, please, anyone can help or suggest a solution?

rrapati84 commented 7 months ago

i've got the same issue with a fresh installation on Debian 12.

Running in Debug mode shows the following error:

Django Version: | 4.2.11 -- | -- OSError Error reading /srv/modoboa/env/lib/python3.11/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json. Are you sure webpack has generated the file and the path is correct? /srv/modoboa/env/lib/python3.11/site-packages/webpack_loader/loader.py, line 29, in load_assets modoboa_radicale.views.CalendarDetailView /usr/bin/uwsgi-core 3.11.2 ['.', '', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/srv/modoboa/env/lib/python3.11/site-packages'] Wed, 13 Mar 2024 16:53:40 +0100
blackhold commented 7 months ago

Hi, I have the same problem. I activated debug = True in /srv/modoboa/instance/instance/settings.py and restarted uwsgi with service uwsgi restart.

What happens is:

image

During handling of the above exception ([Errno 2] No such file or directory: '/srv/modoboa/env/lib/python3.9/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json'), another exception occurred:

Efectively file was not created on installing the instance. Nor the folder existed.

i404788 commented 7 months ago

Also ran into this, seems like the versions of django-filter and caldav in modoboa-contacts are conflicting with those required by modoboa_radicale. Running pip3 install -U modoboa_radicale==1.7.1 with the venv active fixed it.

Actually that was wrong it is just pip3 install -U modoboa_radicale==1.7.0 that fixes it. 1.7.1 breaks it, the mismatch of dependencies is still there though