- Home /
Unity 2018.1: [UnityCache] indexedDB database could not be opened
When i export a game to WebGL (Webassembly and Asm.js) and then upload and launch it for the very first time, the game does not load. I get the following error in the console:
"[UnityCache] indexedDB database could not be opened"
After this message, nothing happens.
Now if i refresh the page, it starts working and i don't get that error. Every time i try to reload the game after that first unsuccessful load, it works. So the problem is only on the very first loading of the game. I could reproduce this problem multiple times on Google Chrome on multiple computers with multiple games. It is very hard to reproduce it though. It seems to be happening with every game exported with Unity 2018.1 and played for the very first time on a machine.
Does somebody have a fix for this? Thanks.
Answer by ddophemont · Jul 02, 2018 at 09:00 AM
It seems to help if you lengthen the timeout of XMLHttpRequest in UnityLoader.js from the default 1 second to something longer (e.g. 10 seconds).
setTimeout(o.onerror, 1e3)
See this thread on the unity forums for more info:
https://forum.unity.com/threads/unitycache-indexeddb-database-could-not-be-opened-error.541215/
Answer by barrymulrooney · Oct 22, 2019 at 08:45 PM
Is this still an issue with the current version of Unity? I'm getting the same error even when I've added extra setTimeout seconds. I've set it to 10000 and I still get the error message.
I also have turned off data caching.