Closed Bug 683328 Opened 13 years ago Closed 6 years ago

On Windows, extensions can't be installed into profiles located on a ext2xsd filesystem.

Categories

(Toolkit :: Add-ons Manager, defect)

2.0 Branch
All
Windows 7
defect
Not set
major

Tracking

()

RESOLVED INACTIVE

People

(Reporter: pralltgarantiert, Unassigned)

References

Details

(Whiteboard: [Ext2fsd?])

Attachments

(8 files, 1 obsolete file)

Attached file extensions.log
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0
Build ID: 20110811165603

Steps to reproduce:

On Windows 7 with Thunderbird 3.1.12:
Moved my profile folder from C:\Users\Username\AppData\Roaming\Thunderbird\ to another drive (G:\mystufff\Thunderbird\).
Changed the C:\Users\Username\AppData\Roaming\Thunderbird\profiles.ini accordingly.
Tried to install the extensions "lookout-1.2.12-sm+tb.xpi".
Got the message "... will be installed during next startup. Restart Thunderbird?".
Restartet Thunderbird.


Actual results:

Extension was not installed.
Thunderbird keeps telling me that the extension will be installed after a restart.
After several restarts the extension still isn't installed, TB keeps offering restarts.
The .xpi is copied to [profile]\extensions\staged-xpis\ (G:\mystufff\Thunderbird\myprofile.default\extensions\staged-xpis\lookout@aron.rubin).
A folder in [profile]\extensions\ is created for the extension (G:\mystufff\Thunderbird\myprofile.default\extensions\lookout@aron.rubin), but stays empty.

extensions.log shows an error: 

2011-08-30 22:25:21 - ExtensionManager:_finishOperations - failure, catching exception - lineno: 1625 - file: undefined - [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/components/nsExtensionManager.js :: moveDirectory :: line 1625"  data: no]



Expected results:

The extension should have been installed correct.
(unzipped to  [profile]\extensions\lookout@aron.rubin, here G:\mystufff\Thunderbird\myprofile.default\extensions\lookout@aron.rubin)

This behavior is new to Win7. The same configuration used to work a couple of months ago on Windows Vista with the 3.1 branch of Thunderbird.
Extensions can't be installed into profiles located on a different drive with Thunderbird 5 either, according to a forums entry:
"TB5/Win7 Can't Add Extensions"
http://forums.mozillazine.org/viewtopic.php?f=39&t=2270669

There was something similar in the past, but on Linux and with symlinks:
"Bug 275266 - profile directory on another disk causes extension problems"
https://bugzilla.mozilla.org/show_bug.cgi?id=275266

Personally I guess this is caused by some new security feature of Windows 7.

Stefan
Component: General → Add-ons Manager
Product: Thunderbird → Toolkit
QA Contact: general → add-ons.manager
Version: 3.1 → 2.0 Branch
Stefan, can you please enable 'extensions.logging.enabled' and attach a copy of the complete console (or Error Console) output? That would be great. Thanks.
Okay after struggling with the creation of a new, additional, TB Profile for debugging, here we go.

Now with display_mail_user_agent-1.6.6-tb+sm.xpi as I installed the extensions I need as a "global install":
Got the message "... will be installed during next startup. Restart Thunderbird?".
Restartet Thunderbird.

-> "Add Ons" window, "Extensions" tab still shows "...will be installed during next startup. Restart Thunderbird?"

In the Error Console there is only one message:

Error: ExtensionManager:_finishOperations - failure, catching exception - lineno: 1625 - file: undefined - [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: file:///C:/Program%20Files%20(x86)/Mailclients/Mozilla%20Thunderbird/components/nsExtensionManager.js :: moveDirectory :: line 1625"  data: no]

That is the same, which shows up in extensions.log (but without a timestamp).

The console itself shows the same error:

*** EM_ERROR *** ExtensionManager:_finishOperations - failure, catching exception - lineno: 1625 - file: undefined - [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: file:///C:/Program%20Files%20(x86)/Mailclients/Mozilla%20Thunderbird/components/nsExtensionManager. js :: moveDirectory :: line 1625"  data: no]

So Nothing new.
Did I miss anything?
Shall I enable other "Development preferences" (e.g listed on https://developer.mozilla.org/en/setting_up_extension_development_environment#Development_preferences) beside extensions.logging.enabled?

Stefan
Thunderbird 3.1 is based on pretty old code now that we wouldn't work on a fix for this issue for. Do you still see the same problem with the more recent Thunderbird 6?
I'll test it with Thunderbird 6 tommorow. (I have to make a parallel installation of TB6, and do a backup of my existing profile, just to be sure that TB6 has no chance messing with it.)
Good night.
Attachment #557346 - Attachment is obsolete: true
For the impatient: Goto Step 5b below to see the requested error console log from TB6. (a.k.a. see attachment 557715 [details])

I already feel sorry for this humongous comment, but I felt like documenting it pretty verbose, as I didn't know what was going on at all.

Okay. My situation is quite complex(screwed up?). Nowadays a drive isn't always _just_ a drive.
So let me introduce you to the "drives" of my Windows 7 (64bit) Professional (SP1):
C:\ NTFS, Primary Partition of HDD, Encrypted with Truecrypt 7.0a: "System Encryption", so a passphrase is needed before booting.
D:\ DVD-Drive
E:\ Ext3, Logical Partition of HDD, Encrypted with Truecrypt, needs Ext2Fsd (0.51) to be accessed (in Truecrypt the option "Mount as removable media" is set so that I can start all executables that are in that partition, mounted as a local drive some executable can't be started, an obscure error message about a "network problem" pops up, but that is another story...).

And currently for testing purpose:

G:\ Ext3 on a USB-Flashdrive (NOT encrypted, just plain Ext3)
H:\ Fat32 on a second USB-Flashdrive (NOT encrypted, just plain Fat32)

Links: 
www.truecrypt.org www.ext2fsd.com

During the last hours I've been creating profiles with the thunderbird profile manager in self defined directories residing in:
%Desktop%\
E:\
G:\
H:\

I'll now post blocks of the console and error console messages with a description what I did to get them, and add for what drive those apply.

----------------------

Step1:
To reproduce:

Start TB -profilemanager, create an account, specify a directory, create new folder, start TB with the new profile, type in Name/Email/Password for the automagic account creation tool, click "Continue",

Actual results:
Thunderbird checks the OnlineDatabase for the settings, an exception in the console is shown:

-- Exception object --
+  (string) The config file XML does not contain an email account configuration.

*
-- Exception object --
+ _message (string) ''
+ stack (string) 352 chars
+ code (number) 0
+ uri (string) 'http://autoconfig.gmx.de/mail/config-v1.1.xml'
+ message (string) ''
+ toString (function) 3 lines
*
-- Stack Trace --
Exception("")@chrome://messenger/content/accountcreation/util.js:189ServerException("",0,"http://autoconfig.gmx.de/mail/config-v1.1.xml")@chrome://messenger/content/accountcreation/fetchhttp.js:300(false)@chrome://messenger/content/accountcreation/fetchhttp.js:222([object ProgressEvent])@chrome://messenger/content/accountcreation/fetchhttp.js:146


The configuration is found and the "Create Account" Button is clickable.

Expected results:
No Exceptions(?)

This step 1 applies to:
%desktop%
E:\
G:\
H:\

----------------------

Step 2:
Click "Create Account".

Actual results:
The "Create Account"-Button becomes greyed out. PW check OK. Nothing new in the console. But the "Mail Account Setup" window stays put. Clicking "Cancel" closes the "Mail Account Setup" window. "System Integration" window shows, set up, click OK, TB starts to connect to imap.gmx.net, IMAP folders in the main window start to exist, but no "Local Folders". Account has been created. Nothing new in the console.

Expected results:
"Mail Account Setup" window closes. "System Integration" window shows up. Console shows:
data to post = {"rev":0,"userEmailHash":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","events":{"smtpServerAdded":{"time":1314913423274,"da
ta":true},"accountAdded":{"time":1314913425469,"data":true}}}

Step 2 applies to:
G:\ (Ext3)
E:\ (Ext3+Truecrypt)


error-console entry probably responsible for Step 2:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgSendLater.hasUnsentMessages]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/mail-offline.js :: <TOP_LEVEL> :: line 81"  data: no]

For a more detailed error console output see attachment 557702 [details] step2-accountcreate-USB-Fat32-error-console.txt for %desktop% and H:\ (the output is identical for both)
and attachment 557707 [details] step2-accountcreate-USB-Ext3-error-console.txt for E:\ and G:\ (the output is identical for both)

----------------------

Step 3:

Close Thunderbird and open it again.

Actual results:
No more exceptions. Just the six warnings in the error console. (See attachment 557711 [details] step3-6warnings-error-console.txt)
So the profile is set up.

Expected results:
Same with no warnings(?)

Step 3 applies to:
%Desktop% (NTFS)
H:\ (Fat32)
G:\ (Ext3)
E:\ (Ext3 + Truecrypt)

----------------------

Step 4: 

Dragging 2 .xpi files into Thunderbird's Add-ons Manager tab at once.
enigmail-1.3.1-tb+sm-windows.xpi + lookout-1.2.12-sm+tb.xpi, both downloaded with FireFox to the Windows Desktop.

Actual results:
Works as expected.
With 2 errors in the error console, see attachment 557712 [details] step4-2extdrop-USB-Ext3-error-console.txt (identical for all 4 locations) 

Step 4 applies to:
%Desktop% (NTFS)
H:\ (Fat32)
G:\ (Ext3)
E:\ (Ext3 + Truecrypt)

----------------------

Step 5a: 

Restart TB after Extensions Dropping.

Actual results:
Works as expected. Enigmail and Lookout are both installed.
See attachment 557713 [details] step5a-2extrestart-desktop-error-console.txt for usual error console output of enigmail. (identical for H:\ and %Desktop)

Step 5a applies to:
%Desktop% (NTFS)
H:\ (Fat32)

----------------------

Step 5b:
Restart TB after Extensions Dropping.

Actual results:
Only one Extension is installed. (Which one is random.)

Error Console shows 1 warning and 1 exception, see attachment 557714 [details] step5b--USB-Ext3-error-console.txt for successful enigmail install:
Warning: WARN addons.xpi: Failed to remove trash directory when installing {847b3a00-7ab1-11d4-8f02-006008948af5}: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource://gre/modules/XPIProvider.jsm :: recursiveRemove :: line 1183"  data: no]
Source File: resource://gre/modules/XPIProvider.jsm
Line: 1183

Error: ERROR addons.xpi: Failed to install staged add-on lookout@aron.rubin in app-profile: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource://gre/modules/XPIProvider.jsm :: recursiveRemove :: line 1183"  data: no]
Source File: resource://gre/modules/XPIProvider.jsm
Line: 1183


See attachment 557715 [details] step5b-2extrestart-HDD-Ext3+TC-error-console.txt for successful Lookout installation.

Expected results:
Both extensions should be installed.

Step 5b applies to:
G:\ (Ext3)
E:\ (Ext3 + Truecrypt)

----------------------

Bottom line:
I can do all sort of things in Windows on my Ext3 formatted drives.
But Thunderbird cannot. (Deleting profiles with the profile manager always leaves some empty directories on Ext3: \extensions\trash, \minidumps and 14 empty ones in \Cache : "0" and "3" through "F", two subdirs in \Cache are deleted: those are "1" and "2" . Everywhere else the complete profile directory is gone.)

What is going on here? Thunderbird had the rights and power to create all those files and directories but can't delete or add some?
Bug 644562 looks related: But it's the other way round: On Linux extensions didn't work on a VFAT partition.
Recently I updated my Firefox to 7.0.1 since then Firefox can't install new Add-Ons into a profile residing on that Ext3 drive.
The five other Add-Ons, which were installed when Firefox was still in the FF 6 branch, are still there.
As now Thunderbird (at least from 3.1.12 upwards) and Firefox (at least 7.0.1) are not able to install new addons on that type of drive I guess something in the common code of the Add-ons manager has changed.
Okay I'm lost.
I installed FireFox 3.6.23 and 3.0.1 for testing.
And I can't install even a single AddOn with those to a profile on the ext3 drive.
FF 7.0.1 can, at least, installs one AddOn.
But HOW did I install the other 5 Addons that I've got up and running for like months in the first place?
I wanted to add my 2 cents here.
I was running a few recent versions of TB with my profile on a shared linux computer drive and was able to install add-ons, etc. That computer started having issues, so I moved my profile to an Ext3 formatted partition on my 64-bit Win 7 box (I use Ext2fsd to access it). It ran fine, as most apps do, so I didn't think there was a problem. Today, I decided to upgrade to TB 9.01, but Lightning didn't upgrade and the old version wasn't compatible. I could not uninstall any extension (it said it was uninstalled, but when I restarted TB, it was back. Every time I restarted TB, the following was added to my extensions.log file with the time I restarted:
 ERROR addons.manager: Exception calling provider startup: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource:///modules/XPIProvider.jsm :: <TOP_LEVEL> :: line 1882"  data: no] at resource:///modules/XPIProvider.jsm:1882

When I tried to install ANY extension, either from a selected .xpi or via the Add-ons interface, I would get the "XX could not be installed because Thunderbird cannot modify the needed file" error. After reading this bug report, I decided to copy my profile to my C-drive. After doing that, I could (un)install add-ons without errors. Since it worked fine when the profile was on the linux ext3 drive, I'm thinking it has something to do with how it's accessed/mounted on Windows, however, this is the only app I've ever had a problem with. BTW, the extensions that were already installed ran fine, so it's only during the (un)installation process.
Two affected. I hope, with the help of someone who knows about the code, we can tackle it now.
I have exactly the same errors, but on Win XP x86 and not Win 7 x64. Both Thunderbird 14 and Firefox 14 are unable to update any extension, with this NS_ERROR_FILE_NOT_FOUND error. And yes, this happens on Ext3 partitions mounted with Ext2fsd 0.51, so I guess the main culprit is the interaction of Mozilla extension install code and Ext2fsd. I had a look with Procmon, and found that subdirectories of the "extensions" folder called "staged" and "trash" are created and populated, but then I have a lot of DeviceIoControl calls that return "INVALID PARAMETER" and "INVALID DEVICE REQUEST" codes. Seems Mozilla is doing there some Voodoo that works with NTFS but not otherwise.
Btw, it time to change the status to NEW, and I think change platform to Windows general, not only Win 7 64bit. And the summary should reflect different file systems, not different drives.
Stefan, bpubs: Did it work over Ext2fsd on earlier versions of Firefox and/or Thunderbird? If it did, can you identify the "last good" and the "first bad" version?
Severity: normal → major
Hardware: x86_64 → All
Summary: On Windows7 extensions can't be installed into profiles located on a different drive. → On Windows, extensions can't be installed into profiles located on a different filesystem.
Whiteboard: [Ext2fsd?]
Please give me another one or two weeks. I've been traveling during summer and have to tie up a couple of loose ends before I can figure that out.
I could reproduce the "will be installed when Thunderbird is restarted." loop with the following Thunderbird releases and just one add-on:
3.1
3.0
2.0.0.24
2.0.0.0
1.5.0.14

Error-Log of 1.5.0.14 after several restarts:

*** ExtensionManager:_finishOperations - failure, catching exception - lineno: 1
903 - file: undefined - [Exception... "Component returned failure code: 0x800040
05 (NS_ERROR_FAILURE) [nsIFile.directoryEntries]"  nsresult: "0x80004005 (NS_ERR
OR_FAILURE)"  location: "JS frame :: file:///C:/Progs/TB1.5.0.14-en-US/component
s/nsExtensionManager.js :: moveDirectory :: line 1903"  data: no]
Warning: unrecognized command line flag -console

Anything below 3.0 doesn't create an extensions.log file, despite setting  'extensions.logging.enabled' to true.

Bottom line:
I could not find a "last good version" where Thunderbird works with ext2fsd 0.51 on Win7 64 bit. (I didn't test any release below 1.5.0.14)

I guess, in the past I had some extensions in TB and FF which looked correctly installed, because when I set up Win7 64bit with ext2fsd 0.51 (+ Truecrypt 7.0a), I just copied complete profiles from my Windows Vista 64bit setup which used ext2ifs 1.11a [1] instead of ext2fsd.

Heinz: Could you give ext2ifs a try and see if it works then? If I remember correct s.th. in win7 64bit prevented me from staying with ext2ifs, so i was forced to switch to ext2fsd.


For Thunderbird 15.0 my current workaround is to populate my extensions.ini by hand. And copy the .xpi to some arbitrary place on a NTFS volume, just to be sure. Unfortunately none of the extensions is shown in the "Add-ons Manager". Which mostly is not a big deal. But today I ran, for the first time, into an extensions which settings are only accessible through the Add-ons Manager. So I'm screwed up. As I must make some initial configuration. (This is ThunderSync 2.1 [2], which I wanted to use to merge a couple of contacts which have multiple entries in multiple address books, e.g. one with only e-mail addresses and another with only phone numbers...)

Shall I try some Firefox releases?

[1] http://www.fs-driver.org/
[2] https://addons.mozilla.org/en-US/thunderbird/addon/thundersync/
> Heinz: Could you give ext2ifs a try and see if it works then? If I remember correct s.th. in win7 64bit prevented me from staying with ext2ifs, so i was forced to switch to ext2fsd.

In fact I have used ext2ifs for years, and even tracked down an error that besides others led to the 1.11a release. But unfortunately on some point my system would refuse to boot if ext2ifs.sys or mountifs.sys are activated. I was able to track this down to the moment when autochk is called, the very first action of SessionManager. Stephan Schreiber tried to fix this but no avail. This forced me also to switch to ext2fsd.

With ext2ifs I never had problems like this except the one bug (had something to do with files marked for deletion that could be opened). With ext2ifs I had experienced some more problems, and all seemed to stem from the handling of certain options to ext2fsd. One is, when WriteFile is called with option NoCache, this leads to nearly still-stand. I think I also found the reason for this bug, should have reported here already. Mozilla adds option OpenReparsePoint which makes sense only on NTFS; other file systems should silently ignore it. But ext2ifs throws an error "File not found" when CreateFile is called with this option. I think this is the error reported in the error console as NS_ERROR_FILE_NOT_FOUND. It is thrown when the staged directory should be created but is not. I tried to contact Bo Branten on this but he did not reply.

I think the culprit in this case is with ext2ifs, but Mozilla could work around this situation by using FILE_FLAG_OPEN_REPARSE_POINT in CreateFileW-calls only on NTFS partitions.
Heinz, are all the appearances of ext2fsd and ext2ifs in your comment #25 in the correct places where you intended them to be?
E.g.:
(In reply to heinz.repp from comment #25)
> With ext2ifs I had experienced some more problems, and all seemed to stem from
> the handling of certain options to ext2fsd. 
or
> I think the culprit in this case is with ext2ifs,[...]

Whenever I have to think about ext2ifs vs. ext2fsd, it always confuses the heck out of me.

I did a search in bugzilla, all statuses, including comments for "OpenReparsePoint" and "FILE_FLAG_OPEN_REPARSE_POINT", but didn't get a hit other than this bug. Or were you talking about the WriteFile + NoCache bug?

I've seen Bo Brantén in the Forums of ext2fsd [1] a month ago.

Heinz, can you add your wisdom of file system driver details to a bug filed at the ext2fsd bug tracker [2]?

[1] http://sourceforge.net/projects/ext2fsd/forums/forum/143329/topic/5518395
[2] http://sourceforge.net/tracker/?func=detail&aid=3422943&group_id=43775&atid=437368
Oops, I should have rechecked my post more thoroughly:

> With ext2ifs I had experienced some more problems, and all seemed to stem from
> the handling of certain options to ext2fsd.

that should have read:

With *ext2fsd* I had experienced some more problems, and all seemed to stem from
the handling of certain options to ext2fsd.

and:

> I think the culprit in this case is with ext2ifs,[...]

should have been

I think the culprit in this case is with *ext2fsd*, ...

For this bug it is definitely the bug of CreateFile with OpenReparsePoint, that is answered by ext2fsd with error FileNotFound, and without creating the directory or file requested that impedes  the creation of the temporary staging directory and makes installation or updates of add-ons fail with NS_ERROR_FILE_NOT_FOUND.

The WriteFile/NoCache Bug is a different beast, and only meant as one example of other issues I spotted with ext2fsd. Nevertheless, ext2fsd has some more advanced features like ext3/ext4 support and is open source, so I think it is the the way to go on. Will add my findings to sourceforge issue tracker. The reason I didn't do this in the first line was that I found quite a few issues reported in the last months and none of them answered by a developer, so development appeared stalled.  

Btw: resent my mail to Matt Wu also who seems to be the one who wrote ext2fsd but without response until now.
Ok, tried to report on sourceforge ( http://sourceforge.net/tracker/?func=detail&aid=3422943&group_id=43775&atid=437368), but when I hit submit sourceforge refuses my submit with error:

> There was an error processing your request ...
> 
> Error - Choose a Group
> ERROR - No group_id was chosen. 

No idea how to choose a group there, and even the reporter's bug report has Group: none. Seems to be a sourceforge bug.
"It's an ugly planet. A Bug planet! A planet hostile to life"
(From the movie Starship Troopers)

When I click "Add new" to open a new ticket on sourceforge/ext2fsd I can choose "Category" and "Group" from dropdown lists. The values presented for Group are "None" and "v1.0 (example)", for Category "None", "Ext2fsd" and "Interface (example)". When commenting another one's bug I can't choose it. But I can do it.
But there are always these "example" entries, looks like the bug tracker was never set up completely.

Getting ext2fsd fixed would be the cleaner solutions than to add a workaround in Thundebird.
Do you still see this problem when using a newer version?
(no change at http://sourceforge.net/p/ext2fsd/bugs/114/ )
Flags: needinfo?(pralltgarantiert)
Can't say. because I changed this partition (my home) to ntfs, as ntfs-3g now supports pretty all linux permissions and user-mapping, even ADS; so I had no need any more for ext2xsd; needless to say this move solved also all problems reported here ...
Summary: On Windows, extensions can't be installed into profiles located on a different filesystem. → On Windows, extensions can't be installed into profiles located on a ext2xsd filesystem.
See Also: → tb-ltng-updateprob
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Flags: needinfo?(pralltgarantiert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: