Page MenuHomePhorge

Cannot read mail from web interface
Closed, ResolvedPublic

Description

On Ubuntu 18.04, the kolab/roundcube update from last week broken much of my installation. I managed to fix using the web interface skin problem by adding a symlink so the could be found. I can now log in and see my mail boxes but I cannot read the contents of mail or view my calendar, and opening my address book gets a 500 response.

When i click a message the content display pane shows "Oops, something went wrong" and the logs in roundcube show:

[25-Dec-2022 12:47:56 America/New_York] PHP Fatal error:  Uncaught TypeError: No matching function for overloaded 'new_Configuration' in /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php:503
Stack trace:
#0 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php(503): Configuration->__construct(Resource id #45)
#1 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_folder.php(560): kolab_format->load('<?xml version="...')
#2 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(410): kolab_storage_folder->read_object('1')
#3 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(268): kolab_storage_cache->synchronize_fetch(Array, Array, Array)
#4 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(209): kolab_storage_cache->synchronize_full()
#5 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_folder.php(299): kolab_storage_cache->synchronize()
#6 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_config.php(134): kolab_storage_folder->select(Array, true)
#7 /usr/share/r in /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php on line 503
# dpkg -l roundcubemail pykolab guam
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version         Architecture    Description
+++-====================-===============-===============-==============================================
ii  guam                 0.9.13-1        amd64           Smart Reverse IMAP Proxy
ii  pykolab              0.8.23-0~kolab1 all             Kolab Groupware daemon and utilities
ii  roundcubemail        1:1.5.3-0~kolab all             skinnable AJAX based webmail solution for IMAP

Details

Ticket Type
Task

Event Timeline

On my Debian Buster is it broken too.

If i comment out this lines in /usr/share/roundcube/plugins/libcalendaring/libvcalendar.php, I can read my Mails again:

/**
 * Override Sabre\VObject\Property\Text that quotes commas in the location property
 * because Apple clients treat that property as list.
 */
//class vobject_location_property extends VObject\Property\Text
//{

    /**
     * List of properties that are considered 'structured'.     *
     * @var array
     */
//    protected $structuredValues = array(
     // vCard
//        'N',
//        'ADR',
//        'ORG',
//        'GENDER',
//        'LOCATION',
     // iCalendar
//        'REQUEST-STATUS',
//    );
//}

But now i have alredy this error in my logfile:

[27-Dec-2022 11:50:22 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: No matching function for overloaded 'new_Event' in /usr/share/php/kolabobject.ph$
Stack trace:
#0 /usr/share/php/kolabobject.php(171): Event->__construct(Resource id #47)
#1 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php(494): XMLObject->readEvent('<?xml version="...', 1)
#2 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_folder.php(557): kolab_format->load('<?xml version="...')
#3 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(1105): kolab_storage_folder->read_object('1099', '*')
#4 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(810): kolab_storage_cache->_unserialize(Array)
#5 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_folder.php(301): kolab_storage_cache->select(Array, false, false)
#6 /usr/share/roundcubemail/plugins/calendar/drivers/kolab/kolab_calendar.php(319): kolab_storage_folder->select(Array)
#7 /usr/share/roundcubemail/plugins/calendar/drivers/kolab/kolab_driver.php(1757): kolab_calen in /usr/share/php/kolabobject.php on line 171

This work around did not help for me.

I want to fix this, but I need some information. First the skin issue:

I managed to fix using the web interface skin problem by adding a symlink

What symlink is missing?

@machniak, do you have an idea what's going wrong here regarding the object-creation errors? How come these new_*() functions are overloaded?

Are you using PHP8 or something? Anyway, the problem will be in Swig-generated kolabformat code, which I'm not an expert with.

The bug reporters refer to Ubuntu 18.04 and Debian 10, so that's PHP 7.2 and 7.3, respectively.

I'm not sure the problem actually occurs inside the SWIG-generated code; to me it seems to be on the interface between roundcubemail's libkolab plugin and the php-kolabformat package.

Just to clarify, what exactly does the message No matching function for overloaded 'new_Configuration' mean? Does PHP try to invoke the constructor of Configuration but fails to find a candidate that accepts the correct number of arguments? Does it fail to find the class itself?

I think I've found the root cause: it looks like php-kolabformat_1.3.0-0~kolab1 seems to be missing the file /usr/share/php/kolabformat.php, which was still present in php-kolabformat_1.2.1-0~kolab3.

@emunson, @joe1860, can you confirm that that file is missing on your system?

Turns out php-kolabformat_1.3.0-0~kolab1 shouldn't even be available on Ubuntu 18.04 and Debian 10 since the build has been disabled in OBS - but the packages resulting from a previous build were kept in place. I have wiped these stale & broken binaries from the repository.

If php-kolabformat_1.3.0-0~kolab1 is already installed on your system, please downgrade manually to 1.2.1-0~kolab3. That hopefully fixes these issues.

First: downgrade is not possible due to dependencies. To downgrade php-kolabformat, you have to downgrade libkolabxml1v5, wich leads to the fact, that apt wants to "uninstall" the "whole kolab". I've bypassed this by manually downloading the package from here and extract the file.

Second: this doesn't help. After moviing the file /usr/share/php/kolabformat.php (and even restart apache to be sure) the following error still appears:

PHP Fatal error:  Uncaught TypeError: No matching function for overloaded 'new_Contact' in /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php:503
Stack trace:
#0 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php(503): Contact->__construct(Resource id #44)
#1 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_folder.php(560): kolab_format->load('<?xml version="...')
#2 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(1111): kolab_storage_folder->read_object('33', '*')
#3 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(812): kolab_storage_cache->_unserialize(Array)
#4 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_cache.php(555): kolab_storage_cache->select(Array)
#5 /usr/share/roundcubemail/plugins/libkolab/lib/kolab_storage_folder.php(384): kolab_storage_cache->get_by_uid('8904cd24-7c8e-4...')
#6 /usr/share/roundcubemail/plugins/kolab_addressbook/drivers/kolab/kolab_contacts.php(626): kolab_storage_folder->get_object('8904cd24-7c8e-4...') in /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php on line 503

PS: and yes i'm manually checked that all other files provided by php-kolabformat are in place and "up to date"

Ah right, you have to downgrade all of the following packages (they're built from the same source package):

  • libkolabxml1v5
  • php-kolabformat
  • python-kolabformat

Could you try doing that? If that doesn't help either, I'll have to head back to the drawing board. ๐Ÿ˜•

Nope doesn't work either.

@sicherha: as I see that you are currently "working". If it helps, I could give you access to the affected instance ...

I want to fix this, but I need some information. First the skin issue:

I managed to fix using the web interface skin problem by adding a symlink

What symlink is missing?

The apache configuration for roundcube uses

/usr/share/roundcubemail/public_html

but the plugins directory is in

/usr/share/roundcubemail

So I created a symlink in the public_html directory to the plugins one in roundcubmail and this fixed the missing skins problem.

Downgrading those three packages fixed reading mail and calendar entries for me.

Issuing following command

sudo apt-get install php-kolabformat=1.2.1-0~kolab3 libkolabxml1v5=1.2.1-0~kolab3 python-kolabformat=1.2.1-0~kolab3

and restarting the apache solves the problem for me as well (the restart i missed erlier)

seems to be missing the file /usr/share/php/kolabformat.php

@sicherha: kolabformat.php is still there and downgrade

  • libkolabxml1v5
  • php-kolabformat
  • python-kolabformat

to 1.2.1-0~kolab3 doesn't work for me.
now, i'll trying to downgrade my php from 8.2 to 7.4...

Just for clarification:

  • On Debian 10 and Ubuntu 18.04 the php-kolabformat 1.3.0 update should indeed not be available
  • With the 1.3.0 update the kolabformat.php file is expected to no longer exist, as it is not required by php and no longer generated in more recent swig variants.
  • Kolab is not currently php 8 compatible (though we are working towards it).

Thanks for clarifying! Unless somebody still has any objections, I believe we can close this issue.

sicherha claimed this task.

๐Ÿ‘‚ No objections heard since yesterday; marking this as Resolved.