Zotero won't open properly - Green Bar, 'Upgrading Database'

Hi all,

Error report ID: 1151340090

Just upgraded to 5.07 in Standalone and now have a strange problem where when I open Zotero, there is just a green bar, none of my library in the background, and the program just hangs. I can access the toolbar up the top (and was able to generate the report), but otherwise don't have any functionality.

I've tried checking for updates again, thinking something might have gone wrong during the update, but Zotero says its up to date. When I had first updated, a similar green bar box had 'upgrading database' in its title (this text doesn't show anymore) -- I restarted Zotero after this hung for about five minutes and seemed frozen. I've restarted my computer a few times as well.

Many thanks for any ideas on how to fix this!

Martin
«1
  • Update, the text 'upgrading database' has reappeared - I'm going to leave it run for a while (has been going for about 15 minutes now) and see what happens.
  • Do you have Zotero for Firefox (not the new Zotero Connector for Firefox) installed? If so, try closing Firefox. (It shouldn't hang like that, but it looks like you're getting an error that your database is in use, and having Zotero for Firefox still installed would be one way that could happen.)
  • Thanks very much -- as far as I can tell I don't have Zotero for Firefox (or the connector) installed; I just use Standalone, and Zotero doesn't appear to be in my firefox plugins. I do use firefox and have closed it now, just in case.
  • It looks like this might be on a network drive? If so, that could be the problem — network drives can break Zotero's database access. There are some errors in your error report that suggest that Zotero couldn't open the database connection, but if the "Upgrading database" message appeared it's also possible that the upgrade is just taking much longer because of the network drive, so you could try letting it go.

    If you look in the Zotero data directory, you might be able to see if the zotero.sqlite or zotero.sqlite-journal (if it exists) files are changing size.
  • Yep Standalone is installed on an external hard drive; the SQLite-journal file has been recently modified, and the main SQLite filed has become about 800mb larger than the backup I saved a few hours ago when the problem started. Might be best to just keep letting it run for a while?
  • 800MB? What was it to begin with?
  • 1.2gb, now at 2gb
  • Yikes, that's extremely large. This is, I assume, for a very large library with many indexed full-text items? Is the upgrade still going?
  • Haha - it certainly is, about 20k items, lots of far too detailed pdf scans. The upgrade still seems to be chugging away -- the sqlite-journal file is now at 774mb so it's building at about 10 or so mb a minute-- will just let it run and report back when it finishes.
  • OK just got this error message, and options to Check for Update or Quit:

    Database upgrade error

    Error: Transaction timeout, most likely caused by unresolved pending work.
    ConnectionData.prototype<.executeTransaction/promise</timeoutPromise</<@resource://gre/modules/Sqlite.jsm:641:33
    setTimeout_timer@resource://gre/modules/Timer.jsm:30:5
    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:///J:/5%20Other/Programs/Zotero%20Standalone/components/zotero-service.js:347:4
    XPCOMUtils__getFactory/factory.createInstance@resource://gre/modules/XPCOMUtils.jsm:387:19
    @chrome://zotero/content/include.js:4:14
  • edited August 4, 2017
    If you have some time to let that run again, I'd be interested in seeing real-time debug output for the end of the upgrade where it fails.

    But the easiest fix for you is probably to install the 5.0 Beta, move your Zotero data directory to C:\Users\:username:\Zotero, and then try the start Zotero again. It should (thanks to a change in the beta) confirm that you want to use the default Zotero directory instead of your configured data directory and then try the upgrade again, which I suspect will go much quicker on the local hard drive. You could then move it back to the external drive after the upgrade.

    (If you don't have time to generate debug output for another upgrade run, don't worry about it.)
  • Many thanks again for all your help - am running it again and will do the real-time debug output if it fails again; and yep I suspect the fresh install is going to be the best move. Thanks again!!
  • edited August 4, 2017
    Just to clarify, I wasn't suggesting a fresh install — just doing the upgrade with your data directory on your local hard drive, which is likely a lot faster than the external drive. (The beta install is only necessary because we made a change in it that has it automatically check C:\Users\:username:\Zotero if the configured directory is missing, which it will be once you move it. Otherwise you'd have to edit the preferences file manually or reinstall 4.0 and change the setting there and then re-upgrade.)
  • For what it's worth, my database of just under 14000 items took one or two hours (can't remember precisely) to upgrade, on a competent-but-not-super-powerful Windows machine. I did get an error part way through, but upon restarting Zotero it completed the conversion and works now.
  • Many thanks to you both - Ive attempted the upgrade on my hard-drive, after moving the data directory. I think I did this as you suggested Dan - same error message popped up almost immediately this time. Then upgraded to the latest version, then got this. Getting worried I've corrupted my sqlite file...

    There was an error starting Zotero.

    Error: Could not open connection to C:\Program Files (x86)\Zotero\zotero.sqlite: 2152857619
    openConnection/</<@resource://gre/modules/Sqlite.jsm:945:16
    From previous event:
    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
  • I've also now tried downgrading to Zotero 4 as per instructions in another thread, with a fresh install, and that won't open at all giving me an error message about not being able to open the zotero data directory and not having permissions.
  • C:\Program Files (x86)\Zotero isn't right, and security software could easily be preventing access to there. You want to move it to C:\Users\:username:\Zotero.
  • Yep I'd realised that -- I've tried to allow permissions to that folder, and also have the Users\Username\Zotero folder with the sqlite file in it too, but that doesn't seem to help.

    Sorry I should also have mentioned that while I can move most of the data directory to my harddisk, I can't move the storage folder there too because it's too big for the disk. I'm guessing this could have caused the earlier problem.
  • Are you saying you're getting the same error for the C:\Users\Username\Zotero location? Can I see that? (You can x out the username.)
  • So I'm now getting the 'The Zotero database cannot be opened. Make sure you have read and write permissions for all files in the Zotero data directory.' error only. I've put the contents of the old data directory, besides the storage folder, into the C:\Users\Username\Zotero location -- and have tried this with a few versions of sqlite: one from 3 August (prior to the upgrade) and one from 4 August (day of the upgrade - the one that was processing yesterday)
  • OK, so something on your system is interfering with Zotero's ability to open the database or access that directory — likely either file permissions or security software.
  • Yes, have been trying to fix this - as far as I can tell, all the files are write-permitted, there's no administrator privilege, and can't think of any security software that would stop it. Will keep trying. It's a bit odd that it was a different error just a few hours back. I wonder if, despite the beta install, it's still looking to Program Files x86 rather than the user folder.
  • Yes it seems that the beta install thought the data directory was in the Program Files x86\Zotero, I double checked and allowed file permissions for that folder, and it's now 'upgrading the database' so probably will give me a new error message soon.
  • edited August 5, 2017
    To be clear, the beta uses "Zotero" in your home directory only when there's not a data directory at the configured location.
  • Ah ok that's handy. So my current approach has been to try to get it to do the database upgrade on my external harddrive data directory and just let it run, with a 3 August version of sqlite (again, prior to when I downloaded the update on 4 August). I can open Zotero, and it begins the database upgrade, but the problem now is that the data directory is selected as 'custom', but going to C:\Program Files (x86)\Zotero -- when I select the external drive, it goes to the usual restart thing, but after doing that, has not actually changed data directories, and is back at the Program Files one.

    Sorry I realise that many of those steps may not be the best way to resolve this problem, and the only reason I haven't gone with your earlier suggestion of doing this on the main drive is again lack of space to move to the whole data directory with storage. I'm really just pretty confused about all of it, so was hoping that at least if I get the 'database upgrade' happening on my normal data directory it might, like amc's experience, eventually work after a few hours and possibly a few errors. Thanks once again.
  • You don't need 'storage' in place to do the upgrade, so I would try to get it to go through in the default location.
  • Ah ok excellent - must have been something else that screwed it up that time. I've looked at the 'moving the data directory' info, but just to double check, should I just put everything from the old directory -- all files, sub-folders (except 'storage') in the 'new' data directory?
  • Yes. And then as long as there's not a data directory at the configured location, Zotero will ask you if you want to use the default location instead. (We've actually just released 5.0.8 with that feature, so you can revert to that from the beta if you want.)
  • To clarify, this is without going to the preferences at all — that's the point of that feature, to allow you to recover from an inaccessible data directory. Not sure if that's the case for you. It sounds like you have been adjusting the preferences, but it's not clear to me if you've been doing that while the upgrade was running, when you got an error, or something else.
  • Great thanks - am doing that now and seems to be running ok on the main disk, sqlite/sqlite-journal are recently modified and sqlite journal is getting gradually larger in size. Had attempted to adjust it via the preferences while the upgrade was running (I couldn't access it when the error form or permissions denied showed up) - but this didn't work; after restarting the data directory would be back to whatever it was: ended up having to rename the old external zotero directory so that the 'not found' dialogue came up.
Sign In or Register to comment.