Failed to execute ‘createObjectStore’ on ‘IDBDatabase’

You can’t create an objectStore in an onsuccess method. You can only do this in a upgradeneeded event.

Quote from docs:

When you create a new database or increase the version number of an existing database (by specifying a higher version number than you did previously, when Opening a database), the onupgradeneeded event will be triggered. In the handler for this event, you should create the object stores needed for this version of the database

See documentation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)