mblode / vscode-zotero

Zotero Better Bibtex citations for VS Code
https://marketplace.visualstudio.com/items?itemName=mblode.zotero
MIT License
77 stars 10 forks source link

Zotero Citations: could not connect to... #2

Closed atanasj closed 4 years ago

atanasj commented 4 years ago

Hi,

I am getting the below error:

image

Any idea why this might be happening? Zotero is definitely running...

Thanks in advance for your help.

mblode commented 4 years ago

I think following the "Referencing" section of this blog post may help you get the Zotero picker installed 👍

https://raphaelkabo.com/blog/posts/markdown-to-word/#referencing

atanasj commented 4 years ago

Thanks for that. I followed the instructions, however this still doesn't work. When I try and the extension I am still getting the same error. Additionally, whey I try and run the services as set out in the link you provided, the error I get is com.automator.runner.xpc is not allowed to send keystrokes. This is happening in other apps as well, however in vscode I get the electron pop-up window too. I have a workflow that I have been using for a ages with Alfred.app where I run and .applescript and paste in the better-bibtex key from Zotero, which worked similarly to your extension. I think the conflict between .applescript and vscode is a known issue (see here). See below for the pop-up messages I am getting.

image

Here you can see the error message with both vscode and Zotero open when I try and run the extension.

image

Any ideas what I can do to resolve this issues?

| ~ @ uroboros (atanas)
| => sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.6
BuildVersion:   18G84
________________________________________________________________________________
| ~ @ uroboros (atanas)
| => code --version
1.36.1
2213894ea0415ee8c85c5eea0d0ff81ecc191529
x64
mblode commented 4 years ago

I think I've discovered the issue: Note that as of Zotero 5.0.71, access to this URL will no longer work from the browser for security reasons; curl and other programmatic access will work if you make sure you send a User-Agent header (curl does so by default).

I'm going to work on a fix now 👍

atanasj commented 4 years ago

Awesome, thanks! I look forward to the fix!

mblode commented 4 years ago

The issue has been fixed by using the latest Zotero beta: https://www.zotero.org/support/dev_builds 🎉

atanasj commented 4 years ago

Great, that works now, thanks! However, after inserting the citation the focus changes to Zotero. Is that the expected behaviour? It would be great if the focus could return back to vscode.