Closed StephanieLabaule closed 2 months ago
As your Issue seems to be a different one than the original issue mentioned in #47 ..
Could you post the stacktrace of the error?
To post the stacktrace you would need to connect the device to a computer and use adb logcat to access the logs. Then start the app and when it crashes it will print the reason.
You can also extract the database file via adb backup if nothing else works. This will at least save your data.
Hello, I am not familiar with Adb and Logcat. Is that what you want? Thank you.
--------- beginning of crash
10-15 00:38:27.805 813 924 I SFPerfTracer: triggers: (rate: 4:139) (1901494 sw vsyncs) (0 skipped) (0:13100285 vsyncs) (89:16682528)
10-15 00:38:28.096 813 926 I SFPerfTracer: triggers: (rate: 25:6696) (0 sw vsyncs) (0 skipped) (11:8002183 vsyncs) (13:10409902)
10-15 00:38:28.105 813 813 I SFPerfTracer: triggers: (rate: 10405:725867) (compose: 0:535) (post: 0:3508) (render: 0:3750) (13:9052412 frames) (14:10314546)
10-15 00:38:28.105 813 813 D SFPerfTracer: layers: (4:11) (StatusBar#0 (0xac4e3000): 9:1103168) (Magnification Overlay#0 (0xac4f2000): 1:65699) (com.android.systemui.ImageWallpaper#0 (0xac4fd000): 0:36947) (DimLayerController/Stack=0#0 (0xac452000): 0:59863) (NavigationBar#1 (0xac450000): 1:818888) (Sprite#0 (0xac464000): 0:1963) (DockedStackDim#0 (0xac03f000): 0:60) (com.android.launcher3/com.android.launcher3.CustomizationPanelLauncher#0 (0xac4e0000): 2:359) (Application Error: org.secuso.privacyfriendlytodolist#0 (0xac15f000): 0:20)- (ColorFade#0 (0xac45b000): 0:29)- (AOD#0 (0xac15f000): 0:5)-
10-15 00:38:28.591 2348 2427 I QCNEJ/CndHalConnector: -> SND notifyScreenStateChanged(true)
10-15 00:38:28.592 2348 2427 I QCNEJ/CndHalConnector: -> SND notifyScreenStateChanged(true)
10-15 00:38:28.606 1716 2948 V LocSvc_HIDL_Subscription_jni: screen_status_update
10-15 00:38:28.606 1716 2948 V LocSvc_HIDL_Subscription_jni: [screen_status_update][540] [HC] =>> [HS]
10-15 00:38:28.606 797 797 V LocSvc_HIDL_IzatSubscription: [screenStatusUpdate][575] [HS] <<<<= [HC]
10-15 00:38:28.607 1716 2948 V LocSvc_HIDL_Subscription_jni: Exit Result 0
10-15 00:38:28.612 2914 2914 I WeatherApp: Receiver action: android.intent.action.SCREEN_ON
10-15 00:38:28.615 28213 28213 I DeviceStatusMonitor: onReceive() : Action = android.intent.action.SCREEN_ON
10-15 00:38:28.622 2914 5304 I WeatherApp: is force update = false
10-15 00:38:28.626 2914 5304 I WeatherApp: No top city.
10-15 00:38:30.388 813 924 I SFPerfTracer: triggers: (rate: 4:139) (1901494 sw vsyncs) (0 skipped) (96:13100381 vsyncs) (98:16682626)
10-15 00:38:30.697 1716 1814 I WifiService: requestActivityInfo uid=1000
10-15 00:38:30.697 1716 1814 I WifiService: reportActivityInfo uid=1000
10-15 00:38:30.697 1716 1814 I WifiService: getSupportedFeatures uid=1000
10-15 00:38:30.699 1716 1814 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
10-15 00:38:30.699 1716 1814 E BatteryExternalStatsWorker: no controller energy info supplied for bluetooth
10-15 00:38:30.737 1716 1814 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=4606636414 mSleepTimeMs=-448896404 mIdleTimeMs=449030836 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=3506 mEnergyUsed=0}
10-15 00:38:50.115 1716 1966 D BatteryService: uevent={POWER_SUPPLY_VOLTAGE_NOW=4359715, POWER_SUPPLY_CHARGE_RATE=Normal, POWER_SUPPLY_HEALTH=Good, POWER_SUPPLY_CURRENT_NOW=2593, POWER_SUPPLY_PRESENT=1, SUBSYSTEM=power_supply, POWER_SUPPLY_TEMP=292, SEQNUM=541811, ACTION=change, POWER_SUPPLY_NAME=battery, POWER_SUPPLY_STATUS=Full, POWER_SUPPLY_CHARGE_COUNTER=2836480, POWER_SUPPLY_CAPACITY=100, DEVPATH=/devices/soc/qpnp-smbcharger-17/power_supply/battery}
10-15 00:38:51.463 813 813 I SFPerfTracer: triggers: (rate: 10405:725868) (compose: 0:535) (post: 0:3508) (render: 0:3750) (0:9052495 frames) (1:10314646)
10-15 00:38:51.463 813 813 D SFPerfTracer: layers: (4:8) (StatusBar#0 (0xac4e3000): 1:1103177) (Magnification Overlay#0 (0xac4f2000): 0:65699) (com.android.systemui.ImageWallpaper#0 (0xac4fd000): 0:36947) (DimLayerController/Stack=0#0 (0xac452000): 0:59863) (NavigationBar#1 (0xac450000): 0:818888) (Sprite#0 (0xac464000): 0:1963) (DockedStackDim#0 (0xac03f000): 0:60) (com.android.launcher3/com.android.launcher3.CustomizationPanelLauncher#0 (0xac4e0000): 0:441)
10-15 00:39:02.538 1716 3803 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.secuso.privacyfriendlytodolist/.view.SplashActivity bnds=[291,894][540,1160]} from uid 10044
10-15 00:39:02.539 799 867 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
10-15 00:39:02.561 1716 4062 I ActivityManager: Start proc 30112:org.secuso.privacyfriendlytodolist/u0a192 for activity org.secuso.privacyfriendlytodolist/.view.SplashActivity
10-15 00:39:02.675 1716 5870 I ActivityManager: START u0 {cmp=org.secuso.privacyfriendlytodolist/.view.MainActivity} from uid 10192
10-15 00:39:02.811 30112 30112 E DatabaseHelper: Updating table from 1 to 2
10-15 00:39:02.828 30112 30112 D DatabaseHelper: Looking for migration file: from_1_to_2.sql
10-15 00:39:02.828 30112 30112 D DatabaseHelper: Script found. Executing...
10-15 00:39:02.831 30112 30112 E SQLiteLog: (1) duplicate column name: in_trash
10-15 00:39:02.833 30112 30112 D AndroidRuntime: Shutting down VM
10-15 00:39:02.834 30112 30112 E AndroidRuntime: FATAL EXCEPTION: main
10-15 00:39:02.834 30112 30112 E AndroidRuntime: Process: org.secuso.privacyfriendlytodolist, PID: 30112
10-15 00:39:02.834 30112 30112 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.secuso.privacyfriendlytodolist/org.secuso.privacyfriendlytodolist.view.MainActivity}: android.database.sqlite.SQLiteException: duplicate column name: in_trash (code 1): , while compiling: ALTER TABLE todo_task ADD in_trash INTEGER NOT NULL DEFAULT 0;
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2861)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2943)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1630)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6626)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteException: duplicate column name: in_trash (code 1): , while compiling: ALTER TABLE todo_task ADD in_trash INTEGER NOT NULL DEFAULT 0;
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
10-15 00:39:02.834 30112 30112 E AndroidRuntime: at android.database.sqlite.SQLiteProgram.
This issue is almost 5 years old... But the cause still is interesting:
android.database.sqlite.SQLiteException: duplicate column name: in_trash (code 1): , while compiling: ALTER TABLE todo_task ADD in_trash INTEGER NOT NULL DEFAULT 0;
Column in_trash already did exist while the DB migration script from_1_to_2.sql tried to add this column. This lead to a crash of the app.
I have no idea why the DB migration script v1 -> v2 was started for a DB which seems to be at version 2 (because it has the new column in_trash).
@StephanieLabaule, do you still need a solution for that? If not, I would close the issue because in the mean time the DB layer of the app was rewritten (#108) and without an idea of the cause for that error its nearly impossible to create a fix.
Thank you for your response and explanations.
What I would like now is to recover my database. Could you tell me the name you give it, the path where it is located, and how to recover it?
I'm not professional, but I think I can get there with ADB and the right explanations.
Thank you and good day. Stephanie
Hello Stephanie,
the file is located at /data/data/org.secuso.privacyfriendlytodolist/databases/TodoDatabase.db
And adb pull /data/data/org.secuso.privacyfriendlytodolist/databases/TodoDatabase.db <absolute destination path on the PC>
should do the job.
But the result is Permission denied
.
I tried a few things, found copy db file with adb pull results in 'permission denied' error but finally I think without rooting the phone it will no be possible. Sorry...
What I can do is to not abort at DB migration if this error occurs (column already exists). Then hopefully the next release of the app will start again. But thats not sure. The root cause of your problem still is unknown.
Thank you for your help and your work. So I hope for the next version to recover my data.
Thanks again.
Hello @StephanieLabaule , I will close this issue for now to have no open issues at the release-milestone. Please re-open it (or create a new issue) if the upcoming release does not solve the problem. I think the release will be done "this summer". Best regards
Hello,
Like v2.1, v2.2, l'app crashes at start. https://github.com/SecUSo/privacy-friendly-todo-list/issues/47
I would like to find my tasks. Can you give me a method to find them? Where are they ? Thanks a lot.