Bug 444475 - can't find music on Android due to missing sqlite dependency
Summary: can't find music on Android due to missing sqlite dependency
Status: CONFIRMED
Alias: None
Product: Elisa
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Android Android 11.x
: HI normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
: 451344 461290 469377 473004 476363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-27 07:51 UTC by aronkvh
Modified: 2023-11-02 11:33 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aronkvh 2021-10-27 07:51:27 UTC
SUMMARY
Elisa can't find my music, I tried the filesystem and os search 

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-10-28 15:50:13 UTC
Can you find it with `baloosearch [some song filename]`?
Comment 2 aronkvh 2021-10-28 16:43:26 UTC
(In reply to Nate Graham from comment #1)
> Can you find it with `baloosearch [some song filename]`?

How can I do that on android?
Comment 3 Nate Graham 2021-10-28 17:16:35 UTC
However you normally get a terminal on Android, I guess.

However you said that Elisa can't find your music even when you use the filesystem search feature which doesn't use baloo at all, so I guess this was mis-filed to Baloo. Moving back to Elisa since the fault is more likely to be there.
Comment 4 Jack Hill 2022-04-10 11:29:25 UTC
Can confirm. When I click Hamburger -> Files, the app just displays the rotating loading symbol and doesn't list any files.

It also doesn't list anything under Hamburger -> Tracks.

Tried with flac, ogg, and mp3.
Comment 5 Jack Hill 2022-04-10 11:29:53 UTC
Forgot to mention I'm using Android 12 with CalyxOS 3.4.0
Comment 6 Jack Hill 2022-04-10 11:32:16 UTC
*** Bug 451344 has been marked as a duplicate of this bug. ***
Comment 7 Jack Hill 2022-06-13 14:35:02 UTC
After running `adb logcat` and pressing "Scan for New Music" I get these lines

    06-13 15:24:37.089 21094 21128 D elisa   : org.kde.elisa.database: transaction failed QSqlError("", "Driver not loaded", "Driver not loaded") "Driver not loaded"
    06-13 15:24:37.092 21094 21114 W elisa   : qrc:/android_rcc_bundle/qml/org/kde/kirigami.2/private/globaltoolbar/BreadcrumbControl.qml:17:5: Unable to assign [undefined] to QQuickItem*

so probably an issue with the database? I get the same two errors if I press "Reset Databse and Re-Scan Everything". This happens for the fast native indexer and for scanning the filesystem directly.
Comment 8 Matthieu Gallien 2022-06-13 15:16:17 UTC
Unfortunately, I can reproduce but so far lacked time to really work on a fix.

Will try my best in the following days.

Best regards
Comment 9 luzanlu382 2022-10-06 21:08:54 UTC
I can reproduce this on Android 9 with Elisa version 22.11.70. 

sudo logcat | grep kde
10-06 15:07:21.716 29777 29829 D elisa   : org.kde.elisa.database: transaction failed QSqlError("", "Driver not loaded", "Driver not loaded") "Driver not loaded"
10-06 15:07:21.720 29777 29794 W elisa   : qrc:/android_rcc_bundle/qml/org/kde/kirigami.2/private/globaltoolbar/BreadcrumbControl.qml:17:5: Unable to assign [undefined] to QQuickItem*
Comment 10 Jack Hill 2023-07-07 18:46:45 UTC
*** Bug 461290 has been marked as a duplicate of this bug. ***
Comment 11 Jack Hill 2023-07-16 10:40:59 UTC
*** Bug 469377 has been marked as a duplicate of this bug. ***
Comment 12 Jack Hill 2023-08-07 10:52:28 UTC
*** Bug 473004 has been marked as a duplicate of this bug. ***
Comment 13 Stuart Dilts 2023-09-04 20:35:35 UTC
Based on other places on the web, and the above error message, the problem seems to be that the appropriate .so file for the SQLite driver either isn't being included in the build or isn't found during runtime.

The androiddeployqt tool seems to control which qt libraries get included in the build. According to https://doc.qt.io/qt-5/deployment-android.html, it should be able to tell us if the dependency is detected correctly and if it's being included in the build:

"If you are wondering why a particular plugin is not included automatically, you can run androiddeployqt with the --verbose option to get the list of missing dependencies for each excluded plugin. You can achieve the same in  Qt Creator by ticking the Verbose output check box in the Projects > Build Steps > Build Android APK > Advanced Actions."

Looking at the build output for the latest build, (https://binary-factory.kde.org/job/Elisa_Nightly_android-arm/806/console), I see the following output:

> -- Skipping /home/user/Craft/BinaryFactory/android-arm-clang/plugins/sqldrivers/libplugins_sqldrivers_qsqlite_armeabi-v7a.so. It has unmet dependencies: lib/libsqlite3.so.

As a wild guess, will adding a dependency to libsqlite in the CMAKE file resolve the issue?
Comment 14 Stuart Dilts 2023-09-04 21:59:36 UTC
It could also be that the correct sqlite dependency is missing from the build environment, which is probably more likely.
Comment 15 Nate Graham 2023-09-05 18:48:01 UTC
Wanna submit a merge request to fix it?
Comment 16 Jack Hill 2023-11-02 10:34:49 UTC
*** Bug 476363 has been marked as a duplicate of this bug. ***