Zotero Standalone 5.0 opens but no database connection

edited July 31, 2017
Newly installed Zotero Standalone 5.0 opens but there is no database connection. It does not generate an error number but instead gives the error message below.

What do I do next?
Julia Thornton


There was an error starting Zotero.

Error: Could not open connection to D:\Firefox profile D 13022015\zotero\zotero.sqlite: 2152857621
openConnection/</<@resource://gre/modules/Sqlite.jsm:945:16
From previous event:
captureStackTrace@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/debuggability.js:826:23
CapturedTrace@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/debuggability.js:718:5
longStackTracesCaptureStackTrace@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/debuggability.js:397:19
module.exports/Promise.prototype._then@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/promise.js:232:9
module.exports/Promise.prototype._passThrough@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/finally.js:94:12
module.exports/Promise.prototype.finally@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/finally.js:103:12
PromiseSpawn@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/generators.js:36:25
module.exports/Promise.coroutine/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/generators.js:197:21
ZoteroService@file:///C:/Program%20Files%20(x86)/Zotero/components/zotero-service.js:347:4
XPCOMUtils__getFactory/factory.createInstance@resource://gre/modules/XPCOMUtils.jsm:387:19
@chrome://zotero/content/include.js:4:14
  • It looks like it's not displaying a proper error, which we'll fix, but the error number means that it's an "access denied" error, suggesting that the permissions on those files aren't set properly for your user account (e.g., from copying the files from another computer or account). It could also be due to security software on your system.
  • (I actually get proper error messages for access-denied errors, so security software might be more likely.)
  • It was working ok, but not understanding the upgrades, I first upgraded my Firefox for Windows version which of course changed the way that that works, and seems to have removed the Zotero sqlite file from the Firefox profile.
    Then I was working in Standalone, but it began behaving very slowly as it attempted to sync on about the third sync. So I upgraded to the new 5.0 version which was when the troubles began.
    The Cloud version looks perfectly intact thank goodness because I have no other recent back up. Can I get that to download to the Standalone?
  • The security software is ESET. https://www.eset.com/au/
    How do I check what that is doing?
  • The security software is ESET. https://www.eset.com/au/
    How do I check what that is doing?
    Hard to say — generally you'd need to try disabling it temporarily to see if that fixed the problem.
    Can I get that to download to the Standalone?
    You can, but that shouldn't be necessary.

    D:\Firefox profile D 13022015 is a pretty weird path, but if that's also your active Firefox profile, you may have more luck moving the Zotero data directory out of there and pointing Zotero to it (e.g., to D:\Zotero or C:\Users\<username>\Zotero (the default for 5.0). Point Zotero to the desired directory from the Advanced -> Files and Folders pane of the Zotero preferences, let Zotero close, and then move files from the 'zotero' directory into the new "Zotero" directory. When you start up Zotero again, it should pick up those files.
  • edited July 31, 2017
    Ah, OK, I was able to reproduce this error on Windows by denying read permissions to the Zotero data directory to the current user account. So we'll fix the error message. Still could be either permissions or security software, probably.
  • I think the path is wrong. Its an old Firefox profile, and something unidentified is corrupted in it. But there is no sqlite file in the current new Firefox profile (created about a month ago) because (I assume) I changed it when I installed the new Zotero connector, which I guess overwrote the old sqlite file?

    I think I have no current sqlite file on my computer due to changing both the standalone (which does not work) and the Firefox for Windows version which is now a connector. Should the Standalone have a sqlite file in it?
  • PS The error message closes the Standalone when it is itself closed, and when it is open it does not allow clicking on any of the menus in the Standalone. It just bongs! So no way to actually get to "Preferences".
  • No, the Zotero Connector doesn't touch your data — it's a totally different piece of software that doesn't (and can't) access the disk at all.

    You're saying there are no files in D:\Firefox profile D 13022015\zotero?
  • edited July 31, 2017
    To be clear, nothing about the upgrade would've removed your files. This is an access denied error. Any files that were there before would still be there. If Zotero Standalone 4.0 was working before, Zotero 5.0 should use the same data directory.
  • Yes there are files in there including a sqlite file. Thinking it through I may have moved the Firefox Profile without moving the Zotero profile, so it may be the active one.
    Looking at the "Date Modified" on the folders the most recent is yesterday's date which would be correct. Storage, Styles and Translators all have yesterday's date.
  • edited July 31, 2017
    OK, so, with Zotero closed, I would open your Zotero profile directory, open prefs.js in Notepad, and search for the two lines containing "dataDir" and "useDataDir". Delete both of those lines and resave the file. If you then move that 'zotero' directory to C:\Users\<username>\Zotero (being sure to capitalize it), when you start up Zotero it should pick up those files (and hopefully not give the same error, assuming this is due to security software). If you want to use a different custom directory like D:\Zotero, that's fine — you'll just need to start it up and update the prefs to point there (and then delete the C:\Users\<username>\Zotero directory that it creates to avoid confusion).

    (You might also be able to fix this by just moving the entire "Firefox profile D 13022015" directory out of the way, which might cause Zotero to prompt you what directory to use instead, but this method is a bit more precise. We'll also add a way to reset the data directory more easily at startup for cases like this.)

    If it asks you to sync with an empty database at any point, say no, and fix the data directory location in the preferences.
  • OK. This may take a while....
    I'll get back to you with results either way.
    PS Thanks for many years of help!
  • Whew! Scary but effective. All 5751 items back in view!

    Re instructions above,
    "If you then move that 'zotero' directory to C:\Users\\Zotero (being sure to capitalize it), when you start up Zotero it should pick up those files (and hopefully not give the same error, assuming this is due to security software)"

    I left it at C:\Users\\AppData\Roaming\Zotero\Zotero\Profiles\randomstring which was where it was before I edited it. I assume that's ok because it worked.

    Now my next puzzle is to try to figure out an easy way to add snapshots of web pages to existing Zotero entries in Standalone! However that's on a much lower level of seriousness!

    Thanks again Dan, for some rock solid advice.
  • I left it at C:\Users\\AppData\Roaming\Zotero\Zotero\Profiles\randomstring which was where it was before I edited it. I assume that's ok because it worked.
    That's OK, but Zotero should actually try to automatically migrate that to C:\Users\<username>\Zotero, which is the new default. (You can move it there (again noting the capital letter) without adjusting anything and Zotero should find it.)
    Now my next puzzle is to try to figure out an easy way to add snapshots of web pages to existing Zotero entries in Standalone!
    Not currently possible without saving the page again, dragging the new item's snapshot to the old item, and deleting the new item, but we're working on restoring this functionality.
  • Re Default path. Yes I copied it there, then checked Preferences>Advanced and it had found it.

    Re Snapshots. I will await upgrades with eagerness!

    All questions answered!
    Have a good day, whatever time zone you're in.
  • (I've made some changes so that Zotero handles this case a lot better in the next version — thanks.)
Sign In or Register to comment.