Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.

使用indexedDB时候报错:Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.

 

解决办法:把数据库重新删了,然后再新建就可以。

 

 

 

原因是之前没有建索引,现在新建索引以后,再原来的库上面新建索引会报错!

总结:如果有不明情况报错,需要升级版本号,或者删除重新建立就可以

 

posted @ 2021-06-30 15:54  月亮出来了  阅读(1669)  评论(0编辑  收藏  举报