This project has moved. For the latest updates, please go here.
1
Vote

Linq2IndexeddB issue in Devices like Android ,Windows 8

description

Following issue showed in emulator while loading my application:

10-18 16:52:49.815: E/browser(534): Console: 16:52:49.817 Linq2IndexedDB: http://example.com/HTML5IndexedDb/Linq2IndexedDB.js:1185

your Linq2IndexedDb application also not working in devices.

comments

KDegrave wrote Oct 18, 2012 at 12:19 PM

Can you provide me some more information about the error or what is going wrong?

vimalrajp wrote Oct 18, 2012 at 12:47 PM

hi,
i have created an sample applcation for the linq2indexeddb and hosted it in server ,and i check the link with
Samsung galaxy tab (Android 4.0.4) and Windows slate(windows 8).

In Windows 8 it is working but some time it shows error like linq2indexeddb.js not found
line no:1099 var worker = new Worker(utilities.linq2indexedDBWorkerFileLocation);

In Android Device it is not creating Db itself. so i checked with Android emulator it shows above error,
i have test with your sample application it is also showing same error.
can u check and tell me

wrote Oct 19, 2012 at 8:16 AM

wrote Oct 19, 2012 at 8:17 AM

wrote Feb 14, 2013 at 7:20 PM

TakalaneSesame wrote Apr 20, 2013 at 5:03 PM

Hi, I also have the same problem in my Galaxy with android 4.0. I tried with both the codeplex code and the nuget code (which are quite different and I don't know which one we are supposed to use). Anyway, is this supposed to work in a galaxy (i am using phonegap)? All works well on chrome in ripple emulator. If this is a known issue that is still to be fixed then i would like to also know so that i can decide on direction.

TakalaneSesame wrote Apr 20, 2013 at 5:04 PM

Hi, I also have the same problem in my Galaxy with android 4.0. I tried with both the codeplex code and the nuget code (which are quite different and I don't know which one we are supposed to use). Anyway, is this supposed to work in a galaxy (i am using phonegap)? All works well on chrome in ripple emulator. If this is a known issue that is still to be fixed then i would like to also know so that i can decide on direction.

KDegrave wrote Apr 22, 2013 at 5:51 AM

Hi,

The nugget version and the one you can download are the "stable" versions. The source code you find, is the refactoring of my code and new features I wanted to add. Because I needed a lot of time in real life, I have had much time to work further on it.

In Windows 8 it is working but some time it shows error like linq2indexeddb.js not found
line no:1099 var worker = new Worker(utilities.linq2indexedDBWorkerFileLocation);

--> This error is caused because the reference to the workerfile location isn't corret. Change this to the correct URL and it should work.

TakalaneSesame wrote Apr 22, 2013 at 7:37 AM

Thanks for your comments. Is it possible for youth test in an android device? I am developing with an emulator that uses chrome so I did the following:
  1. Put the code to force chrome to use the shim (something like useshim).
  2. I can see it tries to create the db, but I get an error about range not being right type. Someone suggested that it has to do with numbers being used for the readonly and readwrite values and suggested doing a find and replace, but I tried that and got more issues. That is when I started wondering if the shim is even supposed to work.
So my question at the moment is: does the library in nuget work with the shim? If so what is the browser it was tested in so I can try it there to see if i can figure out.

There is some commented out code that returns implementation.SHIM so I even tried to comment that because no other code sets that.

Oh and the browser unit tests just hang in my galaxy.

I am willing to help get this working, but first i think i need to know if this is just a bug or if the shim was just ignored for a while (you are only one man afterall)

KDegrave wrote Apr 24, 2013 at 6:33 AM

Hi,

The only think I can say is that my lib can work with the indexeddb shim, but I don't know what devices are supported by the shim. For more information about the shim I would advice you to contact nparashuram (http://nparashuram.com/IndexedDBShim/)

The fact the code for the implementation.SHIM is commented out is because the way the shim works has changed some while ago. Since then I'm not able to detect whether you are working with the shim or not.

Maybe give this a try: turn on the debugging information on the shim, maybe you get some more usefull information about it:
window.shimIndexedDB.__debug(true)

greetings

Kristof

TakalaneSesame wrote Apr 24, 2013 at 7:53 PM

Thanks for your comments. What browser did you use to test your library with the shim? I have tried all day to get this to work in chrome with the shim by setting useShim to true and also turning on debugging. The shim doesn't seem to get called at all. I am probably messing things up with my limited knowledge.

In the meantime i have learnt enough about indexed db to actually start rewriting my app by using the shim directly, It seems you have successfully used this with the shim so we can just close it as a lack of understanding on my part. Your library helped me get where I am quickly though, so thank you for that.

TakalaneSesame wrote Apr 27, 2013 at 9:01 AM

Ok, got it to work with the shim in android with phonegap.
  1. You can't force the shim to work with websql on chrome.
  2. Make sure you call window.shimIndexedDB.__useShim()  just before opening you database, otherwise link2indexed db will create the db but you will fail to query it because it will be using the wwrong interfaces.
  3. Make sure you load the shim after the device is ready because i starts doing some work as solo as it is loaded as described here:
    http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html
It is now failing to outnumber my id's but i will post back with an answer for that one too.

TakalaneSesame wrote Apr 27, 2013 at 9:03 AM

Ok, got it to work with the shim in android with phonegap.
  1. You can't force the shim to work with websql on chrome.
  2. Make sure you call window.shimIndexedDB.__useShim()  just before opening you database, otherwise link2indexed db will create the db but you will fail to query it because it will be using the wwrong interfaces.
  3. Make sure you load the shim after the device is ready because i starts doing some work as solo as it is loaded as described here:
    http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html
It is now failing to outnumber my id's but i will post back with an answer for that one too.