TB extensions not working after a profile move ?

User Help for Mozilla Thunderbird
Post Reply
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

TB extensions not working after a profile move ?

Post by CharlyMoz »

Hello all

I just want to use the same profile on several Windows computers. For some, I copied the thunderbird programs and profiles from computer A - drive I: to computer B, drive E:.

Starting TB on the new PC I got all my email accounts just fine, all my calendars and contacts... BUT, the extensions that are working on the original computer, even if presents on the target computer, are not working :
  • no icon in the toolbar
  • no way to access their configuration panel (I can see the global TB "Themes & extensions", but cannot access the specific parameters window)
Since I face this behavior for all the configured extensions, I think this is a TB thing... I thought that all paths were stored with relative references ?

Is there something I missed please ?

My config :
- TB 91.3.2 on Windows (7 & 10)
- Extensions : TBsync, providers for CalDav & CardDav, Open Google Calendar

Thx

Charly
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: TB extensions not working after a profile move ?

Post by tanstaafl »

Thunderbird does use relative paths. I'm using tbsync and "provider for caldav and carddav" with 91.4.0 (release candidate) under Windows 10 and can manage them fine using tools -> add-ons & themes.

The problem might be the Open Google Calendar add-on. It doesn't claim to support version 91 and hasn't been updated for almost a year. One bad add-on can mess up the others. Looking at https://github.com/emmanuelroecker/OpenGoogleCalendar it appears the last code change was three years ago, after that they just bumped the versions they claimed it worked with.
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

Thank you for your input !

I've uninstalled the "Open Google Calendar" add-on and restarted TB. But still, TBsync does not sync and I can't access the TBsync param window (for instance I don't have the TBsync button in the toolbar and no way to access it from the extension tab).

AND : If I issue first this Windows command :

Code: Select all

subst i: d:\
(i.e. It creates a second entry for the D: drive as the I: drive, which is the drive where TB is installed on the computer A and the subfolders are the same) => :D then it works !!

So there is something here to discover...

Charly
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: TB extensions not working after a profile move ?

Post by morat »

I would search the prefs.js file in the profile folder for absolute pathes.

Command Prompt:

Code: Select all

rem search using regular expressions
findstr /r "[a-z]:\\\\" prefs.js
For example, the Mailbox Alert extension stores the following path in my prefs.js file.

Code: Select all

user_pref("extensions.mailboxalert.alerts.3.play_sound_wav_file", "D:\\Media\\Notify.wav");
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

Hello

Thanks for the command... It shows LOTS of absolute paths ?????????
Such as : I:\\Private\\Mozilla\\Profiles\\News\\news
For some they does not exists since a long time (old mail server defs, old extensions uninstalled for ages...)

I'm considering doing some manual cleaning for the existing paths, how should I do it ?
I:\\Private\\Mozilla\\Profiles\\News\\news => .\\Profiles\\News\\news ??? or .\\News\\news ??? or else ?

and I don't know what to do for the non-existing paths... (removed extension for instance...)

EDIT :
I'm surprised that when you uninstall an extension, it does not remove all settings and references from that extension. I can find settings for CardBook (removed and replace by TBsync), about enigmail (removed because included into TB nowadays), etc...

Charly
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: TB extensions not working after a profile move ?

Post by tanstaafl »

Thunderbird usually has both a absolute and a relative version of any setting with a path, though it prioritizes using the relative version. That's why you can move a profile from Windows to Linux and use it as is. Though there are always exceptions, which don't effect the accounts working such as user_pref("mail.compose.attach.dir", "D:\\Downloads");

Add-ons are a different story. I'm not surprised to see ImportExportTools NG using a absolute path in user_pref("extensions.importexporttoolsng.autobackup.dir", "D:\\Backups\\Thunderbird"); to specify where to store a backup of the profile (and not have a one with a relative path). Relative paths make sense when you're deliberately storing something within a profile or are trying to associate something with a specific mail folder such as a notes add-on.
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

Hum...

I have another profile on a Linux machine and in pref.js I have :

Code: Select all

user_pref("mail.server.server1.directory", "/media/<username>/Maxtor/private/Mozilla/Thunderbird/profile/Mail/professionnel.com");
user_pref("mail.server.server1.directory-rel", "[ProfD]../../../../media/<username>/Maxtor/private/Mozilla/Thunderbird/profile/Mail/professionnel.com");
The [ProfD] path is the relative one, but it goes back up to the root folder ! This is useless in that case...

Perhaps TB has some excuses : 'Maxtor' name above refers to a USB drive plugged in a Linux machine, and the profile is reached via a symbolic link. I thought TB would have known the path as "/home/<username>/.thunderbird/myprofile" (here 'myprofile' is a link to '/media/<username>/Maxtor/private/Mozilla/Thunderbird/profile')... So TB retrieves the real name instead of the one I supposed... :cry: I wanted TB to store only relative paths to have more flexibility (change the USB hard drive for instance ?)

On the other (windows) pref.js, I have something much more relevant :

Code: Select all

user_pref("mail.root.imap", "I:\\private\\Mozilla\\Profiles\\ImapMail");
user_pref("mail.root.imap-rel", "[ProfD]ImapMail");
And I checked all absolute paths in the file, and all have their proper relative counterpart just below. So here it's perfect.

There is another file then, specific to add-ons OR specific the TBsync add-on, containing an absolute path and no relative (or not a proper relative)...
I keep digging and will put the results here...

Charly
Last edited by CharlyMoz on December 7th, 2021, 1:54 pm, edited 1 time in total.
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

Hi again,

I discovered this in "extensions.json" :
"path": "I:\\private\\Mozilla\\Thunderbird\\Profiles\\extensions\\tbsync@jobisoft.de.xpi",
And no relative path whatsoever beside it...

Also, for dictionaries I found as above :
"path": "I:\\private\\Mozilla\\Thunderbird\\Profiles\\extensions\\marcoagpinto@mail.telepac.pt.xpi",
but also :
"rootURI": "jar:file:///I:/private/Mozilla/Thunderbird/Profiles/extensions/marcoagpinto@mail.telepac.pt.xpi!/",

Can I replace the "path" and "rootURI" values with 'example with the first case above) :
"extensions\\tbsync@jobisoft.de.xpi"
???

i.e remove the absolute part of the path until the profile folder level...

Charly
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

So I just made the test. TB still works but the extensions are not active without drive I:, so there is another place were this path is stored...
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

I forgot to mention I don't use the "profiles.ini" file : I run TB with the "/profile <profile-path>" parameter...
Could this be a part of my problem ?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: TB extensions not working after a profile move ?

Post by tanstaafl »

"I forgot to mention I don't use the "profiles.ini" file : I run TB with the "/profile <profile-path>" parameter...
Could this be a part of my problem ?
"

No. I assume '/' was a typo. Its normally -profile "path"

You are spending a lot of time trying to workaround extensions.json using absolute paths. A global search and replace of the paths in extensions.json using a text editor seems more likely to succeed than subst. However, I'd suggest uninstalling and re-installing the extensions instead. That is pretty quick since you won't lose any of the add-ons settings when you uninstall them.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: TB extensions not working after a profile move ?

Post by morat »

I think you can delete these files. The app will recreate them the next time it starts.

* extensions.sqlite
* extensions.sqlite-journal (if found)
* extensions.ini
* extensions.json

Corrupt extension files
http://support.mozilla.org/kb/unable-in ... sion-files
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

tanstaafl wrote:"I forgot to mention I don't use the "profiles.ini" file : I run TB with the "/profile <profile-path>" parameter...
Could this be a part of my problem ?
"

No. I assume '/' was a typo. Its normally -profile "path"
"/" works on the Windows version and since my batch file is something like 15 years old :mrgreen: ... but I could use the "-" instead (same behavior).
tanstaafl wrote: You are spending a lot of time trying to workaround extensions.json using absolute paths. A global search and replace of the paths in extensions.json using a text editor seems more likely to succeed than subst. However, I'd suggest uninstalling and re-installing the extensions instead. That is pretty quick since you won't lose any of the add-ons settings when you uninstall them.
TBsync is a very fresh install (3 days ago), so I suspect reinstalling won't be any better...

But I will give it a try ! Thanks.
CharlyMoz
Posts: 13
Joined: November 23rd, 2021, 8:47 am

Re: TB extensions not working after a profile move ?

Post by CharlyMoz »

morat wrote:I think you can delete these files. The app will recreate them the next time it starts.

* extensions.sqlite
* extensions.sqlite-journal (if found)
* extensions.ini
* extensions.json

Corrupt extension files
http://support.mozilla.org/kb/unable-in ... sion-files
Thx Morat !! I didn't find that one... Tried and... failed. With I: drive not set, the extensions are not active. With I: drive they work.

The details :
  • extensions.json was recreated and all paths inside were reset to ... D:\\private\\<etc...> => so absolute path to new location, but not relative. :cry:
  • extensions.ini did not exist and is not created.
  • both sqllite files were existing and are not recreated so far...
@tanstaafl I appreciate your support. Thanks a lot !

I'm spending time on this because my final goal is to be able to use indifferently Linux or Windows machines (until I leave Windows for good).

I have this USB drive with my thunderbird profile on it since 15 years+ and until today only used Windows computers and managed to have my hard disk recognize as I: every time. With Linux I can't use such trick and I'm missing the add-ons... As far as I understand the situation for now I need to reinstall extensions every time I change operating system because of the lack of relative paths for extensions... Everything else works great, thanks a lot to the TB team !

I though it was worth digging before using workarounds. And if needed I can leave without the add-ons on one side (i.e. Windows or Linux).

I'll keep that in mind a let a night pass by...

Charly
Post Reply