R Markdown Visual Editor lost connection to .bib file

I am using the R Markdown visual editor functionality in the preview release of R Studio Version 1.4.869 on Windows 10. For the past week or two I've been working on a manuscript and the new citation features have been working great, even if they're a little slow during the search sometimes. I've been able to add citations from DOI, PubMed and insert them directly with markdown syntax.

Today however, I went to work on this manuscript and was trying to add a citation to an article I've previously cited and it appears R Studio has somehow lost the connection to my .bib file that I had been filling up. The .bib file is in the same folder as my .Rmd file and still has all my citations but when I click "Insert -> Citation" there are no entries and when I try to add it with markdown syntax [@cite] I don't get any autofill options.

I tried adding a new citation just now and I was able to look one up and add it. It shows up in my references.bib file. But when I go back into the Insert -> Citation window or try to add with [@author] there are no new options.

Any suggestions on how to fix this? Please let me know if I should provide other information.

RStudio dailies move quickly with bug fix. Can you update to the latest daily and see if you are still getting an issue ? Thank you

I updated to daily Version 1.4.954 for Rstudio and the problem is still persisting.

I may have found the issue. The last four citations I imported either from DOI, CrossRef, or PubMed imported just as @misc{nameyear}. I tried knitting the document and got the error

(line 661, column 1):
unexpected "}"
expecting space or ","
Error: pandoc document conversion failed with error 4

I went in and removed those four citations and restarted R and the citation functionality was restored. I say that I may have found it, because I added the potentially offending citations back to the references.bib file, tried to knit, failed to knit, and then tried manually inserting citations and the citation functionality was still working. I can't identify anything else I did during this process that would have fixed the issue, or what I did to break it in the first place.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.