Roundcube Community Forum

 

Roundcube Mobile: uncaught error

Started by dilbert77, February 20, 2026, 06:33:53 AM

Previous topic - Next topic

dilbert77

When running Roundcube in Firefox on a mobile Android device and navigating to any folders, this error is thrown:

PHP Fatal error:  Uncaught Error: Call to undefined method rcmail_output_json::asset_url() in /usr/share/roundcube/program/actions/mail/index.php:733
Stack trace:
#0 /usr/share/roundcube/program/actions/mail/index.php(644): rcmail_action_mail_index::options_menu_link()
#1 /usr/share/roundcube/program/actions/mail/index.php(478): rcmail_action_mail_index::message_list_head()
#2 /usr/share/roundcube/program/actions/mail/list.php(125): rcmail_action_mail_index::js_message_list()
#3 /usr/share/roundcube/program/include/rcmail.php(282): rcmail_action_mail_list->run()
#4 /usr/share/roundcube/index.php(278): rcmail->action_handler()
#5 {main}
  thrown in /usr/share/roundcube/program/actions/mail/index.php on line 733

Roundcube version: 1.6.12

I already searched in Roundcube forums, but found nothing comparable.

Any thoughts are much appreciated.




JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Hellkeeper

We can confirm we're seeing the same fatal errors in our logs as well since updating to the latest 1.7 RC4.

Unfortunately we don't know what exactly triggers it. I haven't been able to reproduce the issue myself so far — it only seems to be triggered somehow by our customers in real usage.

Hellkeeper

#3
Quick update: we managed to stop the fatal error from appearing in our logs with a small workaround.

In `program/actions/mail/index.php` (around line 740) we wrapped the `asset_url()` call with a `method_exists()` check, so it won't crash if `asset_url()` isn't available in that context:

diff
--- a/program/actions/mail/index.php
+++ b/program/actions/mail/index.php
@@ -737,7 +737,11 @@
-   $inner = html::img(['src' => $rcmail->output->asset_url($attrib['icon'], true), 'alt' => $title]);
+   $inner = html::img(['src' => (method_exists($rcmail->output, 'asset_url') ? $rcmail->output->asset_url($attrib['icon'], true) : ''), 'alt' => $title]);

After applying this, `Call to undefined method rcmail_output_json::asset_url()` no longer shows up in our logs.