texxasrulez / caldav_calendar

GNU Affero General Public License v3.0
7 stars 8 forks source link

Class 'Sabre\VObject\Property\Text' not found #7

Closed uli-heller closed 4 years ago

uli-heller commented 4 years ago

I'm using roundcube-1.4.2 and caldav_calendar-0.6.0.4 on ubuntu-18.04. When trying to display the content of an email, I'm getting this error within the error.log:

...
[12-Feb-2020 16:09:52 Europe/Berlin] PHP Fatal error:  Class 'Sabre\VObject\Property\Text' not found in /var/www/roundcubemail-1.4.2/plugins/libcalendaring/libvcalendar.php on line 1451
...

I do have "php-sabre-vobject" installed, but it seems to be a very old version 2.1.7-4.

Adding a few lines to plugins/libcalendaring/libvcalendar.php fixes the issue for me at the moment:

use \Sabre\VObject;
use \Sabre\VObject\Property\Text;
use \Sabre\VObject\DateTimeParser;
include "/var/www/roundcubemail-1.4.2/plugins/calendar/lib/vendor/sabre/vobject/lib/Version.php";
include "/var/www/roundcubemail-1.4.2/plugins/calendar/lib/vendor/sabre/vobject/lib/Node.php";
include "/var/www/roundcubemail-1.4.2/plugins/calendar/lib/vendor/sabre/vobject/lib/Property.php";
include "/var/www/roundcubemail-1.4.2/plugins/calendar/lib/vendor/sabre/vobject/lib/Property/Text.php";

Very ugly. Do you have a proposal for a better fix? Thx!

I'm going to update to 0.7.0.0 soon, but I guess the issue will probably still be there...

texxasrulez commented 4 years ago

If you would download the latest Release (0.7.0.0) or latest commit and see if that fixes your issue. I have been testing this pretty extensively lately and have had no errors in my logs. Also, I know some errors pop up on me time to time while tinkering with code and I TRUNCATE the 3 tables beginning with caldav_ in your Roundcube Database and then refresh your calendar. It may clear up your error.

Can you give a little more info? What kind of email are you trying to look at? Is it from an iTip invite or after accepting or declining event or just any email? One last question. Are you a new user or have you updated this from earlier versions? I ask because if you have updated this from v0.5.* or earlier, a clean install is required as I moved sabre location.

uli-heller commented 4 years ago

Hi Glen,

thanks for all these advices. I did so before, since I've seen other errors after updating to 0.6.0.4. I think I'm uptodate related to the plugins folder and related to the database tables.

I updated to 0.7.0.0+latest master commits and the error is still there.

See more info below...

Am 2020-02-13 08:04, schrieb Gene Hawkins:

If you would download the latest Release (0.7.0.0) or latest commit and see if that fixes your issue. I have been testing this pretty extensively lately and have had no errors in my logs. Also, I know some errors pop up on me time to time while tinkering with code and I TRUNCATE the 3 tables beginning with caldav_ in your Roundcube Database and then refresh your calendar. It may clear up your error.

I've done that, nothing changes.

Can you give a little more info? What kind of email are you trying to look at? Is it from an iTip invite or after accepting or declining event or just any email?

The error shows up on any email I've opened to far

One last question. Are you a new user or have you updated this from earlier versions? I ask because if you have updated this from v0.5.* or earlier, a clean install is required as I moved sabre location.

I've gone through all of that before.

To me, it looks like a wrong implementation of Sabre\VObject gets loaded, maybe the one from the ubuntu base system which is of version 2.1.7.

Thx + best regards, Uli

texxasrulez commented 4 years ago

It is a strange one ... I will try to recreate it, but so far, my system just chugs along great and doesn't give me any errors in my roundcube error log. What does you system logs say, if anything, that may shed a little light on this? It is Midnight where I live so I must turn in. Hope you have a good one ...

uli-heller commented 4 years ago

I am on my way to work, so please dont expect a fast answer . Maybe sleeping Times? đŸ˜‰ -- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Am 13. Februar 2020 09:04:42 MEZ schrieb Gene Hawkins notifications@github.com:

It is a strange one ... I will try to recreate it, but so far, my system just chugs along great and doesn't give me any errors in my roundcube error log. What does you system logs say, if anything, that may shed a little light on this? It is Midnight where I live so I must turn in. Hope you have a good one ...

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/texxasrulez/caldav_calendar/issues/7#issuecomment-585601308

uli-heller commented 4 years ago

Syslog:

...
Feb 12 16:06:44 roundcube-caldav systemd[1]: Started The Apache HTTP Server.
Feb 12 16:06:54 roundcube-caldav systemd[1]: Stopping The Apache HTTP Server...
Feb 12 16:06:54 roundcube-caldav systemd[1]: Stopped The Apache HTTP Server.
Feb 12 16:09:00 roundcube-caldav systemd[1]: phpsessionclean.service: Failed to reset devices.list: Operation not permitted
Feb 12 16:09:00 roundcube-caldav systemd[1]: Starting Clean php session files...
Feb 12 16:09:00 roundcube-caldav systemd[1]: Started Clean php session files.
Feb 12 16:09:01 roundcube-caldav CRON[19606]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb 12 16:09:19 roundcube-caldav systemd[1]: apache2.service: Failed to reset devices.list: Operation not permitted
Feb 12 16:09:19 roundcube-caldav systemd[1]: Starting The Apache HTTP Server...
Feb 12 16:09:19 roundcube-caldav systemd[1]: Started The Apache HTTP Server.
Feb 12 16:17:01 roundcube-caldav CRON[19640]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 12 16:18:04 roundcube-caldav systemd[1]: Stopping The Apache HTTP Server...
Feb 12 16:18:04 roundcube-caldav systemd[1]: Stopped The Apache HTTP Server.
Feb 12 16:18:04 roundcube-caldav systemd[1]: apache2.service: Failed to reset devices.list: Operation not permitted
...

Not very helpful for this issue...

texxasrulez commented 4 years ago

I recently bit the bullet and started paying for a VPS at godaddy and got a server setup from the ground up and have absolutely no issue such as this. As a matter of fact, outside of accepted issues, I have no problems at all. My RC logs stay at zero for the most part. We all know hiccups happen and an error will be thrown for unknown reasons (most of which are from other plugins I use) and those are the ones that show up in my logs from time to time.

From what I can tell on the logs you provided, apache2 has some sort of privilege issue/issues or you are running container environments. If you are running containers, I am not supporting them at this point in time. If you do not have any containers running, I suggest you go through your apache settings and I will bet good money your problem lies there.

Do you run any kind of Control or Hosting Panel or do it old school and manually setup your server?

I used to do it old school until I found i-MSCP. I personally LOVE i-MSCP and it is just super simple to setup, configure, customize and maintain. Just a little off topic, but always good to share ...

uli-heller commented 4 years ago

I am running roundcube within a container based on ubtuntu-18.04-server. I don't think the issue is related to using a container, I can install it on a physical server if it helps.

I think it the issue might be caused by

A question related to your fresh install: How do you configure caldav_calendar to use the sabre version bundled with the plugin? Which base os are you using?

Added one hour later: I just looked at nextcloud. They do something similar, they provide bundled versions of sabre. They reference the bundled versions within the autoload files within the folder "composer". Maybe we have to do something similar? https://github.com/nextcloud/3rdparty/tree/7f4a8f54d850a92e50e143d8ef4d59ae8cca73ac/composer

texxasrulez commented 4 years ago

Since I run no containers, I cannot test for a fix. All I know is my calendar runs great for me. Only the issues I have submitted are the issues I have. I will keep this open for others that may can help, but I cannot, sorry. I can only support this with Nextcloud as that is all I have to play with.

timeos commented 4 years ago

hi guys, I had same issue. and this seems solved it: https://www.roundcubeforum.net/index.php/topic,23818.0.html i.e. including "autoload.php" within "libvcalendar.php", i.e.:

include "/usr/share/roundcubemail/plugins/calendar/lib/vendor/autoload.php";

do not use any other "include" anywhere.