For the up to date guide on the forum, click here.
Some Windows users are encountering frequent crashes with the Anytype app, preventing them from accessing their accounts. This issue commonly occurs after unexpected power loss or improper shutdown, leading to database corruption.
The bug will be automatically fixed in the upcoming Anytype update. However, for those who want to address it in the meantime, you can use this tool.
Instructions to fix the corrupted db:
For Windows Users
Step 1: Downloading Badger
Download for Windows: Look for the Badger release suitable for Windows.
Step 2: Accessing PowerShell
Open PowerShell: Press Windows Key + X and select “Windows PowerShell” from the menu. Alternatively, you can search for “PowerShell” in the Start menu.
Step 3: Running Badger
Navigate to the Download Folder and open the badger. This will open PowerShell.
In the PowerShell window, use the cd
command to change the directory to where you downloaded badger.exe. For example, if it’s in your Downloads folder, you would type cd Downloads.
Run Badger: Execute the following command:
.\badger.exe --dir <spacestore_db_path> fix
Replace “spacestore_db_path” with the actual path to your “Spacestore database”
Finding the AppData for the “anytype” App:
The “anytype” app (being an Electron app), stores its data in the AppData folder on your Windows system. To find this:
Open File Explorer: Press Windows Key + E to open the File Explorer.
Access AppData: Type %AppData% in the address bar of the File Explorer and press Enter. This will take you to the C:\Users[YourUsername]\AppData\Roaming folder.
Locate Anytype Folder: In the Roaming folder, look for a folder named “Anytype”. Inside it you should find “data/” folder. (If you use beta channel it will be “beta/data/”)
Within this folder you will find “spacestore” folder. You need to copy (ctrl+c) it’s path and put it to the command line mentioned above, replacing “spacestore_db_path”.
The command line it should be something like this:
.\badger.exe --dir C:\Users\Username1\AppData\Roaming\anytype\data\accountId\spacestore
This tool creates the backup of the corrupted db before trying to fix it. Backup will be stored at “spacestore_corrupted_backup_”
When/Who Should Use This Tool:
After Windows BSOD or Power Loss:
Use this tool when encountering a Blue Screen of Death (BSOD), loss of access after power outage or improper shutdown on a Windows system.
Specifically, if the application is not opening and displays an error.
Users in Local-Only Mode with DB Error:
Users operating in a local-only mode and encounter a panic error
Users Recovering from Nodes with Data Loss:
If users have attempted to recover from nodes, especially with an empty data folder or on another device, and still notice a loss of data (e.g., missing objects or changes)
Precaution: Before Using the Tool: Remove the “data” Folder
The root of the problem may be located in this folder and can be found in the following paths:
File > Show work directory or (C:\Users\Username1\AppData\Roaming\Anytype
)
Anytype/data/<accountID>
for standard release version
Anytype/beta/data/<accountID>
folder for Pre-release version
Anytype/alpha/data/<accountID>
folder for Alpha (internal) version