Ticket #1484136 (reopened Bugs)

Opened 2 years ago

Last modified 2 days ago

Message list doesn't update itself ("Check for new messages" button not working)

Reported by: tst@… Owned by:
Priority: 1 - Highest Milestone: 0.2.1
Component: IMAP connection Version: 0.2-stable
Severity: major Keywords: new messages, update message list
Cc: ld@…, ernews@…

Description

Hi,

when new mails are received, the message list doesn't update itself. Even when clicking on "Check for new messages", new mails don't show up.

Only switching to a different folder and switching back to the old one causes the new messages to show up.

Tried with SVN version 391 and 398, using preview feature.

All the best, Tillmann

Attachments

capture4.png (30.1 kB) - added by axel 2 years ago.
I made a screenshot to show the issue.
check_recent.inc (2.3 kB) - added by ldeviator 7 weeks ago.
reload the mail box on new mail checks
check_recent.2.inc (2.5 kB) - added by ldeviator 7 weeks ago.
a little better reloading

Change History

Changed 2 years ago by jpingle

I'm also using r398 and the message list does update with new mail automatically for me.

What browser/OS are you using? It works for me on Windows XP SP2 with both Firefox 2.0 and Opera 9.02.

Changed 2 years ago by jpingle

It also works fine with IE7 (Even though the Preview Pane does have other issues with IE7, see #1484128)

Changed 2 years ago by Arrmo

I see the same thing ... if you use the button right above "Subject" (i.e. on the left end), but not of you use the "E-mail" button up near the top.

Changed 2 years ago by jpingle

Thanks for the additional information. I am still unable to reproduce this problem. The message list updates as usual whether I let it happen on its own, or if I click on the "Check for new messages" button, "E-Mail" button or on my Inbox icon.

You might clear your browser cache, restart the browser, and try again to be sure that your browser isn't caching files from a previous SVN revision.

Please post more information about your setup such as Browser/Version, OS, RC config settings (such as message caching on/off, preview pane on/off, skin, etc) And if possible, the last SVN revision that worked properly for you.

In the past there have been some problems pop up because changes in config/main.inc.php.dist were not copied over to the main.php.inc being used, missed DB updates, stale browser cache, etc.

Changed 2 years ago by Arrmo

You bet ...

OK, I tried what you suggested, but I still have the same problem. I'm running Firefox 2.0 under Windows XP. When the new email arrives, it shows up in the Folder list (e.g. Inbox(1)), but not in the message list. I am using the preview pane, and did in earlier versions as well (with the modified patch). I have to admit - I don't know if I recall this working right at any point. I haven't updated my database since ~ SVN 361. Is that an issue?

FYI - I just tried disabling the preview pane, but no difference.

Anything else that would help?

Changed 2 years ago by jpingle

You said you had been using the Preview Pane with the old patch before it was in the SVN trunk, did you back out that patch before updating to an SVN revision with the preview pane in it? If you didn't back out the patch, you may want to delete the relevant files and run "svn up" again to fetch clean versions from the server.

I never used the preview pane patches so I didn't have any preview pane code until it entered the SVN tree. This could be the real difference.

There may be some remnants of the old code that are being left intact in your local copy. If you see a line starting with "G" instead of "U" when updating via SVN, that means it is merging changes into a locally altered file instead of applying updates to an unaltered copy.

Alternately, you could try blowing away the whole directory and checkout a fresh copy.

Also: The last update that altered the DB structure only affected the message cache and the identities tables, and that was quite some time ago. I doubt it's a factor in this. You can always check SQL/mysql.update.sql to see if any of those changes differ from what you see in your DB structure.

Changed 2 years ago by tst@…

Hi,

the bug possibly only occurs when multiple instances of RoundCube are running (actually, I wrote this ticket from work where the message list did NOT update itself, however, when I came home I found a browser session with another instance of RoundCube which HAD updated itself).

Will investigate further tomorrow.

bye, Till

Changed 2 years ago by Arrmo

Some more info- hope it helps!

When I upgrade I blow away the entire directory, then replace it with the new copy (so I shouldn't have multiple copies around).

Thanks!

Changed 2 years ago by jpingle

Till,

You may be on to something there. I opened 6 sessions of RoundCube all pointing at the same account (Firefox, Opera, and IE each on two different machines on my desk) and only one of them picked up the new message when I sent a test. When I reloaded the page on all of them, it showed up everywhere.

However, this isn't limited to RC clients. I also tried this same setup with an account that I also have open in Thunderbird. TB picked up the message, and none of the RoundCube clients did. (Perhaps related to ticket #1484001?) If I get some time today I'll try the patch in that ticket to see if it makes a difference here. You might try it as well.

Changed 2 years ago by jpingle

I found a moment to test that patch and it didn't make a difference for me. However, I did monitor the checks with tcpflow and found something:

RoundCube is trusting the IMAP server to tell it whether a message is "RECENT" or not when it does its automatic check using 'SELECT "INBOX"' (and when the "Check for new messages" button is pressed) When any client views a message it is no longer considered recent. Thus it will continue to be fooled by the server until a full INBOX refresh is done.

When the other methods are used ("E-mail button, switch mailboxes, reload page), RoundCube downloads all of the messages in the folder and uses the IMAP \Seen flag to determine if they are new or not. It looks like Thunderbird does this with every check.

I suppose to fix this the "quick" check may have to be changed to check the number of unseen messages instead of checking Recent. (So a similar issue to #1484001 but not exactly the same).

Changed 2 years ago by jpingle

  • priority changed from 5 to 3
  • component changed from Client to IMAP connection

Changed 2 years ago by tst@…

Hi,

the patch from ticket 1484001 DOES make a minor difference:

With the patch, at least the number of messages is displayed correctly. The new messages still don't show up in the message list (e.g. when I open RoundCube, send myself 3 new emails, with the patch 3 new mails will be displayed for Inbox, but they don't show up).

Also: Yes, I am running Thunderbird in parallel to RoundCube. I believe that the webmailer should be able to cope with that. After all, when switching back to another folder and then back to the original, it works too.

bye, Till

Changed 2 years ago by axel

I made a screenshot to show the issue.

Changed 2 years ago by axel

I made a screenshot to show the issue. The "Inbox" link shows one new message (1). But the email list remains empty. Regards,

Axel

Changed 2 years ago by thommy

Same here...message caching and preview pane is turned on...will check it out with both features turned off!

Cheers, -Thomas

Changed 2 years ago by seansan

  • status changed from new to closed
  • resolution set to duplicate

This issue already also has another ticket #1483808 (in RC1 milestone)

Will make reference to other issue to this one

Changed 7 weeks ago by ldeviator

  • status changed from closed to reopened
  • resolution deleted
  • milestone set to 0.2-stable

I'm running in to this issue now, and I don't think it's a copy of the other ticket... this is a IMAP connection problem, not a client side problem.

The problem here I think is a multiple client situation. Roundcube will show new messages on whatever Roundcube client sees the message as RECENT first, and if no Roundcube client gets there first, then re-reading the entire mailbox would be necessary.

But I propose it shouldn't do that, or at least we have the option. It should rather update the listing of messages every time the auto check fires.

My reasoning is in the age of cell phone email, you can usually count on at least a desktop IMAP client and a handheld email client checking the IMAP folder.

Also, as the author of Dovecot points out: "IMAP allows simultaneous access for multiple clients to a mailbox. Don't expect that you're the only one accessing it. Send changes immediately to the server, and show changes sent by the server immediately to the user."

jpingle is right I think... we shouldn't be checking "RECENT" we should be checking "UNSEEN"... at least that's a step in the right direction. Really though, we want to refresh the entire mailbox. If I delete a message from my handheld, it should show up deleted on Roundcube on the next refresh.

Changed 7 weeks ago by ldeviator

  • cc ld@… added

Changed 7 weeks ago by ldeviator

reload the mail box on new mail checks

Changed 7 weeks ago by ldeviator

I've hacked apart program/steps/mail/check_recent.inc above to reload the currently selected box, but that's not ideal.. what would be better (noted with the TODO) is to only reload the mailbox when it's really changed

to this we could turn to the cache copy or something like that.. I'll kick it around.. any ideas anyone?

Changed 7 weeks ago by ldeviator

a little better reloading

Changed 7 weeks ago by ldeviator

now check_recent will only reload the mailbox if the cache count of all the messages = the current count of all the messages ...

that's better, but still not great... really we want to check all the IMAP headers against the cache to see if we should reload the mail box or not

Changed 7 weeks ago by alec

Not so quick. I'm not use caching and checking UNSEEN for all folders in my mailbox tooks 8 seconds. So, it's very expensive. Cheking for RECENT - only 0.02 sec.

Changed 7 weeks ago by ldeviator

I agree that the changes I made in check_recent.2.inc (which actually doesn't really check either UNSEEN or RECENT so much as ALL and just reloads the mail box list if the mailbox has changed in cache) are more expensive and take more time to execute, but I'm not sure that there is any way around it

doing a check for only RECENT when checking for new messages as in trunk has these problems all related to using multiple clients

1. will not display new messages if another client has checked the IMAP box before Roundcube does... as I said before, I think it is a mistake to assume that Roundcube is the only client checking the IMAP folder.

2. will not update deleted messages... if another client deletes a message, I think Roundcube should show that on checking

also I agree that using cache may not be for everyone and that my changes rely on the user using cache, but there are other functions that depend on cache such as sorting when the mail IMAP server doesn't support SORT, like Exchange doesn't ... regardless of that precident, maybe it would be better to make some new functions .. I agree having cache on should only be necessary if one really needs it.

deficiencies in what I've suggested: the way check_recent.2.inc is written it refreshes only when a different number of messages in a folder from the previous cache and will still miss messages if there is more than one Roundcube client logged in to an IMAP mailbox.. what really would have to be the case is an old message count per session.

just my 2 cents.. really I'm catoring to my boss and my clients... they want Roundcube to act just like their desktop IMAP client and that's their #1 thing.. updating the message list when they mess around on their handhelds... it would be great if they would just use Roundcube only... it would be so fast... but they don't.

Changed 3 weeks ago by er13

  • cc ernews@… added

Changed 2 days ago by lucaferr

  • priority changed from 3 to 1 - Highest

Hello! I've just installed 0.2stable and I experience the same problem: altough I've set to check mail every minute, the inbox list doesn't refresh. Even clicking on the Check mail button doesn't have any effect. But, if I click on Inbox, the e-mails list get refreshed and I can see the new emails. I didn't have this problem with 0.2-beta!

I have a Linux Slackware Server, with Apache, PHP 5.2.1, Mysql 5.0.24.

Mysql caching is DISABLED (since I run Courier IMAP server on the same machine).

How can I solve the problem? Thank you very much!

Changed 2 days ago by lucaferr

  • version changed from svn-trunk to 0.2-stable
Note: See TracTickets for help on using tickets.