AMS MathSciNet and Euclid translators not working

2»
  • I thought the Crome connector came with its own translators, it doesn't download the translators from Zotero right?
    No, it gets them from Standalone if it's open.

    The error is "SyntaxError: Unexpected identifier", which is a JS parse error. So somehow that custom version of the translator is invalid on the Chrome side.

    The debug output also seems to show a translator length of 244926 chars, which is nearly twice the size of the current one. So it's also possible that there's some request size limit between Chrome and Standalone and it's truncating the translator (though I don't think there'd be an "Unexpected identifier" error in that case).
  • 0.0.49 has its own guid, so it ought to be clearer which translator is bombing out, and where.
    No, it's clear from the output we have. It's BBT's custom BibTeX translator that's showing as invalid.

    mmwood: I would uninstall BBT, reset your Zotero translators, make sure the problem has gone away, and only then install the latest version of BBT.
  • edited January 6, 2014
    That's definately the BBT translator. Any idea how I can cause wireshark to pick up the traffic? Or can I send it through Fiddler? Does "update translators" download the translators to chrome somewhere?
  • to update the translators in Chrome, make sure they're up to date in Zotero, then quit Zotero and Chrome and restart first Zotero, then Chrome.
  • But does Chrome store them somewhere where I can view them, to see ig it's being truncated?
  • I don't think so, but it's just an HTTP call to 127.0.0.1, so you can probably just watch traffic on the loopback interface. Otherwise you'd have to modify the Chrome extension's source code not to truncate large strings in debug output.
  • Wireshark for windows can't capture the loopback interface.
  • You can use http://www.netresec.com/?page=RawCap to capture on loopback on Windows.

    You can also see what Chrome gets by executing the following in the Javascript Console on the Zotero background page var a; Zotero.Translators.get('9cb70025-a888-4a29-a210-93ec52da40d4', function(trans) { a = trans; } )Then inspecting the "a" variable. The translator ID is for BibTeX
  • I tried RawCap but it didn't capture any http traffic. I tried the javascript trick (assuming the Zotero background page is the options pane for the Zotero extension), and JSON.stringify(a) shows

    "{"translatorID":"b6e39b57-8942-4d11-8259-342c46ce395f","translatorType":3,"label":"BibLaTeX","creator":"Simon Kornblith, Richard Karnesky, Anders Johansson and Emiliano Heyns","target":"bib","priority":50,"lastUpdated":"2013-07-01 14:13","browserSupport":"g","runMode":2}"

    nothing more.
  • edited January 6, 2014
    My mistake; the BBT BibLaTex translator comes across untruncated; the others are export-only translators.
  • When I execute

    var a; Zotero.Translators.get('9cb70025-a888-4a29-a210-93ec52da40d4', function(trans) { a = trans; } ); a;

    twice, I get 'undefined' the first time, and 'Object {translatorID: "9cb70025-a888-4a29-a210-93ec52da40d4", translatorType: 3, label: "BibTeX", creator: "Simon Kornblith, Richard Karnesky and Emiliano heyns", target: "bib"…}' the second time; I don't know why this happens, but it does explain the "Cannot read property 'id' of undefined" error.

    Still working on the for...of code removal, but the above is not caused by BBT... I think.
  • I've removed the 'for...of' statements, but I still get

    SyntaxError: Unexpected identifier at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/inject/translate_inject.js:50 zotero.js:144

    But no detail on where it actually bombs out. How can I delve deeper into this?
  • edited January 7, 2014
    I've removed the 'for...of' statements, but I still get

    SyntaxError: Unexpected identifier at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/inject/translate_inject.js:50 zotero.js:144
    That translator is littered with for...of statements. If you search for [space]of[space] you'll find all of them.
    When I execute

    var a; Zotero.Translators.get('9cb70025-a888-4a29-a210-93ec52da40d4', function(trans) { a = trans; } ); a;

    twice, I get 'undefined' the first time, and 'Object {translatorID: "9cb70025-a888-4a29-a210-93ec52da40d4", translatorType: 3, label: "BibTeX", creator: "Simon Kornblith, Richard Karnesky and Emiliano heyns", target: "bib"…}' the second time;
    The call to Zotero.Translators.get is asynchronous, so checking a immediately would not work. You have to wait a bit and then check it.
    it does explain the "Cannot read property 'id' of undefined" error.
    That's unrelated as explained above
  • Thank you all so much for your help. When I uninstalled BBT and reset translators, import from AMS MathSciNet worked. Then with the newest version of BBT installed import still works.
  • There are no more for...of statements in the translator; I just published 0.0.50 which includes the cleaned translator. @mmwood, could you please verify 0.0.50 works for you and close the github issue if it does?
  • (the github issue is mine - I don't think mmwood can close it - just confirm this is working, and either emiliano or me can close the ticket).
  • Oh, hey, I see that now. Thanks for opening the issue BTW -- I really appreciate the feedback!
  • Any updates on this? I am still having problems with http://projecteuclid.org/.
Sign In or Register to comment.