OpenOffice could not communicate with Zotero Error, begging help!

I have installed Zotero 2.0.9 Extension the Zotero OpenOffice Integration extension 3.0b3 on the Firefox 3.6.13, and also have the zotero toolbar in the OpenOffice (3.2.0) successfully. It worked well a week before and .

Problem:
-----------------------------------------------------------------
However, yesterday when I tried to insert a citation by clicking the "Insert citation" button on the toolbar of Writer. It just give a error messagebox saying that

"OpenOffice could not communicate with Zotero. Please ensure Firefox is open and try again."

while my Firefox browser does being open and zotero works well.
-----------------------------------------------------------------


My tries
-----------------------------------------------------------------
The I began to search a solution online and found this post:

http://forums.zotero.org/discussion/15243/libre-office-action-not-supported-invalid-procedure-call/

According to Simon's suggestion, I have tried:

Install OpenOffice Integration 3.0 Branch XPI (Zotero OpenOffice Integration 3.0a9.r7573) : NOT work

Then I also tried the following:

- uninstall the extension in OpenOffice and reinstall it from Firefox Zotero Integration Plugin: NOT work
- uninstall the Firefox Zotero Integration Plugin and reinstall it and then repeat the above step: NOT work
- uninstall the OpenOffice and reinstall it and then repeat above two steps: NOT work
- Downgrade Java from Sun 1.6.0_23 to 1.6.0_22 (NOT work), then to 1.6.0_18 (NOT work)

My system configurations are:

Windows XP SP3
Firefox 3.6.13
Zotero 2.0.9
Zotero OpenOffice Integration 3.0b3 (also tried 3.0a9.r7573 according to Simon)
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
-----------------------------------------------------------------


Further Try
-----------------------------------------------------------------
Besides that I also found this blog:
http://www.t3node.com/blog/why-openofficeorg-and-zotero-are-not-communicating/

when I used

C:\>netstat -a

to check the port status, I can see that the port 50001 does being listened.

But the error "OpenOffice could not communicate with Zotero. Please ensure Firefox is open and try again" is still there.
-----------------------------------------------------------------


Final Try -- no lucky at all.........
-----------------------------------------------------------------
As the final try, I updated the OpenOffice to 3.3.0. Now the communicate error is gone, but a new error raised:

The marcro window is open and it stops at: "Declare Function FindWindow Lib "user32" Alias _"FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _As String) As Long" highlighting the word "Long"

which is exactly the error that Spock99 experienced (http://forums.zotero.org/discussion/15243/libre-office-action-not-supported-invalid-procedure-call/)

Then I repeated uninstalling and then re-installing the extensions for both firefox and OpenOffice, but got no fortune anyway.
-----------------------------------------------------------------


So bad my feeling is...
-----------------------------------------------------------------
Those things just are driving me crazy since I need Zotero to finish my dissertation.

Sorry for writing such a long post, but really appreciate if anyone could provide help on this problem.
  • Do you have ZoneAlarm Forcefield installed?
  • edited February 22, 2011
    Hi, Simon, so nice to see that you noticed my post.

    No, I have never installed either ZoneAlarm or Forcefield, in fact I have no idea what they are.

    I also have read your answers in other threads which are talking about uninstall ZoneAlarm or Forcefield may help to solve the problem, but that is not my case.

    BTW: I have my laptop installed Ubuntu 9.10, with zotero 2.0.9, Zotero Integration 3.0b3, and OO 2.3.0, which works without any problems.

    The error only occurs on XP desktop. In the beginning, I have thought it may be due to the upgrading of Java, that is why I downgrade Java from 1.6.0_23 to 1.6.0_22 to 1.6.0_18, but it does not help at all.

    What is your suggestion? Thanks
  • Java is irrelevant to the "OpenOffice could not communicate with Zotero. Please ensure Firefox is open and try again" error message; this message indicates a failure before Java is initialized. Port 50001 is also irrelevant in Zotero 2.0+, which opens this port only so that Zotero 1.0 users get a message stating that Zotero OpenOffice Integration is out of date.

    I believe we've only ever heard of three causes on Windows, which are:

    1) ZoneAlarm Forcefield
    2) Firefox running as an administrator
    3) Firefox running with the -no-remote command-line option

    This error appears if the OpenOffice.org plug-in is looking for a Firefox window, but fails to find one. This will only happen if security software is preventing OpenOffice.org from communicating with Firefox, if OpenOffice.org and Firefox are running with different privileges, or if a Firefox command-line option or extension prevents Firefox from opening the window that OpenOffice.org is looking for.
  • Thanks for your explanation. Simon!

    Ok, according to your reply, I do the following experiments, but the question is still un-solved.

    What I did:
    ================================================
    1. Shutdown all firefox and OO windows
    2. Disable the anti-virus soft (Symantec AntiVirus 10.1.6.6000) Auto-protect function
    3. Turn off Windows Firewall
    4. Run firefox and OO via command-line, that is, start -> run -> cmd -> <DOS window appears>
    5. Type

    C:\> "C:\Program Files\Mozilla Firefox\firefox.exe"
    C:\> "C:\Program Files\OpenOffice.org 3\program\swriter.exe"

    to start the firefox and OO (in order to guarantee that FF and OO are running with the same privileges)
    6. Disable suspicious FF extensions, below is the list for all extensions I have:

    Extensions
    ------------------------------
    AutoPager 0.6.2.4
    Download Statusbar 0.9.7.2
    DownloadHelper 4.8.3
    DownThemAll! 2.0.1
    FEBE 6.3.3.2
    Java Console 6.0.07
    Java Console 6.0.10
    Java Console 6.0.16
    Java Console 6.0.13
    Java Console 6.0.20
    Java Console 6.0.21
    Java Console 6.0.19
    Java Console 6.0.18
    Java Quick Starter 1.0
    Microsoft .NET Framework Assistant 1.2.1
    ScrapBook 1.3.7
    Tiny Menu 2.0.2
    Zotero 2.0.9
    Zotero OpenOffice Integration 3.0b3
    ------------------------------


    Themes
    ------------------------------
    Default 3.6.13
    ------------------------------


    Plugins
    ------------------------------
    2007 Microsoft Office system 12.0.4518.1014
    Adobe Acrobat 8.2.6.262
    Java Deployment Toolkit 6.0.180.7 (disabled)
    Java Deployment Toolkit 6.0.220.4 (disabled)
    Java(TM) Platform SE 6 U18 6.0.180.7
    Microsoft? DRM 9.0.4503
    Microsoft? DRM 9.0.4503
    Mozilla Default Plug-in 1.0.0.15
    Picasa 3.0.0.0
    Shockwave Flash 10.2.152.26
    Windows Media Player Plug-in Dynamic Link Library 3.0.2.629
    Windows Presentation Foundation 3.5.30729.1
    -------------------------------

    Do you think any of them are possible cause? Thank you !
  • Hi, Simon.

    I do more search and find this post: http://forums.zotero.org/discussion/9569/openoffice-cant-communicate/

    According to your post at Oct 30th 2009

    I used

    "C:\Program Files\Mozilla Firefox\firefox.exe" -silent -ZoteroIntegrationAgent OpenOffice -ZoteroIntegrationCommand addCitation

    and "choose style" and "insert citation" windows appears. Does that imply that my FF and zotero work well? But the OO toolbar still does not work.

    As a temporary solution. Could you tell me the corresponding commands for

    "Edit citation"
    "Insert Bibliograhpy"
    "Edit Bibliograhpy"
    "Refresh"

    so that I can issue the command under a command-line mode to finish my job? (a stupid way, I know, but I have to....)
  • You can replace addCitation with editCitation, addBibliography, editBibliography, and refresh. I am still puzzled by the cause here, but I may have a workaround in a couple days.
  • Thank you so much, Simon.

    That will make me surviving for a while. I am thinking to look for another XP machine and install the same version FF, OO and Zotero, so that we can see where is the problem. I will post the result here when I have it done.
  • I do experiments on other two XP machine.

    One is with XP Home sp3, new install Firefox 3.6.13, Zotero 2.0.9, Zotero OpenOffice Integration 3.0b3 and OO 3.2.0.

    The other is a XP Pro sp3 in VirtualBox, installed with FF 3.6.8 before. New install Zotero 2.0.9, Zotero OpenOffice Integration 3.0b3 and OO 3.2.0.

    Both give the same error as before: "OpenOffice could not communicate with Zotero. Please ensure Firefox is open and try again"
  • I tested with Zotero 2.0.9, OpenOffice Integration 3.0b3, and OOo 3.2.1 on Win XP SP3 and had no problems, and I've just verified that everything is still working. I can try 3.2.0, but I doubt there will be any difference, since 3.1.0 worked as well. Is there any software installed on all of your systems that could be interfering?
  • Also works for me with 3.2.0.
  • That is really frustrating! I even create a new virtual machine in VirtualBox and install a totally new XP pro on it. But still does not work.

    BTW: I also try to install the zotero integration plugin for MS Word 2003 (which is in the same virtual xp pro). And it works indeed!

    Thus I think the problem is due to the OO extension side, not at FF side.

    Is there any difference on the communication mechanism between Word and OO Writer plug-ins?
  • Is Zotero open-sourced? I know it is released under GPL which is a freeware license, but I am not sure if it open-sourced? If so, is it possible for me to take a look at the code (I know some programming).
  • If it works with Word, then it does appear to be at the extension side. The basic communication mechanism is the same for both Word and OOo, but there are slight differences in implementation because of the many idiosyncrasies of OOo Basic. I'm trying a new VM in VMWare right now to see if I can reproduce the issue you're seeing.

    The source to the OOo Basic stub (which is the component throwing this error) is accessible directly from OOo, by going to Tools->Macros->Organize Macros->OpenOffice.org Basic, expanding the Zotero folder and selecting the Zotero script, and clicking edit. While it's short, I wouldn't expect it to be easy to understand, as it relies upon poorly documented OpenOffice.org functionality and undocumented Firefox functionality. The source for the extensions is also available, although it shouldn't be relevant to the issue you're seeing. (See Modifying Zotero Files.)
  • Okay, I installed:

    Windows XP SP3 Professional
    Firefox 3.6.13
    OpenOffice.org 3.2.0
    Zotero 2.0.9
    Zotero OpenOffice.org Integration 3.0b3

    all from new downloads, save WinXP, and I'm not experiencing any issues, so I am puzzled.
  • Thanks, Simon and fbennett,

    I have to say that you guys did very fantastic jobs on developing Zotero !! It is so helpful and so amazing. No matter what kind of problem I met, the major feeling of me is appreciation to you.

    Ok, I already took a look at the code.

    In the SVN site, I think what matters to me is under

    integration - xpcom - OpenOffice

    Then I don't know which is the real build location, so I just pick out one randomly, that is,

    - branches - 3.0

    under -src are java code, I think that is used to realize the implementation inside OO to create a reference mark, etc. so I pass it by.

    Then the real thing I should pay attention is under -vba: Zotero.vba, right?

    and I think the real problem is here:
    ------------------------------------------------------------------------------------
    64 ' Find Firefox message window
    65 Dim appNames(4)
    66 appNames(1) = "Firefox"
    67 appNames(2) = "Zotero"
    68 appNames(3) = "Browser"
    69 appNames(4) = "Minefield"
    70 For i = 1 To 4
    71 ThWnd = FindWindow(appNames(i) & "MessageWindow" & Chr(0), Chr(0))
    72 If ThWnd <> 0 Then
    73 Exit For
    74 End If
    75 Next
    76 If ThWnd = 0 Then
    77 ZoteroNotFound()
    78 Exit Sub
    79 End If
    ------------------------------------------------------------------------------------

    In the for loop, I guess, all 4 case the ThWnd receive a 0 as the return value, so, ZoteroNotFound().

    then is it possible that the reason is because that the vba interpreter can't find the FindWindow function ?

    as you declare in the head
    --------------------------------------------------------------------------------
    1 Declare Function FindWindow Lib "user32" Alias _
    2 "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _
    3 As String) As Long
    ---------------------------------------------------------------------------------


    Or, is there a way for me to commend out the ' Find Firefox message window judgement part?

    (since I can issue the commands via command-line, so other functions are in good shape).

    In that way, I can have a "customized Zotero.vba exclusive for Yu Wang (my name)", haha, stupid solution, but may work to me, how do you think about it?
  • OK, Simon, something may be different from me to you guys is that I am a Chinese, and all system have Chinese input method....

    Besides that, I really can not think any other differences....
  • Okay, two things to try. First, you can try Zotero OpenOffice.org Integration 3.0b2. There is a very subtle difference in the code there, which makes it fail to function with OpenOffice.org 3.3.0 but may make it work on your system.

    If that fails, you should be able to get things to work by replacing the entire ZoteroCommand function with:

    Sub ZoteroCommand(cmd As String, bringToFront As Boolean)
    Shell "C:\Program Files\Mozilla Firefox\firefox.exe -silent -ZoteroIntegrationAgent OpenOffice -ZoteroIntegrationCommand " & cmd
    End Sub

    (Untested code, and I'm assuming Firefox is installed in the default location, but this should work.) You can do this by editing the macro within OpenOffice.org as I described above, although the changes will be overwritten by any Zotero OpenOffice.org Integration upgrade, and it won't work if you move your Firefox install.

    Let me know how things work out. I'll see if I can track down Chinese versions of things and figure out what's behind this.
  • Oops, I think that needs to be

    Shell """C:\Program Files\Mozilla Firefox\firefox.exe"" -silent -ZoteroIntegrationAgent OpenOffice -ZoteroIntegrationCommand " & cmd

    in the command above.
  • Super! Simon, the 3.0b2 works!!!

    what is the difference between

    ThWnd = FindWindow(appNames(i) & "MessageWindow", "")

    and

    ThWnd = FindWindow(appNames(i) & "MessageWindow" & Chr(0), Chr(0))

    It seems that the Chr(0) is the crime!
  • edited February 25, 2011
    BTW: I also test that "super simplified verison" ZoteroCommand.
    Both versions are workable.

    I mean either

    Shell "C:\Program Files\Mozilla Firefox\firefox.exe -silent -ZoteroIntegrationAgent OpenOffice -ZoteroIntegrationCommand " & cmd

    or

    Shell """C:\Program Files\Mozilla Firefox\firefox.exe"" -silent -ZoteroIntegrationAgent OpenOffice -ZoteroIntegrationCommand " & cmd

    is good.

    Thank you so much! I really enjoy the procedure, from that I learn something about the OO marco programming. Good experience to me.

    Please let me know if there are anything I can provide help. I do expect Zotero can be stronger and stronger, and beat Endnote or others finally!

    cheers!
  • Chr(0) is a null terminator for the string, without which communication with OpenOffice.org 3.3.0 doesn't work, at least on a system with an English/European code page. I am now able to reproduce the issue you reported after changing my test system's code page to Chinese. I'll see if I can figure out a way to make things work regardless of code page while preserving OpenOffice.org 3.3.0 compatibility.
  • edited February 25, 2011
    Thanks for your explanation! Hope you can figure it out soon.

    BTW: my email is

    far***rt@gmail.com (as my account here).

    Just let me know if anything you think I can provide help.
Sign In or Register to comment.