- Home /
FATAL ERROR: trying to write to readonly database
I have a project made in Unity 4.6. I am upgrading it to Unity 5. Everything seemed to be fine at first. But when I delete folders or files that I don't need in the project I get the FATAL ERROR message and I can only press the "QUIT" button.
Once that happened every time I try to reopen the project I get the very same error on opening. It's frustrating. To get rid of it I have to reopen the project in Unity 4.6 (I got 2 versions of Unity running on my computer), downgrade it, and then reopen it in Unity 5 and upgrade it. After that everything seems "fine" again. But once I try and delete a directory\file (Or even change its location) I go through the same vicious cycle.
That's what the Editor.log file look like after the error:
-----CompilerOutput:-stderr---------- -----EndCompilerOutput--------------- - Finished compile Library/ScriptAssemblies/Assembly-UnityScript.dll Assets/Tools/ShowFps.js(34,34): BCE0144: 'UnityEngine.GameObject.guiText' is obsolete. Property guiText has been deprecated. Use GetComponent() instead. (UnityUpgradable)
(Filename: Assets/Tools/ShowFps.js Line: 34) Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.017538 seconds Refresh: trashing asset fa5fac99c2b052b4e89678c65cae204e attempt to write a readonly database
(Filename: C:/buildslave/unity/build/External/sqlite/SQLite.cpp Line: 345)
Help me solve this heartbreaking problem please. Thanks in advance.
You could try to build a new project on Unity 5 and copy the assets you need in it, folder by foler maybe?
Answer by LoungeKatt · Apr 27, 2017 at 07:21 AM
The solution depends on what caused the issue (adding to version control, moving the project, etc), but the common solution is to perform the following steps, where applicable:
Move the project back to an internal hard drive, as external drives cause this issue
Recursively set the project directory as Read-Only, then set it back to Read-Write
Answer by sdpagent · Sep 16, 2019 at 03:39 PM
I had this issue on an external drive, but reformatting it within Disk Utility on the Mac to use "Mac OS Extended (Journaled)" filesystem (not case-sensitive), it worked. It was originally set to using NTFS, which didn't work.
Answer by azinicus · Jun 14, 2018 at 02:48 AM
What worked for me is a variation of @LoungeKatt 's answer, the permissions thing didn't work (macOS), but moving the project files to my main partition worked.