For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


JSONStore troubleshooting overview

Find information to help resolve issues that you might encounter when we use the JSONStore API.


Provide information when you ask for help

It is better to provide more information than to risk not providing enough information. The following list is a good starting point for the information that is required to help with JSONStore issues.


Try to isolate the issue

Follow these steps to isolate the issue to more accurately report a problem.

  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 v7/ARM v8/x86 emulator or device
    • iOS >= 6.0 simulator or device (deprecated)
    • Windows Phone Silverlight 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 that is 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 Silverlight 8:

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

    • Windows 8 Universal simulator

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

      Note: 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 you pass a user name to the init method, the file is called <username>.sqlite. If you 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

Understanding the following JSONStore characteristics can help resolve some of the common issues that you might encounter.

Parent topic: Troubleshooting JSONStore