Zotero connector function broken if new Chrome on-click permission set

Chrome (and probably the new Edgium) has an option to allow extensions access to web page data "on-click", i.e. requiring an explicit click on the extension's button and reloading the page.

Zotero connector (5.0.68) works fine if access to all sites is allowed in the extensions settings, however, it's unable to connect to the Zotero desktop if it's enabled on-click. The icon also doesn't change to reflect that a specific filter is available for the website (e.g. the icon should change when an article on ScienceDirect is viewed).

I was also unable to send a bug report of the JS errors that appeared in the options; this in itself may be another bug.

Error log:

[JavaScript Error: "Error: Code could not be retrieved for b6d0a7a-d076-48ae-b2f0-b6de28b194e
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for e7e01cac-1e37-4da6-b078-a0e8343b0e98
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 05d07af9-105a-4572-99f6-a8e231c0daef
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 951c027d-74ac-47d4-a107-9c3069ab7b48
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for c159dcfe-8a53-4301-a499-30f6549c340d
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6
at async Promise.all (index 4)
at async Object.getWebTranslatorsForLocation (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translators.js:223:3)"]

[JavaScript Error: "Error: Code could not be retrieved for b6d0a7a-d076-48ae-b2f0-b6de28b194e
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 05d07af9-105a-4572-99f6-a8e231c0daef
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for e7e01cac-1e37-4da6-b078-a0e8343b0e98
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for c159dcfe-8a53-4301-a499-30f6549c340d
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 951c027d-74ac-47d4-a107-9c3069ab7b48
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for b6d0a7a-d076-48ae-b2f0-b6de28b194e
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for e7e01cac-1e37-4da6-b078-a0e8343b0e98
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 05d07af9-105a-4572-99f6-a8e231c0daef
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 951c027d-74ac-47d4-a107-9c3069ab7b48
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for c159dcfe-8a53-4301-a499-30f6549c340d
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6
at async Promise.all (index 4)
at async Object.getWebTranslatorsForLocation (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translators.js:223:3)"]

[JavaScript Error: "Error: Code could not be retrieved for b6d0a7a-d076-48ae-b2f0-b6de28b194e
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for e7e01cac-1e37-4da6-b078-a0e8343b0e98
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 05d07af9-105a-4572-99f6-a8e231c0daef
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for c159dcfe-8a53-4301-a499-30f6549c340d
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]

[JavaScript Error: "Error: Code could not be retrieved for 951c027d-74ac-47d4-a107-9c3069ab7b48
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]
  • edited July 14, 2020
    Where is this feature located? Is there any documentation regarding this?
    Zotero connector (5.0.68) works fine if access to all sites is allowed in the extensions settings, however, it's unable to connect to the Zotero desktop if it's enabled on-click. The icon also doesn't change to reflect that a specific filter is available for the website (e.g. the icon should change when an article on ScienceDirect is viewed).
    The icon won't change as you visit websites if you have this mode enabled, since the Connector runs some JS on every page to determine whether it's able to retrieve rich metadata or not and if that's disabled there's no way to perform this detection before the button is clicked. Still, we should look into making sure this works.
  • Thank you for your reply.

    > Where is this feature located? Is there any documentation regarding this?

    In Chrome extensions, the manage extension interface provides 3 options for allowing access to website data: all, specific sites, and on-click. At least on Windows 10 it does. The new edgium has the same options, I believe. Unfortunately, the on-click setting seems to break a few things in connector. Sorry, I don't know if there are docs about this, such as a developer's manual or alike.

    > [...] if that's disabled there's no way to perform this detection before the button is clicked.

    I meant that the icon doesn't change even after allowing the extension by clicking on it and reloading the page.
  • I can reproduce this, though given that it actually reloads the page with the new temporary permissions, it seems odd that it doesn't behave exactly the same way as with the default setting. But we'll look into it.
Sign In or Register to comment.