Error 'setState'

edited October 27, 2021
I have the Zotero beta on 2 Windows10 computers. On both computers my Zotero storage folder is in the standard location and I'm using Zotero's sorting system. However, there's a symbolic link (mklink /d ...) that connects it to another folder in my 3rd party Drive service (e.g. Google Drive).

I've managed to import all my Mendeley files and annotations but now there's something wrong when I open the files with the built-in reader of the beta.

I get the following error:
Error 'setState'
PDF.js v2.8.151 (build: ead34cdca)
Message:


How can I solve this issue?

P.S. I do have Zotfile and I've used it to rename the pdf attachments only.
  • The method I followed is mentioned here:

    https://www.zotero.org/support/sync#alternative_syncing_solutions

    "Alternatively, you can use a symlink to sync only the storage directory from your Zotero data directory using the external sync service. This will sync your attachment files without touching the main Zotero SQLite database. This is an advanced technique, and if you don't fully understand how to create symlinks and how they interact with your cloud storage service, you should not use it."

    That's what I did.
    I have to add that the "Sync automatically" option was not on. Due to this thing I received some popup messages on my second computer about the remote copy being different from the local one but nothing more than that.
  • edited October 27, 2021
    My report ID is 105041774
  • Can you provide a Debug ID (different from a Report ID) for triggering this error?
  • edited October 28, 2021
    @dstillman D2019105031 I tried to reproduce the problem by just opening Zotero on my second computer while I was operating the first
  • Did an error actually occur while you were generating that output? I don't see any errors logged.

    Note that you should disable all third-party plugins when testing things like this.
  • @dstillman An error actually occurred, i.e. the one mentioned in the first post. I don't know why it doesn't appear, nevertheless I recently restarted Zotero with no third-party plugin and I'll see if something else comes up.

    I don't know how the error is triggered and I didn't notice any clear negative effect as I got the error message. It seems more like a warning.
  • edited November 2, 2021
    @dstillman I got again the SetState error with all 3rd party plugin disabled after I restarted Zotero with logging enabled, see debug ID: D1206340983

    In the output I see something like: [JavaScript Error: "Permission denied to access property "parentElement"" {file: "resource://zotero/pdf-reader/annotator.js" line: 2298}] repeated x20 times (more or less)

    Image with Zotero settings available here: https://we.tl/t-l8yNaFgqrG
  • OK, thanks. @martynas_b will need to take a look.
  • @fgr1 Unfortunately Zotero can't log the actual error that caused the issue (we'll improve that in the next update). Zotero tries to write to <Zotero data dir>\storage\<item key>\.zotero-pdf-state file and fails. There are basically two reasons for that:

    1) Another software (i.e. antivirus) is constantly accessing the file and shortly locking it.
    2) You don't have write permissions to the file (or folder).

    If that won't help you to figure out what is blocking writes to the file, you will need to wait for the next update until we see the specific error.

  • @martynas_b could the symbolic link cause any trouble in that regard? I have a symbolic link from \storage\ to a dedicated OneDrive folder
  • The issue is still there. The zotero data folder is still linked to the relative OneDrive folder and this error message pops up regularly. The frequent popup message itself seems worse than the actual issue, since the content of the .zotero-pdf-state doesn't seem extremely important.

    My guess is: the .zotero-pdf-state is periodically updated to the OneDrive servers and that's when I get the popup message. Either removing the popup or actually having a solution for the issue would be the same from my point of view.
  • @fgr1 I'm having exactly the same problem as you do while putting the zotero data folder in OneDrive. The warning message is same except for the report ID. And I'm having all the third-party plugins on.

    Hope you have figured out the reason? I'm kinda worried that: would the error have any influence on my notes and marks? Will I lose my notes?
  • If you have your data folder in OneDrive, that's not the same -- symlinking the _storage_ folder to OneDrive is OK. Putting the data folder in OneDrive will cause all sorts of issues and you absolutely shouldn't do it.
Sign In or Register to comment.