Word for Mac error: NSPasteboardItem
dstillman
Zotero Team
This discussion was created from comments split from: Zotero on Word on Mac; Update error every few citations.
Upgrade Storage
"Zotero experienced an error updating your document. Would you like to view troubleshooting instructions?"
I managed to grab a couple logs while this happened. Unfortunately, no Debug ID. With ChatGPT's help looking at the logs, I narrowed down the issue to something with the pasteboard.
If I get the warning popup:
1. Click it away
2. Delete the stalled "{Citation}" text in Word
3. Try again with the Zotero plugin: craft/edit the selected references, but before actually trying to add them to Word (i.e., clicking Enter or the right-arrow in the plugin window)...
4. Run "killall pboard" in the Terminal (or see below for a Shortcut solution)
5. Now, click Enter or the right-arrow in the Zotero plugin window and the citation should work as intended.
To make this easier for myself, I created a Shortcut with a global hotkey. This way, in step 4, I can hit my hotkey, wait for the notification, and they proceed to step 5. See the screenshot here for the recipe.
https://s3.amazonaws.com/zotero.org/images/forums/u5349858/n48bvcnzgtrhkvtmp2or.png
For those interested, here's the quick summary of ChatGPT's solution:
This line, near the top of your log:
[JavaScript Error: "Calling -setData:forType: on NSPasteboardItem with nil `data` for type public.url."
{file: "resource://zotero-macword-integration/messagingGeneric.js" line: 216}]
means Zotero’s Word plugin tried to send data to the macOS pasteboard, but the system clipboard daemon (pboard) handed back nil — effectively “empty”. When you ran killall pboard, macOS restarted that daemon, clearing the stale state and allowing Zotero to continue without errors.
I have NOT tried the Zotero 8 beta, but it would be great if someone over at "Zotero HQ" could look into this.
Note that you can always share a Report ID, and you can share a Debug ID if you can reproduce the problem. But if you're getting this error: This is generally caused by a clipboard manager or some other tool that interacts with the clipboard (though not all clipboard managers cause it). If you're running such a tool, try disabling it.
If you're not seeing that error, please start a new thread.