Hybrid View

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    20
    Vote Rating
    3
    bstrappazzon is on a distinguished road

      1  

    Default Unanswered: Sencha SQLite proxy and native packaging

    Unanswered: Sencha SQLite proxy and native packaging


    Hi all,

    I'm using the new sql proxy provided with sencha touch 2.1 and it works great as long as I use it in a browser. I tested it on the native browser of my Asus transformer tablet.

    As soon as I package my application in native, I get an error when I try to access webSql database throw the proxy:

    Code:
    01-05 21:35:47.020: E/Web Console(9939): Uncaught Error: SECURITY_ERR: DOM Exception 18 at file:///android_asset/app.js:66393

    My tablet is working on android 4.0.3.

    Is there something I can do to make the SQL proxy works on a native application ?

    Thanks

  2. #2
    Sencha User
    Join Date
    Sep 2012
    Posts
    8
    Vote Rating
    1
    hubsencha is on a distinguished road

      0  

    Default


    Quote Originally Posted by bstrappazzon View Post
    Hi all,

    I'm using the new sql proxy provided with sencha touch 2.1 and it works great as long as I use it in a browser. I tested it on the native browser of my Asus transformer tablet.

    As soon as I package my application in native, I get an error when I try to access webSql database throw the proxy:

    Code:
    01-05 21:35:47.020: E/Web Console(9939): Uncaught Error: SECURITY_ERR: DOM Exception 18 at file:///android_asset/app.js:66393

    My tablet is working on android 4.0.3.

    Is there something I can do to make the SQL proxy works on a native application ?

    Thanks
    Same problem here on simulator and smartphone android.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    20
    Vote Rating
    3
    bstrappazzon is on a distinguished road

      0  

    Default


    Quote Originally Posted by hubsencha View Post
    Same problem here on simulator and smartphone android.
    Nice to see that I'm not alone with this problem.

    I think that this issue may be related to the webView used by sencha native packaging. I think that it is not configure to accept webSql database or it simply cannot use webSql because android 4 webView does not allow it.

    Maybe an android expert can confirm that?

    I solve this issue by packaging the application with Phonegap and use https://github.com/brodyspark/PhoneG...Plugin-Android to persist my data.
    This is not what I wanted to do first. I would prefer to perform a full sencha build.

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    498
    Answers
    25
    Vote Rating
    51
    shepsii has a spectacular aura about shepsii has a spectacular aura about shepsii has a spectacular aura about

      1  

    Default


    You should be able to use websql without the sqlite phonegap plugin on native. I was fine using phonegap, without that plugin, when I was working with my own proxy. Perhaps try creating the database with a lower amount of memory? 5mb worked for me.

    Having said that, I'm reverting to saving json files locally and overwriting them with updates because in my experience sqlite is a complete nightmare to develop and debug with... exactly because of errors like this.

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Location
    Pakistan
    Posts
    82
    Answers
    3
    Vote Rating
    2
    zonaib is on a distinguished road

      1  

    Default


    hi guys , make sure space that you allocated for the sqlite is less than 5 mb otherwise it will give you error ...

    window.openDatabase("Database", "1.0", "Cordova Users", 3000000);


  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    20
    Vote Rating
    3
    bstrappazzon is on a distinguished road

      0  

    Default


    The database size is not the problem, I still have the same error when I package my application.
    The weird thing is it's now working with phonegap packaging without using the custom sqlite plugin.

    I really don't understand what is happening.

    Many thanks for your answer