Problem with proxy redirection

Hi,

I have a problem with proxy redirection since I upgraded zotero a week or so ago, I'm currently using version 2.1.5.

The entries in the Proxy redirection tab of the preferences haven't changed but Firefox now opens sites directly; previously when I clicked on a journal link in Thunderbird, Zotero automatically kicked in in Firefox and redirected through my institutional proxy (for journal access only) and gave me full access to the journal. Now I'm going straight to the link in the email, through which I only have public access, thus no papers.

I've tried deleting the entries in the table on the Zotero->Preferences->Proxies tab but this hasn't worked.

It's a really useful feature, so any help would be greatly appreciated.
Dave.
  • is this specific to links from outside firefox, or what happens if you follow a link within Firefox (e.g. this one http://www.jstor.org/stable/3010636 )
  • Unfortunately for your test link I have IP based access to jstor. But I've rigged up my own test (using a Nature link) and it's the same problem as stated above. It goes straight to the correct Nature address rather than being redirected through the proxy. (I manually reentered the entries in the preferences tab first of course, having deleted them earlier).

    Dave.
  • Ok, I'm not entirely sure why but by playing with it I've managed to get it to work for Nature now, but not for Science. Weird.
  • I have a similar problem. After updating to 2.1.5, my proxy redirection stopped working altogether. So I did a clean re-install of firefox (even erased the .mozilla directory), did a clean re-install of zotero, and proxy redirection just does not work for me at all. I even tried manually putting in entries in the hosts table, but still no luck.

    I tried logging zotero output, and there does seem to be a suspicious looking entry. There is some error that says:

    JavaScript Error: "browser is not defined" {file: "chrome://zotero/content/xpcom/proxy.js" line: 411}]

    I am on a 64-bit Ubuntu machine with 64-bit Firefox 4
  • I can confirm this problem for Ubuntu Lucid with Zotero 2.1.5 and Firefox 3.6 (with latest updates). Interestingly, I have no problem on my Windows office machine with Firefox 3.6.10 and Zotero 2.1.5.
    Hope this can be fixed, as it is a nice time saver.
  • Actually it doesn't seem to work for me either in the current branch (2.1.6.r9134) in FF 3.6.16 and Ubuntu 10.04.

    The proxy table is fully populated, I just don't get any redirection.
    Let me know if you need any more information - my error report doesn't seem to contain anything useful.
  • Same problem here -- running Mozilla 3.6 on Ubuntu Maverick.
  • edited May 9, 2011
    Hi,

    I hit the same bug/problem/whatever (that doesn't help anyone) and I may have found a workaround (this might may useful).
    As previously described, the problem seems to come from the _getBrowserAndWindow function in xpcom/proxy.js.
    I didn't investigate if this is a Firefox/Gecko issue or a Zotero one (or a bit of both) but the problem is that for some reason windowMediator.getZOrderDOMWindowEnumerator("navigator:browser", true) may return a empty enumerator. The consequence is that the "browser" variable is not initialized because the while loop in which it should be updated is never run. Hence the resulting javascript error.
    I managed to get the proxy stuff working by using the getMostRecentWindow method instead of getZOrderDOMWindowEnumerator, leading to the following modified code:

    function _getBrowserAndWindow(notificationCallbacks) {
    try {
    var pageDOMDocument = notificationCallbacks.getInterface(Components.interfaces.nsIDOMWindow).top.document;
    if(!pageDOMDocument) return false;
    var window = windowMediator.getMostRecentWindow("navigator:browser");
    browser = window.gBrowser.getBrowserForDocument(pageDOMDocument);
    } catch(e) {}
    if (typeof(browser) == "undefined") /* should never be true */
    alert("No browser! (Zotero's proxy.js has a boo boo)");
    return [browser, window];
    }

    The way the browser is retrieved is slightly different but the behavior should be quite similar.
    I only tested this code with Firefox 4.0.1 and Zotero 2.1.6 on Ubuntu 10.10 (64 bits). I have no idea if this code would work anywhere else! You have been warned...

    Hope this helps

    Edit:
    I made the modified proxy.js accessible here: http://pastebin.com/mTuhSSAf
    the "diff" version here: http://pastebin.com/wJQr0h4b
    and the modified zotero.jar file here: http://www.mediafire.com/?sh41bp2zj9cc7af
  • ticket created:
    https://www.zotero.org/trac/ticket/1819
  • @sbuchoux: Well done. Have tried this out in the multilingual branch, and with a couple of fixes for the same issue (?) in other locations, proxy redirection and captures via proxy seem to be working well there under Linux.
  • I've committed a somewhat simpler fix for this in r9272 which appears to work just as well. The problem will be resolved in the next Zotero release.
  • Yes, it works again with the latest release. Many thanks!!!
  • Hello,

    I have a similar problem in that I go a link for a paper, zotero does some redirection which then eliminates the paper - blank screen. I have read the discussion here and I think there is a fix, but not sure how to implement it?
    firefox version 3.6 and zotero version 2.1.8

    thanks in advance for help,
    Frances
  • fskinner0, this is a different issue. You can delete the proxy configuration or disable redirection entirely in the Proxies section of the Zotero preferences.

    Closing this thread, since the issue it refers to is fixed.
This discussion has been closed.