+

Search Tips   |   Advanced Search

JSONStore troubleshooting


Information required


Isolate the issue

  1. Reset the emulator (Android) or simulator (iOS) and call the destroy API to start with a clean system.

  2. Ensure that you are running on a supported production environment.

    • Android >= 2.3 ARM/x86 emulator or device
    • iOS >= 6.0 simulator or device
    • Windows Phone 8.0 ARM/x86 emulator or device
    • Windows 8.0-8.1 ARM/x86/x64 simulator or device

  3. Try to turn off encryption by not passing a password to the init or open APIs.

  4. Look at the SQLite database file generated by JSONStore. Encryption must be turned off.

    • Android emulator:

        $ adb shell
        $ cd /data/data/com.<app-name>/databases/wljsonstore
        $ sqlite3 jsonstore.sqlite

    • iOS simulator:

        $ cd ~/Library/Application Support/iPhone Simulator/7.1/Applications/<id>/Documents/wljsonstore
        $ sqlite3 jsonstore.sqlite

    • Windows Phone 8:

        $ cd C:\Data\Users\DefApps\AppData\<id>\Local\wljsonstore
        $ sqlite3 jsonstore.sqlite

    • Windows 8 simulator

        $ cd C:\Users\<username>\AppData\Local\Packages\<id>\LocalState\wljsonstore
        $ sqlite3 jsonstore.sqlite

    • JavaScript only implementation that runs on a web browser (Firefox, Chrome, Safari, Internet Explorer) does not use an SQLite database. The file is stores in HTML5 LocalStorage.

    • Look at the searchFields with .schema and select data with SELECT * FROM <collection-name>;.

      To exit sqlite3, type .exit. If we pass a user name to the init method, the file is called <username>.sqlite.

      If we do not pass a user name, the file is called jsonstore.sqlite by default.

  5. (Android only) Enable verbose JSONStore.

      adb shell setprop log.tag.jsonstore-core VERBOSE
      adb shell getprop log.tag.jsonstore-core

  6. Use the debugger.


Common issues


Parent topic: JSONStore troubleshooting