ujjwalguptaofficial / JsStore

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

InvalidAccessError in ie for jsstore.min.js #45

Closed kamalakkanni closed 6 years ago

kamalakkanni commented 6 years ago

Hi,

All my other scripts are accessible and working fine.But not jsstore.min.js in ie 11.Help me to fix it

thanks

ujjwalguptaofficial commented 6 years ago

This issue is happening in v2 right ?

ujjwalguptaofficial commented 6 years ago

Also please add a query example to generate the issue.

kamalakkanni commented 6 years ago

no,I am using v1 only.I tried to change it to v2.But I got webworker error.So I revert my code.so it is in v1.I got this error while fetching data

ujjwalguptaofficial commented 6 years ago

I am sorry but I cant work on v1 now. There were many bugs and improvements which were fixed in v2. And most importantly we support migration from v1.

So please update to v2. If you are getting any issue like the one you mentioned about web worker error please add another issue like - "Getting problem when migrating from v1 to v2". I will surely help you.

The chances may be that what ever issue you are getting that may be fixed in v2.

Thanks

kamalakkanni commented 6 years ago

Hi,this is happening at v2 also

ujjwalguptaofficial commented 6 years ago

Ok please add a sample query to generate the issue.

Thanks

On Fri 25 May, 2018, 4:05 PM kamalakkanni, notifications@github.com wrote:

Hi,this is happening at v2 also

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/45#issuecomment-392013173, or mute the thread https://github.com/notifications/unsubscribe-auth/AKbo90XEEqVM-0kKsla_dlEnb-Oquo4kks5t195zgaJpZM4UKE0J .

kamalakkanni commented 6 years ago

return this._connection.select<class>({ from: this.table, distinct: true });

kamalakkanni commented 6 years ago

pls help me.its emergency to complete my project.

ujjwalguptaofficial commented 6 years ago

Lets talk on gitter - https://gitter.im/JsStore . Please join group and ping me.

ujjwalguptaofficial commented 6 years ago

@kamalakkanni - issue is fixed in 2.1.0. Please check and let me know.

Thanks

kamalakkanni commented 6 years ago

Not yet fixed.It gives "Assignment to read-only properties is not allowed in strict mode" in jsstore.worker.js in below line

       indexedDB = self.mozIndexedDB ||
            self.webkitIndexedDB || self.msIndexedDB;

so indexeddb is also not gettingcreated

ujjwalguptaofficial commented 6 years ago

Please tell us the ie and windows version.

On Tue 5 Jun, 2018, 1:29 PM kamalakkanni, notifications@github.com wrote:

Not yet fixed.It gives "Assignment to read-only properties is not allowed in strict mode" in jsstore.worker.js . so indexeddb is also not gettingcreated

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ujjwalguptaofficial/JsStore/issues/45#issuecomment-394617833, or mute the thread https://github.com/notifications/unsubscribe-auth/AKbo9ziyDRwS48EZJQNc3Hkga-Ppfsqkks5t5jpWgaJpZM4UKE0J .

kamalakkanni commented 6 years ago

ie11 and windows 10

kakugiki commented 6 years ago

I got the same InvalidAccessError error with Edge on Windows 10 Pro, no further error log. Web api response was inserted to idb.

image

kamalakkanni commented 6 years ago

yes it is inserted.But not fetching data.so,issue is not yet fixed

ujjwalguptaofficial commented 6 years ago

Hey guys - I tried this in ie and not getting any issue . Check out the below screenshot

image

Not sure but probably its bug in ie and has been fixed in update. My Ie version is - Microsoft Edge 41.16299.248.0

kamalakkanni commented 6 years ago

thanks,its working fine in edge.but not in ie.It gives "Object doesn't support property or method 'findIndex'".You used findIndex in jsstore.worker.js

kakugiki commented 6 years ago

Your demo works fine, but my app still has some issues. I guess it's something specific to my app not Edge in general. Thanks for fixing the issue.

ujjwalguptaofficial commented 6 years ago

"Object doesn't support property or method 'findIndex'" yep that's an es6 method but jsstore is converted into browser supported type by webpack and babel. Can you load - idbstudio into your browser.

@kamalakkanni open this link - https://ujjwalguptaofficial.github.io/idbstudio/ and let me know what you are getting.

kamalakkanni commented 6 years ago

In ie it shows loading only and gives below console error

object Error]{description: "'Promise' i...", message: "'Promise' i...", name: "ReferenceEr...", number: -2146823279, stack: "ReferenceEr..."}

"'Promise' is undefined"

kamalakkanni commented 6 years ago

Hi,

Any updation

Thanks

ujjwalguptaofficial commented 6 years ago

no , I am not able to reproduce the issue. If you can help me reproducing that would be great.

kamalakkanni commented 6 years ago

What I have to do

ujjwalguptaofficial commented 6 years ago

I have asked you but you didn't answer. Are you able to load idbstudio in your browser - https://ujjwalguptaofficial.github.io/idbstudio/ ?

Let me know.

kamalakkanni commented 6 years ago

I already replied to you like its working fine in microsoft edge and not in ie for the url https://ujjwalguptaofficial.github.io/idbstudio/ . In ie it shows loading and gives below console error

object Error]{description: "'Promise' i...", message: "'Promise' i...", name: "ReferenceEr...", number: -2146823279, stack: "ReferenceEr..."}

"'Promise' is undefined"

ujjwalguptaofficial commented 6 years ago

ok cool. I thought that was about your apps. I think if promise is not supported then it wont support idb. Check out these links -

  1. https://github.com/github/fetch/issues/114
  2. https://stackoverflow.com/questions/29703520/why-does-internet-explorer-11-not-detect-indexeddb

But if you think indexeddb will work irrespective of promise support, then use some polyfills for promise and see if its working. Good luck with the experimentation and let me know.

ujjwalguptaofficial commented 6 years ago

According to this website https://caniuse.com/#feat=indexeddb - there is partial support of indexeddb which means there will be no of bugs. So I would say just check if promise is defined and if not do not use idb.

There will be very less people who will be using ie11 but yeah I understand we want to support for every browsers. In that case - you will have to include the pollyfill.

kamalakkanni commented 6 years ago

Thanks and sorry for the late response .Below is my polyfill.ts.What I have to do to fix it.

/**

/***

/ IE9, IE10 and IE11 requires all of the following polyfills. / import 'core-js/es6/symbol'; import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/es6/parse-int'; import 'core-js/es6/parse-float'; import 'core-js/es6/number'; import 'core-js/es6/math'; import 'core-js/es6/string'; import 'core-js/es6/date'; import 'core-js/es6/array'; import 'core-js/es6/regexp'; import 'core-js/es6/map'; import 'core-js/es6/weak-map'; import 'core-js/es6/set';

import 'core-js/es7/symbol'; import 'core-js/es7/object';

import 'core-js/es7/math'; import 'core-js/es7/string';

import 'core-js/es7/array';

import 'core-js/es7/map'; import 'core-js/es7/weak-map'; import 'core-js/es7/set';

/* IE10 and IE11 requires the following for NgClass support on SVG elements / // import 'classlist.js'; // Run npm install --save classlist.js.

/ Evergreen browsers require these. / import 'core-js/es6/reflect'; import 'core-js/es7/reflect';

/**

/***

/***

/**

kamalakkanni commented 6 years ago

In this file,I included import { polyfill } from 'es6-promise'; polyfill(); as per the link github/fetch#114 what u send.But not yet solved

ujjwalguptaofficial commented 6 years ago

Check out this package - https://www.npmjs.com/package/promise-polyfill . import it where the app is registered or bootstrapped.

import 'promise-polyfill/src/polyfill';

Let me know if this helps.

kamalakkanni commented 6 years ago

Thanks.I installed package and imported in main.ts .But got TypeError: Object doesn't support property or method 'findIndex' in ie

ujjwalguptaofficial commented 6 years ago

@kamalakkanni - check out these two polyfill

Download both polyfill and add it your project, after that you will be able to run everything in ie. If not , feel free to reopen the issue and have more conversation. I am sorry for late reply, I was completely busy with other things.

Thanks

kamalakkanni commented 6 years ago

Thanks,I added this file like below

in index.html.but problem not yet solved,pls help me.I can't change status as reopen