Cannot open existing or new vaults - JavaScript error in main process

Steps to reproduce

  1. Launch Obsidian.
  2. Select any existing vault and click Open.
  3. The loading screen appears briefly, then immediately exits back to the welcome screen.
  4. The same behavior occurs when creating a brand new vault and attempting to open it.

Error message

A JavaScript error occurred in the main process

Uncaught Exception:
TypeError: Cannot read properties of undefined (reading 'origin')
at Function.<anonymous> (/Users/evelynwu/Library/Application Support/obsidian/obsidian-1.12.7.asar/main.js:71:1101)

Environment

Unfortunately, I cannot access Show debug info because I am unable to enter any vault or reach the main Obsidian interface.


Additional information

  • The issue started suddenly. Obsidian had been working normally before this.
  • It affects all vaults, including newly created ones.
  • I found a forum post describing what appeared to be a similar issue:
    Constant Javascript Errors v1.5 / net::ERR_CONTENT_DECODING_FAILED - #11 by kr0n
  • I tried the suggested workaround of deleting/renaming the cache directory so Obsidian would recreate it, but it did not resolve the problem.
  • Since no vault can be opened, I cannot disable plugins, switch themes, or perform any troubleshooting from within Obsidian.

Question

  • I have not tried uninstalling and reinstalling Obsidian yet because I’m worried about losing my installed plugins and their configurations.
  • Over time I installed many community plugins, and I no longer remember all of their names. Before attempting a reinstall, I’d like to know whether there is a way to preserve or recover the installed plugins and their settings, even if Obsidian itself needs to be reinstalled.
  • If there are any files or directories that I should back up before reinstalling, I’d appreciate any guidance.

Downloading and reinstalling is the first thing you should be trying.

If you are worried about losing plugins or configurations, make a backup. Copy the entire vault somewhere, or make a .zip file of the entire vault. Ideally you should already be making safe backups somewhere.

Please do make a backup to be safe. But then understand that reinstalling does not delete any notes or configurations. Plugins and configurations are stored in the hidden .obsidian folder inside the vault folder.

It’s possible some old plugins might not be compatible anymore.