First Last Prev Next    No search results available
Details
: When clicked, tab is incorrectly flagged for invalid folder
Bug#: 25697
: QuickFolders
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows 7
: unspecified
: P2
: major
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Mario Valle <mvalle@cscs.ch>
Assigned To: Axel Grude <axel.grude@gmail.com>
:

Attachments
3.14.1 pre 1 (503.47 KB, application/x-xpinstall)
2014-02-12 17:04, Axel Grude
no flags Details
3.14.1 pre 2 (504.25 KB, application/x-xpinstall)
2014-02-13 13:33, Axel Grude
no flags Details
3.14.1 pre 3 (504.30 KB, application/x-xpinstall)
2014-02-13 15:27, Axel Grude
no flags Details
3.14.1 pre 4 (504.33 KB, application/x-xpinstall)
2014-02-13 15:39, Axel Grude
no flags Details
4.6.1 prerelease 18 (704.16 KB, application/x-xpinstall)
2016-12-13 08:49, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2014-02-12 12:14
After today's QuickFolders upgrade (V 3.14) when I select one specific tab I
receive the following error dialog: 
0 CSCS tickets: This is a tab that points to an invalid folder:
imap://mvalle@imap.cscs.ch/INBOX/0 CSCS tickets
Delete this Tab?

But the folder is valid (I can open it from the message list pane) and the
problem happens only with this folder.

If I delete the tab and drag again the folder form the message list pane, same
problem.

Any idea?
Thanks!
mario
------- Comment #1 From Axel Grude 2014-02-12 13:37:02 -------
Might this be caused by the folder name starting with a numeral? Is it
persistent if you rename the folder to "Zero CSCS tickets" (you can leave the
QuickFolders tab with the original name if you like)?

Also are other folders on the same account impacted as well?

You can also check in the actual file location to test whether there is a file
of this name. Find the file system location by right-clicking the folder and
selecting "Properties..."

Then please copy the "Location" value so I get an understanding on where the
validation routine is looking. It should be something similar to this:

mailbox:///C:/Users/FRED/AppData/Roaming/Thunderbird/Profiles/abc123xyz.default/Mail/imap.cscs.ch/Inbox.sbd/0
CSCS tickets

the part after mailbox:/// can be pasted in the Windows explorer address bar to
find the containing folder (..\Inbox.sbd) and then the name of the folder
(either "0 CSCS tickets" or "0 CSCS tickets.sbd" or some encoded version of it
as spaces in file names or variable values can often be problematic as well)

If the problem persists, you can disable the folder validity check with the
config setting:

extensions.quickfolders.autoValidateFolders = false

You can get to about:config via Thunderbird Options > Advanced > General Tab.
Click [Config Editor...]. 

In the search box, Paste "autoValidateFolders".
------- Comment #2 From André 2014-02-12 13:38:28 -------
Same behaviour here for several folders - however, I can't really see any rule
this is following.

I have 4 mailaccounts in my Thunderbird profile and this occurs for some
folders in any of the accounts - it's not restricted to only one of the
accounts...

The failing tabs (more precisely: the corresponding folders) do not carry any
special chars, blanks or such in the names.

Thanks for looking at this issue!
------- Comment #3 From André 2014-02-12 13:44:28 -------
2 examples for failing tabs/folders:
(personal or company names replaced)

imap://name-privat@imap.tld/INBOX
(and several subfolders)

imap://name@mail.domain.tld/INBOX
(and several subfolders)

while 

imap://name@imap.domain.tld/INBOX

works perfectly.

I really see no difference when it comes to the path itself. 

Anything else I could do to help you analysing this? Is there any kind of error
logging I might supply?

(I am on a Mac, using OSX 10.7.5 and Thunderbird 24.3.0 with Quickfolders 3.14)
------- Comment #4 From Mario Valle 2014-02-12 13:51:47 -------
Downgraded to 3.12.4 and the problem disappeared

Anyway, the folder was:
imap://mvalle@imap.cscs.ch/INBOX/0%20CSCS%20tickets

There are other folders starting with 0 that do not exhibit this problem.
All other folders on the same account do not exhibit this problem.

Thanks for looking!
mario
------- Comment #5 From Axel Grude 2014-02-12 13:59:08 -------
(In reply to comment #3)
> 2 examples for failing tabs/folders:
> (personal or company names replaced)
> 
> imap://name-privat@imap.tld/INBOX
> (and several subfolders)

> 
> Anything else I could do to help you analysing this? Is there any kind of error
> logging I might supply?


The path is not logged, but it would be helpful to learn the file name itself
on your file system. Can you follow the instructions in Comment #1 to get
there?

All I need to know is

1) The "Location" string as shown in folder properties
2) The real file name, which you can find by going to the containing folder
(following what is in the Location String) in your file navigation utility
(whatever this is called on the Mac, is it "Finder" or something)

If the disparity involves more than an added (or missing) .sbd then this would
explain the bug.
------- Comment #6 From Axel Grude 2014-02-12 14:02:00 -------
(In reply to comment #4)
> Downgraded to 3.12.4 and the problem disappeared
> 
> Anyway, the folder was:
> imap://mvalle@imap.cscs.ch/INBOX/0%20CSCS%20tickets

WHat is the name on the hard drive? Looks to me like the spaces were (falsely?)
encoded as %20. If you rename the folder and replace the spaces with _ it
should work.

> 
> There are other folders starting with 0 that do not exhibit this problem.
> All other folders on the same account do not exhibit this problem.
> 
> Thanks for looking!
> mario
> 

No need to downgrade simply set

extensions.quickfolders.autoValidateFolders = false

for disabling the behavior. (See instructions in Comment #1)
------- Comment #7 From Axel Grude 2014-02-12 14:04:29 -------
FYI, the function that validates the folder names:
doesMailFolderExist: function checkExists(msgFolder) {
  if (!msgFolder || !msgFolder.filePath)  {
    return false;
  }
  if (msgFolder.flags &
QuickFolders.Util.FolderFlags.MSG_FOLDER_FLAG_NEWSGROUP)
    return true; // we do not validate nntp folders
  if (msgFolder.filePath.exists()) {
    return true;
  }
  else {
    let oldPath = msgFolder.filePath.path.toString();
    let testPath = '';
    if (oldPath.endsWith('.sbd')) {
      testPath = oldPath.substr(0, oldPath.length-4);
    }
    else {
      testPath = oldPath + ".sbd";
    }
    let localFile =
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
    localFile.initWithPath(testPath);
    if (localFile.exists())
      return true;
  }
  return false;
},
------- Comment #8 From Mario Valle 2014-02-12 14:44:08 -------
Found something.
Under the ImapMail folder the failing folder is the only one that has only the
msf file and not the no-extension empty file with the same name.

C:\Users\mvalle\AppData\Roaming\Thunderbird\Profiles\b0wcdptw.default\ImapMail\imap.cscs.ch\INBOX.sbd

.
. (The following works)
.
0 Gimp
0 Gimp.msf
.
. (The following does not work)
.
0 CSCS tickets.msf
.
.
.

Hope it helps
mario
------- Comment #9 From André 2014-02-12 15:02:54 -------
(In reply to comment #5)

For one of the folders (Inbox of the GMail account I am using here as well),
the location is:

imap://racemoto%40googlemail.com@imap.googlemail.com/INBOX

The file path is:

/Users/username/Library/Thunderbird/Profiles/sdt7899i.username/ImapMail/imap.googlemail.com/INBOX.sbd

(regarding the location: unfortunalety, I see the same behaviour for 
------- Comment #10 From André 2014-02-12 15:04:25 -------
sorry, last sentence was not finished yet:

(regarding the location: unfortunalety, I see the same behaviour for folders
without any character replacement, e.g. without carrying a "@" or "%40" in the
path)
------- Comment #11 From André 2014-02-12 17:01:45 -------
as it's possible to disable the folder validity check - why do we need it at
all, what exactly is the purpose?

or more precisely: what disadvantages or problems might ocurr by disabling the
check?
------- Comment #12 From Axel Grude 2014-02-12 17:04:51 -------
Created an attachment (id=7782) [details]
3.14.1 pre 1

If you run this test version with debug mode enabled, what does tools > error
console show?

 (debug mode can be enabled with  a check box on the bottom of quickfolders
advanced tab)
------- Comment #13 From Axel Grude 2014-02-12 17:07:03 -------
(In reply to comment #11)
> as it's possible to disable the folder validity check - why do we need it at
> all, what exactly is the purpose?
# to check for tabs of "dead"  folders (which have been deleted or maybe
renamed without QF realizing it)
# to avoid confusion when you use such a folder by dragging emails onto it

> or more precisely: what disadvantages or problems might ocurr by disabling the
> check?
# none, if all your tabs point to valid folders
------- Comment #14 From André 2014-02-12 17:20:19 -------
debug gives me:

QuickFolders 18:13:16.469  [9134 ms]     
doesMailFolderExist() 1. path does not exist
[/Users/username/Library/Thunderbird/Profiles/sdt7899i.username/ImapMail/imap.googlemail.com/INBOX-1]

QuickFolders 18:13:16.469  [0 ms]        
doesMailFolderExist() 2. path does not exist
[/Users/username/Library/Thunderbird/Profiles/sdt7899i.username/ImapMail/imap.googlemail.com/INBOX-1.sbd]
- returning false

...which is indeed correct. The folder contains only 2 files with "INBOX":

INBOX-1.msf
INBOX.msf
------- Comment #15 From André 2014-02-12 17:21:00 -------
with folder validity checking disabled, everything works just fine.
------- Comment #16 From Axel Grude 2014-02-12 22:43:37 -------
(In reply to comment #14)
> debug gives me:
> 
> QuickFolders 18:13:16.469  [9134 ms]     
> doesMailFolderExist() 1. path does not exist
> [/Users/username/Library/Thunderbird/Profiles/sdt7899i.username/ImapMail/imap.googlemail.com/INBOX-1]
> 
> QuickFolders 18:13:16.469  [0 ms]        
> doesMailFolderExist() 2. path does not exist
> [/Users/username/Library/Thunderbird/Profiles/sdt7899i.username/ImapMail/imap.googlemail.com/INBOX-1.sbd]
> - returning false
> 
> ...which is indeed correct. The folder contains only 2 files with "INBOX":
> 
> INBOX-1.msf
> INBOX.msf
> 

You can delete these files (they are broken index files) with THunderbird
switched off. then recreate the folder tab.
------- Comment #17 From Axel Grude 2014-02-12 22:58:15 -------
(In reply to comment #3)
> 2 examples for failing tabs/folders:
> (personal or company names replaced)
> 
> imap://name-privat@imap.tld/INBOX
> (and several subfolders)

> 
> Anything else I could do to help you analysing this? Is there any kind of error
> logging I might supply?


The path is not logged, but it would be helpful to learn the file name itself
on your file system. Can you follow the instructions in Comment #1 to get
there?

All I need to know is

1) The "Location" string as shown in folder properties
2) The real file name, which you can find by going to the containing folder
(following what is in the Location String) in your file navigation utility
(whatever this is called on the Mac, is it "Finder" or something)

If the disparity involves more than an added (or missing) .sbd then this would
explain the bug.

(In reply to comment #8)
> Found something.
> Under the ImapMail folder the failing folder is the only one that has only the
> msf file and not the no-extension empty file with the same name.
> 
> C:\Users\mvalle\AppData\Roaming\Thunderbird\Profiles\b0wcdptw.default\ImapMail\imap.cscs.ch\INBOX.sbd
> 
> .
> . (The following works)
> .
> 0 Gimp
> 0 Gimp.msf
> .
> . (The following does not work)
> .
> 0 CSCS tickets.msf
> .
> .
> .
> 
> Hope it helps
> mario
> 

msf files are index files and can be rebuilt. the actual data is either in "0
CSCS tickets" or "0 CSCS tickets.sbd", these are the 2 cases that QuickFOlders
looks for. 

If you close down Tb you can delete the msf file and it will be rebuilt
automatically. http://forums.mozillazine.org/viewtopic.php?f=39&t=450392

However I think there is a problem with encoding the spaces, so if you rename
the folder to 0_CSCS_tickets and then create the Tab it will probably work.
------- Comment #18 From Mario Valle 2014-02-13 10:42:30 -------
Solved.
Remember the problematic folder is from an IMAP server.
I created an empty file called "0 CSCS tickets" in the
C:\Users\mvalle\AppData\Roaming\Thunderbird\Profiles\b0wcdptw.default\ImapMail\imap.cscs.ch\INBOX.sbd
directory where already lives the "0 CSCS tickets.msf" file and now version
3.14 does not say anymore invalid folder.
Thanks for your help!
mario
------- Comment #19 From Axel Grude 2014-02-13 11:28:31 -------
(In reply to comment #18)
> Solved.
> Remember the problematic folder is from an IMAP server.
> I created an empty file called "0 CSCS tickets" in the
> C:\Users\mvalle\AppData\Roaming\Thunderbird\Profiles\b0wcdptw.default\ImapMail\imap.cscs.ch\INBOX.sbd
> directory where already lives the "0 CSCS tickets.msf" file and now version
> 3.14 does not say anymore invalid folder.
> Thanks for your help!
> mario
> 

This is an unusal way to resolve this. The file  (without extension) you
created is where the actual content of the emails is stored, and I believe the
msf files might just be headers. Unless the folder has subfolders in which case
Tb will create a folder filename.sbd and move the messages in there; it is kind
of confusing. Is the folder selected for offline use? Maybe this is something I
need to check in the validation function and ignore IMAP folders that are not
"subscribed". I will look into it and upload a patch shortly...
------- Comment #20 From Mario Valle 2014-02-13 11:37:38 -------
Please read again my mail.

It is an IMAP server. That means no mail is stored locally. And this IMAP
folder is obviously subscribed because I can see it in the TB folders list.

I simply noticed the missing empty file was the only difference this folder had
compared to the working ones. Besides this, I really don't know anything about
what TB stores under the profile folder.

Anyway, thanks again for this incredibly useful tool and for pointing me in the
right direction!
mario
------- Comment #21 From Axel Grude 2014-02-13 11:55:16 -------
(In reply to comment #20)
> Please read again my mail.
> 
> It is an IMAP server. That means no mail is stored locally. And this IMAP
> folder is obviously subscribed because I can see it in the TB folders list.

I mean not subscribed, but storing the mail locally. There is no other
explanation for the actual container of the emails (the file with no extension
or the file with .sbd appended) being missing, the emails have to be stored
_somewhere_. My understanding so far was that downloaded mails and / or their
headers are stored in this file (which you manually created).

If I can reproduce the bug somehow on my IMAP account (I mainly use POP as it
is more reliable and faster on my slow connection; also I prefer to store mail
locally as I do not trust my email providers to do this for me) then it will be
easier to fix for me.
------- Comment #22 From Axel Grude 2014-02-13 13:33:02 -------
Created an attachment (id=7784) [details]
3.14.1 pre 2

I just added a menu item "Explorer Folder Location..." to the Mail Folder
Commands sub menu. It operates similarly to the action that occurs when you go
to tools > saved files, right-click a file and select "open containing folder": 

The command should open the containing folder in the file system and highlight
the "folder file". If there is trouble with the path it should show an error
message.

Hope you find this useful.
------- Comment #23 From Tiago Oliveira de Jesus 2014-02-13 13:56:27 -------
Hi all!

First, sorry, my english is bad :(

I have same error in two folders:

imap://tiago%40vgt.com.br@mail.vgt.com.br/INBOX/Resolvidos/2014/Fevereiro
imap://tiago%40vgt.com.br@mail.vgt.com.br/INBOX/Resolvidos/2014/Janeiro

In folder: imap://tiago%40vgt.com.br@mail.vgt.com.br/INBOX/Resolvidos/2014
error not happening.

I'm using "Icedove 17.0.10" at Debian/Gnu Linux.

I hope to help.

[] s
------- Comment #24 From André 2014-02-13 15:14:00 -------
I am also using IMAP only - and I have every option for caching, downloading or
local storage of mails disabled.

@Mario: is your Thunderbird set up in a similar way? 

maybe that's why we are missing some files that Axel does have in his profile,
hence checking for them might not make sense if we're working on IMAP
folders...
------- Comment #25 From Axel Grude 2014-02-13 15:27:01 -------
Created an attachment (id=7785) [details]
3.14.1 pre 3

Same as pre 2, this time also Postbox and SeaMOnkey compatible. After the last
comment I tested in Ubuntu and was able to reproduce the problem: apparently in
ubuntu there are msf files but for some reason no additional file without the
msf extension; I will ask over at the maildev group if this is correct.
------- Comment #26 From André 2014-02-13 15:33:07 -------
Mario confirmed by mail: his IMAP settings are identical (no caching, no
downloading etc.)
------- Comment #27 From Axel Grude 2014-02-13 15:39:53 -------
Created an attachment (id=7786) [details]
3.14.1 pre 4

This latest version is based on the following assumptions:

either of
folderName.sbd  (folder)
folderName      (file)
folderName.msf  (file)

have to exist for the folder to be recognized as "valid". I still have to
confirm with the maildev group if this is reasonable. But based on this I was
able to fix the behavior on my Ubuntu test platform. Also  note this has the
new command Mail Folder Commands > Explorer Folder Location which opens the
parent folder and should display one of the three above. (In Windows, it also
selects the correct file)
------- Comment #28 From André 2014-02-13 16:13:53 -------
using  3.14.1 pre 4, I can gladly confirm: works perfectly now ;-)

thanks a lot, I really appreciate your time and efforts! (please find a little
donation in your paypal account)
------- Comment #29 From Tiago Oliveira de Jesus 2014-02-13 16:18:41 -------
Yep!

3.14.1 pre 4, works for my too!

Thanks! 

[] s
------- Comment #30 From Axel Grude 2016-12-13 08:49:55 -------
Created an attachment (id=8246) [details]
4.6.1 prerelease 18

Adding the button in the current folder toolbar (center screen)

Make this new button visible in QuickFolders Settings >> Advanced in the
section Current Folder Toolbar. Making the Current Folder Toolbar always
visible is highly recommended as it has some very useful commands right into
center screen, such as:
        # Dragable current Mail(s) Icon
        # Recent Folder Button
        # Message Navigation (next unread, mark thread as read and jump)
        # Folder Siblings
        # Customize Icon
        # Filter Assistant
        # Mail Folder Commands Submenu
        # Repair Folder
------- Comment #31 From Axel Grude 2016-12-13 08:52:21 -------
(From update of attachment 8246 [details])
I made a mistake - submitted this attachment to the wrong bug, Bugzilla's bug
navigation is weird!
------- Comment #32 From Axel Grude 2016-12-13 08:54:13 -------
I believe this was already fixed (in Release 4.0.3)

First Last Prev Next    No search results available