Re: [Bug 323065] Thunderbird Backend



Michal Kolodziejczyk wrote:
I've spent some time today fixing some of the unimplemented stuff. IMAP url
scheme is now correct . I also added support for subfolders in conjunction with
fixing the IMAP scheme. Opening attachments now works in the same way as the
evolution backend, by opening the parent email.
When I wrote the search-ui patch I used "thunderbird" as command when starting
thunderbird, this is probably the reason why you can't open any mails. I've
changed this command to "thunderbird-bin" instead, which is more correct
("thunderbird" is a gentoo specific script I just found out).

I think it is "any distribution" specific. Here it is in Archlinux:
$ which thunderbird
/opt/mozilla/bin/thunderbird
$ locate thunderbird-bin
/opt/mozilla/lib/thunderbird-1.5/thunderbird-bin

"thunderbird-bin" is not in the $PATH, and is not supposed to be called
directly from command-line - only by "thunderbird" script, which sets
all necessary environment variables. I suppose "thunderbird" would be
the correct name.
Here is the result:

$ PATH="$PATH:/opt/mozilla/lib/thunderbird-1.5" beagle-search
/opt/mozilla/lib/thunderbird-1.5/thunderbird-bin: error while loading
shared libraries: libmozjs.so: cannot open shared object file: No such
file or directory

I had to reverse this change - "thunderbird" works for me.
Ok, I will revert this in my next patch.
When I write "works", I mean it opens correct email when clicked on
attachment or email, but only when there was no running thunderbird
process before. When it is running (and I have it always running), it
does not open the requested email.
I thing 'thunderbird -remote "openUrl(...)"' should work in this case,
but for some reason it does not work for me, even from command-line, so
it is a problem with local installation of thunderbird in my case.

And this is the reason why I originally wrote that it I couldn't open
any mails/attachments.

'thunderbird -remote "openUrl(...)"' does not work for me either, so its probably not a local problem. A temporary solution would be 'thunderbird -mail <url>', which opens a new thunderbird window and displays the mail there. Not the best way, but at least its better than not get the mail opened at all. Right?
(I am not using kmail).
I think this would be relevant:
[current-Beagle]

060413 0016135909 25377 Beagle DEBUG: Starting Thunderbird backend
060413 0016135921 25377 Beagle DEBUG: Scanning for files in the
IndexingService directory...
060413 0016135922 25377 Beagle DEBUG: Indexed 0 Indexing Service items
in ,00s
060413 0016136434 25377 Beagle DEBUG: Starting Thunderbird mail crawling
(8 accounts)
060413 0016136918 25377 Beagle DEBUG: Switched mailbox to Inbox (miko wp pl)
060413 0016136936 25377 Beagle  WARN: Exception caught while executing
Beagle.Daemon.ThunderbirdQueryable.ThunderbirdQueryable:Void StartWorker()
060413 0016136994 25377 Beagle  WARN EX: System.ArgumentNullException:
null key
060413 0016136994 25377 Beagle  WARN EX: Parameter name: key
060413 0016136994 25377 Beagle  WARN EX: in [0x000cd]
System.Collections.Hashtable:get_Item (System.Object key)
060413 0016136994 25377 Beagle  WARN EX: in [0x00014] (at
/var/abs/extra/gnome/beagle/src/beagle-0.2.4/Util/Scheduler.cs:606)
Beagle.Util.Scheduler:GetByTag (System.String tag)
060413 0016136994 25377 Beagle  WARN EX: in [0x00002] (at
/var/abs/extra/gnome/beagle/src/beagle-0.2.4/Util/Scheduler.cs:611)
Beagle.Util.Scheduler:ContainsByTag (System.String tag)
060413 0016136994 25377 Beagle  WARN EX: in [0x00013] (at
/var/abs/extra/gnome/beagle/src/beagle-0.2.4/beagled/ThunderbirdQueryable/ThunderbirdIndexer.cs:70)
Beagle.Daemon.ThunderbirdQueryable.ThunderbirdIndexer:IndexAccount
(Beagle.Daemon.ThunderbirdQueryable.ThunderbirdAccount account)
060413 0016136994 25377 Beagle  WARN EX: in [0x0003b] (at
/var/abs/extra/gnome/beagle/src/beagle-0.2.4/beagled/ThunderbirdQueryable/ThunderbirdIndexer.cs:60)
Beagle.Daemon.ThunderbirdQueryable.ThunderbirdIndexer:Crawl ()
060413 0016136994 25377 Beagle  WARN EX: in [0x000ba] (at
/var/abs/extra/gnome/beagle/src/beagle-0.2.4/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs:91)
Beagle.Daemon.ThunderbirdQueryable.ThunderbirdQueryable:StartWorker ()
060413 0016136994 25377 Beagle  WARN EX: in (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void ()
060413 0016136994 25377 Beagle  WARN EX: in [0x0005a] (at
/var/abs/extra/gnome/beagle/src/beagle-0.2.4/Util/ExceptionHandlingThread.cs:54)
Beagle.Util.ExceptionHandlingThread:ThreadStarted ()
060413 0016137107 25377 Beagle DEBUG: Starting Konq history backend ...

The reason you get this exception is because ReadThunderbirdProfiles() in ThunderbirdQueryable fails to read the account name from one or more of your accounts. In order to debug this I will need some more information and a small, temporary patch is included that hopefully gives me what I need (it will output more information). Btw, do you have 8 mail accounts set-up in thunderbird? Just in case it's some strange parsing error.

Thanks!

Pierre
--- beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs	(revision 10)
+++ beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs	(working copy)
@@ -147,8 +147,10 @@
 					string key = reg.Match (line).Result ("${key}");
 					string value = reg.Match (line).Result ("${value}");
 					
-					if (key.StartsWith ("account.") || key.StartsWith ("server"))
+					if (key.StartsWith ("account.") || key.StartsWith ("server")) {
 						table [key] = value;
+						Logger.Log.Debug ("RAW: {0} = {1}", key, value);
+					}
 
 				} catch (Exception e) { }
 			}
@@ -175,10 +177,14 @@
 					else
 						type = AccountType.Invalid;
 					
-					account_list.Add (new ThunderbirdAccount (
+					ThunderbirdAccount acc = new ThunderbirdAccount (
 						(string) table ["server.server" + index + ".name"],
 						Convert.ToInt32 ((string) table["server.server" + index + ".port"]), type,
-						(string) table ["server.server" + index + ".directory"]));
+						(string) table ["server.server" + index + ".directory"]);
+					account_list.Add (acc);
+					
+					Logger.Log.Debug ("Name: {0}, Port: {1}, Type: {2}, Directory: {3}",
+						acc.Name, acc.Port, acc.Type, acc.Directory);
 
 				} catch (Exception e) {
 					// Just continue with the next one if we fail


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]