Zotero WinWord intergration error

I receive an error "Zotero Word Integration could not complete installation because an error occurred. Please ensure that Word is closed, then restart Firefox." every time Firefox starts. I then installed the integration manually, but the error still shows up every time Firefox starts, when you click the options button for the integration plugin in FF's addon list, and when you click "reinstall Word components" in the option window.

I found a page that covered manual installation by putting the Zotero.dot file in the Word startup directory. That did the job, and i have the correct versions of both the Firefox plugin and the Word plugin (that's Firefox 3.5.5, zotero 2.0b7.5, Integration plugin 3.0a3 running on Windows XP and Office 2007) and everything just works actually, except for the Integration plugin that keeps complaining.

In the comments of another thread the advice was given to see if the Word startup thread is accessible. I double checked that i have access to the Word startup directory (i copied the .dot file there, there's no read only attribute on either the file or the dir).

I reported the errors from the console with ID 342971030. I looked at the error and it refers to a file called browser-overlay.js This is a file that appears in my profile directory under profile\extensions\zoteroWinWordIntegration@zotero.org\chrome. Is this file in the wrong location somehow? If the cause is difficult to find, is it at least possible to silence the warnings on startup, since the Word integration is already completed?
  • That's just the file where the error is occurring. This is the line in question:
    dot.copyTo(startupFolder, "Zotero.dot");
    You could actually silence the error by putting two forward slashes (i.e., "//") in front of that line to comment it out, though it'd be better to figure out why you're getting it.

    What's the path to your Word startup directory?
  • edited November 30, 2009
    Wow, i really should have thought of commenting the line out! I'm a programmer, i just haven't meddled with Firefox plugins before :-) But let's see if we can find the cause first...

    The Word startup directory is %AppData%\Microsoft\Word\Startup. Since this was mentioned in the other thread as well i assume this is the default location where the integration plugin tries to put it. It expands to C:\Documents and Settings\*my user name*\Application Data\Microsoft\Word\STARTUP
    This is where i put the .dot file manually after i tried the automatic installation.
  • First, for posterity, here's the full error:
    [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.copyTo]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://zotero-winword-integration/content/browser-overlay.js :: ZoteroWinWordIntegration_firstRun :: line 126" data: no]"]
    Try adding alert(startupFolder) immediately before the copyTo line and see what path it's using. My guess is that it's getting a nonexistent startup folder path from the registry and that's causing the error. From a very quick glance, it seems the code may be missing a check to verify that the path from the registry actually exists.
  • edited November 30, 2009
    It says [xpconnect wrapped nsILocalFile]

    Probably this is an object that you want to see a field of? This is also the value of appData right after its first assignment in line 62. I littered the script with some additional alerts to get to the bottom of this :-)

    It looks like the script tries several registry locations to find the startup dir. I actually found out that there are some remains of an older office installation that names a now invalid path. However, changing that to a valid path does not make the error go away. So i changed it into the current Word dir, did a whole lot of "alert" debugging and eventually found out i had a Word document open preventing the script from installing again but for a different reason :-P

    So yeah, in this case the culprit was litter from the previous Office installation. I won't be the only one with this problem however, and i think there's room for improvement when multiple startup folders are detected. If there's an error in treating just one then the whole process bails out, while installation in one of the other folder might have succeeded. Also, when i forgot to close word, i didn't get a file not found error. I didn't know how to check this, but it must have been an error along the lines of file in use or no permission to move the old .dot file. So there should be a try/catch block inside the loop that treats all the install paths so that other paths are tried when one fails, and so that specific error messages can be given.
Sign In or Register to comment.