Startup Error: "SyntaxError: unterminated string literal"

After downloading and installing Zotero 5.0 in my iMac running OS 10.12.6, I repeatedly receive the error message "SyntaxError: unterminated string literal." This message is accompanied by two options: "Quit" or "Check for Updates." Choosing "Check for Updates" returns a message saying that there are no updates, and after clicking OK, Zotero quits automatically. Choosing "Quit" rather than "Check for Updates" also immediately quits Zotero.

This continues to occur after restarting the machine, and after uninstalling and reinstalling Zotero 5.0 multiple times.

In trying to start Zotero via the command line in Terminal, "/Applications/ -ZoteroDebug" produces the same Error message box in front of a blank and grayed-out "Debug Output" window.

Using "/Applications/ -jsconsole" in Terminal results in:

Error: unterminated string literal
Source file: chrome://zotero/content/xpcom/dataDirectory.js
Line 4289
user_pref ( "extensions.personas.current", " { \"id\":\"44423\",\"name\":\Yoga Jou...

This is as much of the error message that can be seen, and the window cannot be expanded because it is behind the typical "unterminated string literal" error box.

In Terminal, the command also produces "JavaScript warning: resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/util.js, line 201: unreachable code after return statement
SyntaxError: unterminated string literal

1505402647200 addons.update-checker WARN Update manifest for did not contain an updates property"
  • Thanks — there've been a few reports of this, but yours helped us to fix it. This was being caused by a corrupt Firefox preferences file when Zotero was trying to migrate preferences from Zotero for Firefox. It should be fixed in the latest 5.0 Beta. After upgrading with the beta, you can switch back to 5.0.18.
  • Installing the 5.0 Beta and then switching back to 5.0.18 solved the problem, thank you very much!
  • I experienced something very similar. Running -jsconsole debug produced a similar report but in the browser_homepage (I think) user_pref. I speculate that the issue was caused by my having migrated from Firefox to Chrome in the past. I resolved the startup error by re-installing Firefox and the Firefox Zotero extension. After doing this, Zotero standalone started as usual.
Sign In or Register to comment.