crud, sorry, I unlinked the references and started again.Don't think this is the first time this has happened to me, though. Will see if I can reproduce it later, and if I do, will send a copy through.

I've run into "CSL error this.registry.citationreg.citationById[c[0]] is undefined" as well. It was while inserting a citation of a previously cited source into a document with over 100 references. It just came up with the error message. Closing and reopening the document solved it. Before doing that I deleted the reference list and tried re-creating the list. That also caused the error.

It's not yet clear what triggers this. I saw it myself a few days ago, while working with a student over a thesis document. I was happy to see it, because I thought I had steps to reproduce -- but going through the same steps later didn't trigger it. It will eventually be squashed, but we'll need a debug log that covers the triggering of the fault. I'm really curious to know how this happens in a document.

How large was the document, citation-wise? In our case, on a Mac, there were about 150 citations, and my unsuccessful after-trials were in a small document. I'm wondering if it is some async thing that only kicks in, erratically, when there is a significant delay.

Had another "this.registry.citationreg.citationById[c[0]] is undefined" error in this document today, again while working in split view mode. This time I had copied a zotero citation to another location and was adding a second source to the citation.

This can happen when a citation is opened for editing or insertion, in an open document, immediately after restarting Zotero, if the edit/insert is then cancelled. The next operation will throw this error, and restarting Zotero and refreshing citations will fix things. The cause has been identified by the developers, and the latest beta release has a fix for it that will appear in 5.0.66.