ujjwalguptaofficial / JsStore

Simplifying IndexedDB with SQL like syntax and promises
http://jsstore.net/
MIT License
858 stars 110 forks source link

While Clearing browser data keystore is not deleted So that getting db not exist error #21

Closed kamalakkanni closed 6 years ago

kamalakkanni commented 6 years ago

Hi,

While Clearing browser data keystore is not deleted So that getting db not exist error sometimes.Can you pls help me to fix it when u r free

I am using below code for checking dbexist

     JsStore.isDbExist(That._indexedDBLiveDBName).then(isExist => {
        if (!isExist) {
            const DataBase = That.getDbSchema();
            That._connection.createDb(DataBase, function () {
                That._isLiveDbCreated = true;
                localStorage.setItem('_isLiveDbCreated', 'true');
                return;
            });
        }
        else {
            That._isLiveDbCreated = true;
            localStorage.setItem('_isLiveDbCreated', 'true');

            return;
        }
    }).catch(err => {
        // this will be fired when indexedDB is not supported.
        console.log(err.Message);
    });

Thanks

ujjwalguptaofficial commented 6 years ago

I am already working on it. Will let you know as soon as it is completed. This is a big change actually, so its gonna take some time.

Thanks.

kamalakkanni commented 6 years ago

ok.thanks

ujjwalguptaofficial commented 6 years ago

Hi I have solved this issue. Please install the latest version -1.6.0.

Please let me know if its solved or the problem remains still.

thanks.

kamalakkanni commented 6 years ago

Hi,

Thanks,That error is fixed after intalling latest version 1.6.0 ."But It gives Uncaught (in promise): undefined at resolvePromise (webpack-internal:///../../../../zone.…, …}".

Thanks

On Thu, Feb 15, 2018 at 9:18 AM, Ujjwal Gupta notifications@github.com wrote:

Hi I have solved this issue. Please install the latest version -1.6.0.

Please let me know if its solved or the problem remains still.

thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/21#issuecomment-365818153, or mute the thread https://github.com/notifications/unsubscribe-auth/Achrzkp0nfqcy8c54fsksCP8k0Vz70jfks5tU6j2gaJpZM4R8SMh .

ujjwalguptaofficial commented 6 years ago

I cant see code, where it is showing undefined.

Can you add a screenshot or the code snippet ?

ujjwalguptaofficial commented 6 years ago

Are you getting this at 'delete' method ?

kamalakkanni commented 6 years ago

I am having clear method only.I didn't check where it is from .Since it was fine before updating jsstore.That's y I said to you .After getting that error, I installed old version 1.5.2.I will check and let u know On Fri, Feb 16, 2018 at 8:10 AM, Ujjwal Gupta notifications@github.com wrote:

Are you getting this at 'delete' method ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/21#issuecomment-366129583, or mute the thread https://github.com/notifications/unsubscribe-auth/AchrzlMt7mb-LGy3qsTsZzHHRpYNf3vEks5tVOqLgaJpZM4R8SMh .

ujjwalguptaofficial commented 6 years ago

please let me know if all good.

Thanks.

kamalakkanni commented 6 years ago

thanks,Its working fine.(Sorry for the late reply(I can't update the version because I worked for the demo )

On Fri, Feb 16, 2018 at 9:55 PM, Ujjwal Gupta notifications@github.com wrote:

please let me know if all good.

Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/21#issuecomment-366284119, or mute the thread https://github.com/notifications/unsubscribe-auth/Achrzp44N8XxWPdHYStaSlZn8PLKWQgNks5tVavrgaJpZM4R8SMh .

ujjwalguptaofficial commented 6 years ago

Ok thanks. Closing the issue.

kamalakkanni commented 6 years ago

Hi,

After clearing indexeddb table gives "Error: Uncaught (in promise): undefined at resolvePromise (webpack-internal:///../../../../zone.js/dist/zone.js:665:31)" error.How can i fix it.

On Tue, Feb 20, 2018 at 8:33 PM, Ujjwal Gupta notifications@github.com wrote:

Closed #21 https://github.com/ujjwalguptaofficial/JsStore/issues/21.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/21#event-1482606752, or mute the thread https://github.com/notifications/unsubscribe-auth/AchrzhcMRJVxVhv4YDL81QZeQAfah3wIks5tWt7UgaJpZM4R8SMh .

ujjwalguptaofficial commented 6 years ago

How are you clearing the table ?

kamalakkanni commented 6 years ago

if (this._isLiveDbCreated) { this._connection.openDb(this._indexedDBLiveDBName); return this._connection.clear(this._indexedDBLiveDBArticleTableName);

}

On Wed, Feb 21, 2018 at 12:09 PM, Ujjwal Gupta notifications@github.com wrote:

How are you clearing the table ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/21#issuecomment-367228519, or mute the thread https://github.com/notifications/unsubscribe-auth/AchrzszTvgPkc1BpXLH1AM_9xNPKz1Akks5tW7oJgaJpZM4R8SMh .

ujjwalguptaofficial commented 6 years ago

Can you share the code - where you are getting error. I mean code which is at zone.js : 665

kamalakkanni commented 6 years ago

Hi,

while returning clear method I got below

"Error: Uncaught (in promise): undefined at resolvePromise (webpack-internal:///../../../../zone.js/dist/zone.js:665:31) [] at eval (webpack-internal:///../../../../zone.js/dist/zone.js:591:17) [] at Object.e.OnError (http://localhost:4200/assets/js/jsstore.min.js:6:81017) [] at r.t.processFinishedRequest ( http://localhost:4200/assets/js/jsstore.min.js:6:82929) [] at r.t.onMessageFromWorker ( http://localhost:4200/assets/js/jsstore.min.js:6:83644) [] at r. (http://localhost:4200/assets/js/jsstore.min.js:6:81286) []"

Below zone.js code from where I am getting this error

function consoleError(e) { if (Zone[symbol('ignoreConsoleErrorUncaughtError')]) { return; } var rejection = e && e.rejection; if (rejection) { console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined); } console.error(e); }

On Wed, Feb 21, 2018 at 12:30 PM, Ujjwal Gupta notifications@github.com wrote:

Can you share the code - where you are getting error. I mean code which is at zone.js : 665

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/21#issuecomment-367231859, or mute the thread https://github.com/notifications/unsubscribe-auth/AchrznGoaQqeBGTjcjOLCdkxjXoN8S6tks5tW78igaJpZM4R8SMh .

ujjwalguptaofficial commented 6 years ago

Please add another issue for this. I will try to reproduce this.