Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5477] Querying remotely loaded database fails with disk i/o error in 7.0.0, works in 6.3.0

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2018-01-20T06:36:24.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterJeroen van Vianen
AssigneeShak Hossain
Created2017-12-28T11:11:35.000+0000
Updated2018-03-18T15:03:29.000+0000

Description

I have a use-case where a database is not available locally and needs to be fetched from a URL, uncompressed, installed and then queried. This works fine in 6.3.0.GA but fails in 7.0.0.GA. This is an awkward user experience where the user is requested to download a database file, sees an alert box that the database has been successfully installed but when he tries to query it, there is no data and the user is requested to download the database file again. However, after quitting the app and restarting it, the database has actually been installed and the app works as expected (both on device and simulator). I've attached a stripped down JS snippet which shows the logic that I've been doing. The real code is slightly more complicated. The error reported is: {"line":151,"column":31,"sourceURL":"file:///Users/USERNAME/Library/Developer/CoreSimulator/Devices/411028DF-C46E-463D-A889-AAAC9C3AABC5/data/Containers/Bundle/Application/D32FCC20-2DF6-4746-86EA-60FA295D650C/APP.app/db.js","nativeReason":"Error Domain=com.plausiblelabs.pldatabase Code=3 \"An error occured parsing the provided SQL statement.\" UserInfo={com.plausiblelabs.pldatabase.error.query.string=select count(*) from table, com.plausiblelabs.pldatabase.error.vendor.code=10, com.plausiblelabs.pldatabase.error.vendor.string=disk I/O error, NSLocalizedDescription=An error occured parsing the provided SQL statement.}","nativeLocation":"-[TiDatabaseProxy execute:] (TiDatabaseProxy.m:184)"}

Attachments

FileDateSize
ac5477.zip2018-01-02T08:48:16.000+00006616
app.js2017-12-29T22:04:42.000+00001881
snippet.js2017-12-28T11:10:40.000+00001845

Comments

  1. Sharif AbuDarda 2017-12-29

    Hello, Please create a full reproducible sample code/project. We will investigate it. Thanks.
  2. Jeroen van Vianen 2017-12-29

    Hi Sharif, I added an app.js, that illustrates the problem; it has no UI, just look at the log messages.
  3. Sharif AbuDarda 2017-12-30

    Hello, We need the ti.compression module for us to test. Please send a full sample project.
  4. Jeroen van Vianen 2017-12-31

    Hi Sharif, ti.compression is http://gitt.io/search?q=ti.compression
  5. Mostafizur Rahman 2018-01-02

    Hello [~morinel], Thanks for your feedback. It would be better if you can provide a sample test project to reproduce this on our end? Best
  6. Jeroen van Vianen 2018-01-02

    Is the attached ZIP file sufficient?
  7. Mostafizur Rahman 2018-01-09

    Hello [~morinel], Tested the zip file provided by you and unable to reproduce the error. *Test steps:* 1. Download the zip file. 2. Open studio, create a sample classic project and paste the sample app.js file 3. Include ti.compression module from [here](https://github.com/appcelerator-modules/ti.compression/releases) 4. Run it via simulator *Test Result:*
       [INFO] :   Launching iOS Simulator
       [INFO] :   rmmpush/1.0 (7.0.1.f5ae7e5)
       [INFO] :   [object TiCompressionModule] loaded
       [INFO] :   Extracting DB file /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/FC94464E-0EC2-4453-A243-EB8DE606EFE1/data/Containers/Data/Application/1E99B0AC-4FD9-4F79-836A-68CDFD2EC0A5/tmp/quicktide2017.db.zip
       [INFO] :   Archive file [/Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/FC94464E-0EC2-4453-A243-EB8DE606EFE1/data/Containers/Data/Application/1E99B0AC-4FD9-4F79-836A-68CDFD2EC0A5/tmp/quicktide2017.db.zip] successfully extracted
       [INFO] :   Extracted file = 37295104 bytes
       [INFO] :   Installing DB file /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/FC94464E-0EC2-4453-A243-EB8DE606EFE1/data/Containers/Data/Application/1E99B0AC-4FD9-4F79-836A-68CDFD2EC0A5/tmp/quicktide2017.db
       [INFO] :   Database installed as /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/FC94464E-0EC2-4453-A243-EB8DE606EFE1/data/Containers/Data/Application/1E99B0AC-4FD9-4F79-836A-68CDFD2EC0A5/Library/Private Documents/quicktide2017.sql
       [INFO] :   Removing temporary file /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/FC94464E-0EC2-4453-A243-EB8DE606EFE1/data/Containers/Data/Application/1E99B0AC-4FD9-4F79-836A-68CDFD2EC0A5/tmp/quicktide2017.db.zip
       
       
  8. Jeroen van Vianen 2018-01-09

    Very strange, I get the following output when running from the simulator:
       ti build -p ios
       
       [INFO]  AC5477/0.1 (7.0.1.f5ae7e5)
       [INFO]  [object TiCompressionModule] loaded
       [INFO]  Extracting DB file /Users/jeroen/Library/Developer/CoreSimulator/Devices/411028DF-C46E-463D-A889-AAAC9C3AABC5/data/Containers/Data/Application/662DBF7D-3DC7-4AE0-8D55-5F29DBD46780/tmp/quicktide2017.db.zip
       [INFO]  Archive file [/Users/jeroen/Library/Developer/CoreSimulator/Devices/411028DF-C46E-463D-A889-AAAC9C3AABC5/data/Containers/Data/Application/662DBF7D-3DC7-4AE0-8D55-5F29DBD46780/tmp/quicktide2017.db.zip] successfully extracted
       [INFO]  Extracted file = 37295104 bytes
       [INFO]  Installing DB file /Users/jeroen/Library/Developer/CoreSimulator/Devices/411028DF-C46E-463D-A889-AAAC9C3AABC5/data/Containers/Data/Application/662DBF7D-3DC7-4AE0-8D55-5F29DBD46780/tmp/quicktide2017.db
       [INFO]  Database installed as /Users/jeroen/Library/Developer/CoreSimulator/Devices/411028DF-C46E-463D-A889-AAAC9C3AABC5/data/Containers/Data/Application/662DBF7D-3DC7-4AE0-8D55-5F29DBD46780/Library/Private Documents/quicktide2017.sql
       [INFO]  {
       [INFO]      column = 17;
       [INFO]      line = 35;
       [INFO]      message = "invalid SQL statement";
       [INFO]      nativeLocation = "-[TiDatabaseProxy execute:] (TiDatabaseProxy.m:184)";
       [INFO]      nativeReason = "Error Domain=com.plausiblelabs.pldatabase Code=3 \"An error occured parsing the provided SQL statement.\" UserInfo={com.plausiblelabs.pldatabase.error.query.string=select count(*) from tides, com.plausiblelabs.pldatabase.error.vendor.code=10, com.plausiblelabs.pldatabase.error.vendor.string=disk I/O error, NSLocalizedDescription=An error occured parsing the provided SQL statement.}";
       [INFO]      sourceURL = "file:///Users/jeroen/Library/Developer/CoreSimulator/Devices/411028DF-C46E-463D-A889-AAAC9C3AABC5/data/Containers/Bundle/Application/52F2B478-1C88-4C42-A986-240FC5B59015/AC5477.app/app.js";
       [INFO]  }
       
  9. Mostafizur Rahman 2018-01-13

    [~morinel], Can you please share your *appc info* here?
  10. Jeroen van Vianen 2018-01-13

        $ appc info
        Appcelerator Command-Line Interface, version 7.0.1
        Copyright (c) 2014-2018, Appcelerator, Inc.  All Rights Reserved.
        
        Operating System
          Name                        = Mac OS X
          Version                     = 10.13.2
          Architecture                = 64bit
          # CPUs                      = 8
          Memory                      = 16.0GB
        
        Node.js
          Node.js Version             = 8.9.1
          npm Version                 = 5.5.1
        
        Appcelerator CLI
          Installer                   = 4.2.11
          Core Package                = 7.0.1
        
        Titanium CLI
          CLI Version                 = 5.0.14
          node-appc Version           = 0.2.41
        
        Titanium SDKs
          7.0.1.GA
            Version                   = 7.0.1
            Install Location          = /Users/jeroen/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA
            Platforms                 = iphone, android
            git Hash                  = f5ae7e5
            git Timestamp             = 12/18/2017 18:48
            node-appc Version         = 0.2.43
          7.0.0.GA
            Version                   = 7.0.0
            Install Location          = /Users/jeroen/Library/Application Support/Titanium/mobilesdk/osx/7.0.0.GA
            Platforms                 = iphone, android
            git Hash                  = f09dec4
            git Timestamp             = 12/5/2017 21:38
            node-appc Version         = 0.2.43
          6.3.0.GA
            Version                   = 6.3.0
            Install Location          = /Users/jeroen/Library/Application Support/Titanium/mobilesdk/osx/6.3.0.GA
            Platforms                 = iphone, android, mobileweb
            git Hash                  = 3620088
            git Timestamp             = 11/1/2017 01:20
            node-appc Version         = 0.2.43
         
        Mac OS X
          Command Line Tools          = installed
        
        IntelĀ® Hardware Accelerated Execution Manager (HAXM)
          Installed                   = yes
          Memory Limit                = 2 GB
        
        Java Development Kit
          Version                     = 1.8.0_151
          Java Home                   = /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
        
        Genymotion
          Path                        = /Applications/Genymotion.app/Contents/MacOS
          Genymotion Executable       = /Applications/Genymotion.app/Contents/MacOS/genymotion
          Genymotion Player           = /Applications/Genymotion.app/Contents/MacOS/player
          Home                        = /Users/jeroen/.Genymobile/Genymotion
        
        VirtualBox
          Executable                  = /usr/local/bin/VBoxManage
          Version                     = 5.1.30r118389
        
        Android SDK
          Android Executable          = not found
          ADB Executable              = /Users/jeroen/Library/Android/sdk/platform-tools/adb
          SDK Path                    = /Users/jeroen/Library/Android/sdk
        
        Android NDK
        0NDK Path                    = /Users/jeroen/Library/android-ndk-r13b
          NDK Version                 = 13.1.3345770
        
        Android Platforms
          1) android-23
            Name                      = Android 6.0
            API Level                 = 23
            Revision                  = 3
            Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
            ABIs                      = 
            Path                      = /Users/jeroen/Library/Android/sdk/platforms/android-23
          2) android-24
            Name                      = Android 7.0
            API Level                 = 24
            Revision                  = 2
            Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
            ABIs                      = 
            Path                      = /Users/jeroen/Library/Android/sdk/platforms/android-24
          3) android-25
            Name                      = Android 7.1.1
            API Level                 = 25
            Revision                  = 2
            Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
            ABIs                      = 
            Path                      = /Users/jeroen/Library/Android/sdk/platforms/android-25
          4) android-26
            Name                      = Android 8.0.0 (not supported by Titanium SDK 7.0.1.GA, but may work)
            API Level                 = 26
            Revision                  = 1
            Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
            ABIs                      = 
            Path                      = /Users/jeroen/Library/Android/sdk/platforms/android-26
        
        Android Add-Ons
          5) Google Inc.:Google APIs:22
            Name                      = Google APIs (unknown) **Not supported by Titanium SDK 7.0.1.GA**
            Vendor                    = n/a
            Revision                  = 1
            Description               = n/a
            Skins                     = none
            ABIs                      = none
            Path                      = /Users/jeroen/Library/Android/sdk/add-ons/addon-google_apis-google-22
            Libraries                 = none
          6) Google Inc.:Google APIs:23
            Name                      = Google APIs (Android 6.0 (API level 23))
            Vendor                    = Google Inc.
            Revision                  = 1
            Description               = Android + Google APIs
            Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
            ABIs                      = none
            Path                      = /Users/jeroen/Library/Android/sdk/add-ons/addon-google_apis-google-23
            Libraries                 = none
        
        Android Emulators
          Nexus 5 API 22 x86
            ID                        = Nexus_5_API_22_x86
            SDK Version               = not installed
            ABI                       = x86
            Skin                      = nexus_5
            Path                      = /Users/jeroen/.android/avd/Nexus_5_API_22_x86.avd
            SD Card                   = no sd card
            Google APIs               = yes
        
        Genymotion Emulators
          None
        
        Connected Android Devices
          None
        
        Xcode
          9.2 (build 9C40b) - Xcode default
            Install Location          = /Applications/Xcode.app/Contents/Developer
            iOS SDKs                  = 11.2
            iOS Simulators            = 11.2
            Watch SDKs                = 4.2
            Watch Simulators          = 4.2
            Supported by TiSDK 7.0.1.GA = yes
            EULA Accepted             = yes
            Teams                     = none
         
        iOS Keychains
          login.keychain-db           = /Users/jeroen/Library/Keychains/login.keychain-db
          System.keychain             = /Library/Keychains/System.keychain
        
        iOS Development Certificates
        /Users/jeroen/Library/Keychains/login.keychain-db
          Jeroen van Vianen (5QSDF5LE77)
            Not valid before          = 2/6/2017 1:29 PM
            Not valid after           = 2/6/2018 1:29 PM
          Jeroen van Vianen (5QSDF5LE77)
            Not valid before          = 3/23/2017 9:25 AM
            Not valid after           = 3/23/2018 9:25 AM
        
        iOS App Store Distribution Certificates
        /Users/jeroen/Library/Keychains/login.keychain-db
          J. van Vianen (66RC9F323D)
            Not valid before          = 3/23/2017 9:27 AM
            Not valid after           = 3/23/2018 9:27 AM
        
        Apple WWDR Certificate
          Apple WWDR                  = installed
        
        Development iOS Provisioning Profiles
          DB Alerts DEV
            UUID                      = a9270f8d-effe-4990-b9b1-5b884c3acd6e
            App Prefix                = 3SZW356938
            App Id                    = nl.dutchbirding.dbalerts2
            Date Created              = 2/6/2017 1:41 PM
            Date Expired              = 2/6/2018 1:41 PM
            Managed                   = No
          DB Alerts DEV
            UUID                      = c298d168-0fca-4e06-bf8b-fefe684af7a3
            App Prefix                = 3SZW356938
            App Id                    = nl.dutchbirding.dbalerts2
            Date Created              = 3/29/2017 9:36 AM
            Date Expired              = 3/29/2018 9:36 AM
            Managed                   = No
          QuickTide 2016 DEV
            UUID                      = 3e274ed2-0f2d-4c87-bb9b-eb6422492941
            App Prefix                = 66RC9F323D
            App Id                    = nl.vanvianen.quicktide2013
            Date Created              = 3/28/2017 10:37 PM
            Date Expired              = 3/28/2018 10:37 PM
            Managed                   = No
         
        App Store Distribution iOS Provisioning Profiles
          DB Alerts PROD
            UUID                      = 1c35f980-15d7-4341-bdad-ea42d110fd30
            App Prefix                = 3SZW356938
            App Id                    = nl.dutchbirding.dbalerts2
            Date Created              = 3/23/2017 9:38 AM
            Date Expired              = 3/23/2018 9:27 AM
            Managed                   = No
         
        Ad Hoc iOS Provisioning Profiles
          None
        
        Enterprise Ad Hoc iOS Provisioning Profiles
          None
        
        iOS Simulators
        9.0
          iPad 2 (ipad)
            UDID                      = 597AE490-C426-439C-829B-DE7BDF459240
            Supports Watch Apps       = no
          iPad Retina (ipad)
            UDID                      = 49EEB60D-249B-4D47-8B26-CA81BE8ED821
            Supports Watch Apps       = no
          iPad Air (ipad)
            UDID                      = CA116BB9-FC0E-467B-AD27-1F3C26E80404
            Supports Watch Apps       = no
          iPad Air 2 (ipad)
            UDID                      = 1382A86C-4141-4C60-8D78-CCF766DA7C75
            Supports Watch Apps       = no
          iPhone 4s (iphone)
            UDID                      = 74CFAFDF-606C-481E-8E3B-A69909ABFCF1
            Supports Watch Apps       = no
          iPhone 5 (iphone)
            UDID                      = 814CE5DF-0E6F-4FEE-B916-5910A946998F
            Supports Watch Apps       = yes
          iPhone 5s (iphone)
            UDID                      = C2B1D388-8DE5-4E62-921C-C52684DBD8E6
            Supports Watch Apps       = yes
          iPhone 6 Plus (iphone)
            UDID                      = 782D74B4-94F2-40F3-BA4D-6EEFE7B5EDEA
            Supports Watch Apps       = yes
          iPhone 6 (iphone)
            UDID                      = 0B1B2A3D-7ACF-4119-B7CD-A09405A832FD
            Supports Watch Apps       = yes
          iPhone 6s (iphone)
            UDID                      = 6880C4B5-4785-4D9F-8822-CAEBC0610CF0
            Supports Watch Apps       = yes
          iPhone 6s Plus (iphone)
            UDID                      = CA0B6D8C-EBFC-4005-A179-B9B2C46CD5BF
            Supports Watch Apps       = yes
        
        9.1
          iPad 2 (ipad)
            UDID                      = D49AA8A7-3190-43A8-8A31-C0D466A4AF28
            Supports Watch Apps       = no
          iPad Retina (ipad)
            UDID                      = 51B7B39D-10B5-4F34-B02F-17D1DC488593
            Supports Watch Apps       = no
          iPad Air (ipad)
            UDID                      = 84A90997-8513-4315-984F-DFCFF0784AB6
            Supports Watch Apps       = no
          iPad Air 2 (ipad)
            UDID                      = AA7577D3-9092-4164-B077-90F0AC9D0D97
            Supports Watch Apps       = no
          iPad Pro (iPad Pro (12.9-inch)) (ipad)
            UDID                      = C738AB61-3661-4046-9E49-81CD8E4455A0
            Supports Watch Apps       = no
          iPhone 4s (iphone)
            UDID                      = 20C06801-9740-4B35-9107-708F3F46B255
            Supports Watch Apps       = no
          iPhone 5 (iphone)
            UDID                      = 96E1C78B-2C3D-46F2-92B3-9B2A51D9906F
            Supports Watch Apps       = yes
          iPhone 5s (iphone)
            UDID                      = D049CF8E-2A04-40C3-890B-7F44721152F1
            Supports Watch Apps       = yes
          iPhone 6 Plus (iphone)
            UDID                      = 1E5E68CE-7F54-4305-86EC-EE14E90A9B3B
            Supports Watch Apps       = yes
          iPhone 6 (iphone)
            UDID                      = 9D178323-CE49-405B-8A20-EF35900E5500
            Supports Watch Apps       = yes
          iPhone 6s (iphone)
            UDID                      = 635BD015-1C57-4BB4-BFAD-1A1DC576B607
            Supports Watch Apps       = yes
          iPhone 6s Plus (iphone)
            UDID                      = 51C3CCE4-B5A5-42FF-BA99-95D1BB66C297
            Supports Watch Apps       = yes
        
        9.2
          iPad 2 (ipad)
            UDID                      = 2799779B-11B7-41DC-ADEF-6469736D0160
            Supports Watch Apps       = no
          iPad Retina (ipad)
            UDID                      = 63ADCBD0-CC88-4B45-ACDB-D8ADC41FAB9E
            Supports Watch Apps       = no
          iPad Air (ipad)
            UDID                      = 732182A7-703D-490E-B351-80947B40CC5A
            Supports Watch Apps       = no
          iPad Air 2 (ipad)
            UDID                      = 5E1EE089-43A2-4BAA-A35F-92FB6A1B7FCA
            Supports Watch Apps       = no
          iPad Pro (iPad Pro (12.9-inch)) (ipad)
            UDID                      = 6948DE4A-5C06-447E-9A34-D4F916F37D69
            Supports Watch Apps       = no
          iPhone 4s (iphone)
            UDID                      = FF04D0C4-E623-4B70-B8F9-FAC4AEF28B57
            Supports Watch Apps       = no
          iPhone 5 (iphone)
            UDID                      = EFBF21C3-A822-4908-A301-9D82DCDA186E
            Supports Watch Apps       = yes
          iPhone 5s (iphone)
            UDID                      = A1EBB20D-FAF2-48F4-9BBC-3954BEB5B57C
            Supports Watch Apps       = yes
          iPhone 6 Plus (iphone)
            UDID                      = 658C8A66-2764-4D8B-98EF-42A794EFFD7C
            Supports Watch Apps       = yes
          iPhone 6 (iphone)
            UDID                      = 08A68CD2-4480-45A4-9507-AFC33ECC788A
            Supports Watch Apps       = yes
          iPhone 6s (iphone)
            UDID                      = 4165B102-D44D-44F8-96C9-C096CBFFFFBC
            Supports Watch Apps       = yes
          iPhone 6s Plus (iphone)
            UDID                      = B506A68A-98B6-4A23-B2AE-A200F15834D3
            Supports Watch Apps       = yes
        
        9.3
          iPad 2 (ipad)
            UDID                      = AA3AA9EF-8BDC-4620-909F-AB04989358F4
            Supports Watch Apps       = no
          iPad Retina (ipad)
            UDID                      = 8A0EEFF3-5E7E-485A-90E3-CBEAEEF4DB50
            Supports Watch Apps       = no
          iPad Air (ipad)
            UDID                      = 47BBEFB4-3436-4D9B-BF50-A479868539AD
            Supports Watch Apps       = no
          iPad Air 2 (ipad)
            UDID                      = 9557293D-54F8-4CD0-BA86-02ACCA728ACA
            Supports Watch Apps       = no
          iPad Pro (iPad Pro (12.9-inch)) (ipad)
            UDID                      = ABD3803E-9E2B-4876-9B8D-AD5223519778
            Supports Watch Apps       = no
          iPhone 4s (iphone)
            UDID                      = 64084322-76C0-4686-9ECE-B9B3475B4067
            Supports Watch Apps       = no
          iPhone 5 (iphone)
            UDID                      = CD84205F-6EBF-4605-BDA2-4B1AE7DD5BBF
            Supports Watch Apps       = yes
          iPhone 5s (iphone)
            UDID                      = B4C26077-E604-4DD3-B04C-056B54E8E548
            Supports Watch Apps       = yes
          iPhone 6 Plus (iphone)
            UDID                      = EEE95D56-FB25-4E53-ADA6-3F28084D3E5A
            Supports Watch Apps       = yes
          iPhone 6 (iphone)
            UDID                      = BE37E4A3-E3E5-4369-A27A-67BEC4C091BB
            Supports Watch Apps       = yes
          iPhone 6s (iphone)
            UDID                      = 3B754FBB-0C6C-4265-BCC9-E8D3E39599B3
            Supports Watch Apps       = yes
          iPhone 6s Plus (iphone)
            UDID                      = 895B6611-6012-4365-9910-73109318FB59
            Supports Watch Apps       = yes
        
        11.2
          iPad Air (ipad)
            UDID                      = BE69D85B-C98B-4B6B-8665-97E23E4AD9B7
            Supports Watch Apps       = no
          iPad Air 2 (ipad)
            UDID                      = 0A703E91-74B6-4A8B-8E05-1A309FE84B57
            Supports Watch Apps       = no
          iPad (5th generation) (ipad)
            UDID                      = 84DA3CC5-44C8-451F-AAEF-A0E0DF0C7B9B
            Supports Watch Apps       = no
          iPad Pro (9.7-inch) (ipad)
            UDID                      = E1733F1E-0876-44D8-B231-D3D4EBBCE3DB
            Supports Watch Apps       = no
          iPad Pro (12.9-inch) (ipad)
            UDID                      = D050BF27-9979-4EE4-9813-60EC9F75DA04
            Supports Watch Apps       = no
          iPad Pro (12.9-inch) (2nd generation) (ipad)
            UDID                      = E8544213-13D7-4372-A87D-2C8A9A2D3144
            Supports Watch Apps       = no
          iPad Pro (10.5-inch) (ipad)
            UDID                      = 986C946E-8A6E-4D0A-A21E-C3FBF40E7D9C
            Supports Watch Apps       = no
          iPhone X (iphone)
            UDID                      = 14B7C06C-8E93-4BF6-80E3-A50FA59F7544
            Supports Watch Apps       = yes
          iPhone 8 (iphone)
            UDID                      = 0A4908CF-D235-4036-BA2A-9BFE9BF75AC4
            Supports Watch Apps       = yes
          iPhone 8 Plus (iphone)
            UDID                      = 737062C2-4245-457C-B10B-4A1667E1F6CA
            Supports Watch Apps       = yes
          iPhone 5s (iphone)
            UDID                      = 09754BBF-F21C-4AE9-8D5A-BF707175CED1
            Supports Watch Apps       = yes
          iPhone 6 Plus (iphone)
            UDID                      = C50EAA5D-35E0-46C7-9120-F773776D02FD
            Supports Watch Apps       = yes
          iPhone 6 (iphone)
            UDID                      = 3914D004-FF66-441D-A62A-31910FF75583
            Supports Watch Apps       = yes
          iPhone 6s (iphone)
            UDID                      = BCF66068-09F3-4969-A364-AE51402A4967
            Supports Watch Apps       = yes
          iPhone 6s Plus (iphone)
            UDID                      = 7E998C08-DCF0-468C-9941-509D4045063D
            Supports Watch Apps       = yes
          iPhone SE (iphone)
            UDID                      = 5B019B7E-3578-4638-AEA4-B1948F18DBF8
            Supports Watch Apps       = yes
          iPhone 7 (iphone)
            UDID                      = 02E270FB-B60C-44E5-8F7D-AC77A28CF042
            Supports Watch Apps       = yes
          iPhone 7 Plus (iphone)
            UDID                      = 411028DF-C46E-463D-A889-AAAC9C3AABC5
            Supports Watch Apps       = yes
        
        WatchOS Simulators
        4.2
          Apple Watch - 38mm (watch)
            UDID                      = 206D8F79-3C7B-4CCE-895B-9404F6843975
          Apple Watch - 42mm (watch)
            UDID                      = 6470A75A-51F4-478C-92D7-72CD8BFF99A0
          Apple Watch Series 2 - 38mm (watch)
            UDID                      = 60580405-65CC-44F5-BEAF-E1F75D7C09EB
          Apple Watch Series 2 - 42mm (watch)
            UDID                      = 0B0EA5B6-9F8E-4F83-BA9A-968A7A8158EE
          Apple Watch Series 3 - 38mm (watch)
            UDID                      = CAFA56D8-5C2A-4799-AAE8-FF4FB8418023
          Apple Watch Series 3 - 42mm (watch)
            UDID                      = 0228235F-DB51-4D56-A59B-5E00A018E2DF
        
        Connected iOS Devices
          None
        
        Android Issues
          !  Android API Android 8.0.0 (android-26) is too new and may or may not work with Titanium SDK
             7.0.1.
             The maximum supported Android API level by Titanium SDK 7.0.1 is API level 25.
        
          !  Android API Google APIs (Google Inc.:Google APIs:22) is too old and is no longer supported by
             Titanium SDK 7.0.1.
             The minimum supported Android API level by Titanium SDK 7.0.1 is API level 23.
        
        iOS Issues
          !  Unable to find any valid iOS adhoc provisioning profiles.
             This will prevent you from packaging apps for adhoc distribution.
             You will need to log in to http://appcelerator.com/ios-dist-certs with your Apple Developer
             account, then create, download, and install a profile.
        
  11. Sharif AbuDarda 2018-01-14

    Hello [~morinel], I also tried your sample code on iOS. I am unable to reproduce the issue. Below is my log
        -- Start simulator log -------------------------------------------------------
        [INFO]  sampro/1.0 (7.0.1.f5ae7e5)
        [INFO]  [object TiCompressionModule] loaded
        [INFO]  Extracting DB file /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/59F39ADE-F537-
        40D7-99F1-214AE8EC4AD1/data/Containers/Data/Application/84FD64D4-F7E6-4535-B24B-9CBD2893BF41/tmp/quickt
        ide2017.db.zip
        [INFO]  Archive file [/Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/59F39ADE-F537-40D7-
        99F1-214AE8EC4AD1/data/Containers/Data/Application/84FD64D4-F7E6-4535-B24B-9CBD2893BF41/tmp/quicktide20
        17.db.zip] successfully extracted
        [INFO]  Extracted file = 37295104 bytes
        [INFO]  Installing DB file /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/59F39ADE-F537-
        40D7-99F1-214AE8EC4AD1/data/Containers/Data/Application/84FD64D4-F7E6-4535-B24B-9CBD2893BF41/tmp/quickt
        ide2017.db
        [INFO]  Database installed as /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/59F39ADE-F5
        37-40D7-99F1-214AE8EC4AD1/data/Containers/Data/Application/84FD64D4-F7E6-4535-B24B-9CBD2893BF41/Library
        /Private Documents/quicktide2017.sql
        [INFO]  Removing temporary file /Users/sharifabudarda/Library/Developer/CoreSimulator/Devices/59F39ADE-
        F537-40D7-99F1-214AE8EC4AD1/data/Containers/Data/Application/84FD64D4-F7E6-4535-B24B-9CBD2893BF41/tmp/q
        uicktide2017.db.zip
        
    Can you try checking upgrade options in the studio and any possible upgrades? Thanks.
  12. Jeroen van Vianen 2018-03-18

    Just for posterity, I was able to resolve the issue by doing the following:
        ...
        /* Make sure the DB file is removed first */
        var db = Ti.Database.open(DB_NAME).remove();
        /* Don't forget to close the removed database... */
        db.close();
        ...
        

JSON Source