Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caused by: net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master; #1

Closed
Cmahjong opened this issue Mar 26, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Cmahjong
Copy link

Cmahjong commented Mar 26, 2022

Caused by: net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
at net.sqlcipher.database.SQLiteCompiledSql.native_compile(Native Method)
at net.sqlcipher.database.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:91)
at net.sqlcipher.database.SQLiteCompiledSql.(SQLiteCompiledSql.java:64)
at net.sqlcipher.database.SQLiteProgram.(SQLiteProgram.java:91)
at net.sqlcipher.database.SQLiteQuery.(SQLiteQuery.java:48)
at net.sqlcipher.database.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:60)
at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:2016)
at net.sqlcipher.database.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1902)
at net.sqlcipher.database.SQLiteDatabase.keyDatabase(SQLiteDatabase.java:2673)
at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(SQLiteDatabase.java:2603)
at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1247)
at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1322)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:166)
at com.commonsware.cwac.saferoom.Helper$OpenHelper.getWritableSupportDatabase(Helper.java:172)
at com.commonsware.cwac.saferoom.Helper.getWritableDatabase(Helper.java:82)
at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
at co_a.co_c.co_a.co_a.co_a.co_b.co_b.co_b(AnalyticsDao_Impl.java:3)
at co_a.co_c.co_a.co_a.co_a.co_a.co_f(AnalyticsDatabaseController.java:2)
at co_a.co_c.co_a.co_a.co_a.co_a.co_a(AnalyticsDatabaseController.java:10)
at co_a.co_c.co_a.co_a.co_b.co_a.init(AnalyticsEngine.java:8)
at dji.v5.manager.SDKManager.init(SDKManager.java:7)
at com.silver.drone.common.BaseMainActivityVm.registerApp(BaseMainActivityVm.kt:25)
at com.silver.drone.MainActivity.startSDKRegistration(MainActivity.kt:158)
at com.silver.drone.MainActivity.initDrone(MainActivity.kt:150)
at com.silver.drone.MainActivity.initViewModel(MainActivity.kt:119)
at com.silver.drone.MainActivity.initView(MainActivity.kt:104)
at com.silver.base.BaseActivity.onCreate(BaseActivity.kt:37)
at android.app.Activity.performCreate(Activity.java:8000)
at android.app.Activity.performCreate(Activity.java:7984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3464)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3643) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2105) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7700) 
gradle

//大疆
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.room:room-runtime:2.4.2'
implementation 'com.commonsware.cwac:saferoom.x:1.3.0'
implementation 'androidx.room:room-rxjava2:2.4.2'
implementation 'org.java-websocket:Java-WebSocket:1.5.1'
kapt 'androidx.room:room-compiler:2.4.2'
implementation "com.dji:library-networkrtk-helper:2.0.2"
compileOnly files('libs/aircraft-provided-5.0.0_beta1_322.jar')
implementation files('libs/aircraft-release-5.0.0_beta1_322_sec.aar')
runtimeOnly files('libs/networkImp-release-5.0.0_beta1_322.aar')

@Cmahjong Cmahjong changed the title so库报错 Caused by: net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master; Mar 27, 2022
@DanLongChen
Copy link

May I ask what Android device you are using when this problem occurs? Have you used our sdk sample?

@Cmahjong
Copy link
Author

yes , Android device,look your sdk sample impoded 5.0.0_beta1,then occurs this problem

@DJI-William
Copy link

We cannot reproduce your issue. Coud you please

  1. Try the current Sample. We have updated it already.
  2. Please tell use your Android device model and version.

@DJI-William DJI-William self-assigned this Jul 15, 2022
@DJI-William DJI-William added the question Further information is requested label Jul 15, 2022
@eric-dk
Copy link

eric-dk commented Aug 3, 2022

Steps-to-reproduce:

  1. Set up empty project that successfully registers DJI V4 MSDK
  2. Launch app onto any Android device
  3. Upgrade said project to DJI V5 MSDK
  4. Launch app onto said Android device without uninstalling first

Expected:

  • App launches and successfully registers DJI V5 MSDK

Actual:

  • Registration failure due to the above exception

Workaround:

Call the following before registering DJI V5 MSDK:

context.deleteDatabase("DJIAnalytics.db")

I suspect there has been a schema change in the analytics database between V4 and V5.

@DJI-William
Copy link

Steps-to-reproduce:

  1. Set up empty project that successfully registers DJI V4 MSDK
  2. Launch app onto any Android device
  3. Upgrade said project to DJI V5 MSDK
  4. Launch app onto said Android device without uninstalling first

Expected:

  • App launches and successfully registers DJI V5 MSDK

Actual:

  • Registration failure due to the above exception

Workaround:

Call the following before registering DJI V5 MSDK:

context.deleteDatabase("DJIAnalytics.db")

I suspect there has been a schema change in the analytics database between V4 and V5.

Much appreciated, I will infor mthe dev team about this issue.

@DJI-William DJI-William added bug Something isn't working and removed question Further information is requested labels Aug 4, 2022
@DJI-William
Copy link

@Cmahjong and @eric-dk , we have fixed this issue, wait until 5.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants