Bug 407786 - [kio_tags] improve the error/log message when there's an issue with the baloo search/tags backend
Summary: [kio_tags] improve the error/log message when there's an issue with the baloo...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.57.0
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-21 06:28 UTC by Erik Quaeghebeur
Modified: 2025-03-24 22:58 UTC (History)
5 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 Erik Quaeghebeur 2019-05-21 06:28:35 UTC
SUMMARY
In my logs, I get the message

kf5.kio.kio_tags: tag fetch failed: "Failed to open the database"

repeated quite a number of times. With some context:

kdeinit5[16305]: kf5.kio.kio_tags: tag fetch failed: "Failed to open the database"
kdeinit5[16305]: kf5.kio.kio_tags: "tags:/" list() invalid url
kdeconnectd[4701]: kf5.kio.core: "Kon de map tags:/ niet binnengaan."

(translation of the last line: "Could not enter the folder tags:/.")

So there may be a connection to kdeconnect.

There are no known issues, so therefore marking this as minor.

STEPS TO REPRODUCE
1. boot system
2. look at logs

OBSERVED RESULT
Find the error message, repeatedly.

EXPECTED RESULT
No error messsage.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.15.5 
KDE Frameworks Version: 5.57.0
Qt Version: 5.11.3
Comment 1 Christoph Feck 2019-06-14 10:13:46 UTC
What happens if you use the tags:/ URL in Dolphin?
Comment 2 Erik Quaeghebeur 2019-06-14 14:03:14 UTC
(In reply to Christoph Feck from comment #1)
> What happens if you use the tags:/ URL in Dolphin?
Nothing, but in the logs, I find (newest first):

jun 14 16:00:48 machine kdeinit5[9200]: kf5.kio.kio_tags: "tags:/" stat() invalid url
jun 14 16:00:48 machine kdeinit5[9200]: kf5.kio.kio_tags: tag fetch failed: "Failed to open the database"
jun 14 16:00:43 machine kdeinit5[9149]: kf5.kio.kio_tags: "tags:/" list() invalid url
jun 14 16:00:43 machine kdeinit5[9149]: kf5.kio.kio_tags: tag fetch failed: "Failed to open the database"
jun 14 16:00:43 machine kdeinit5[9200]: kf5.kio.kio_tags: "tags:/" stat() invalid url
jun 14 16:00:43 machine kdeinit5[9200]: kf5.kio.kio_tags: tag fetch failed: "Failed to open the database"
Comment 3 Frederick Zhang 2019-06-23 08:40:35 UTC
Can confirm the same error with Plasma 5.16.1, Framework 5.59.0, Qt 5.12.4
Comment 4 Michael K. 2019-06-27 09:23:40 UTC
Same here, tags don't work anymore:

2019-06-27T11:19:24.512296+02:00 pc-linux plasmashell[2734]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:347: Unable to assign [undefined] to int
2019-06-27T11:19:24.512449+02:00 pc-linux plasmashell[2734]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:375: TypeError: Type error
2019-06-27T11:19:24.550596+02:00 pc-linux kwin_x11[2723]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 24682, resource id: 146800701, major code: 18 (ChangeProperty), minor code: 0
2019-06-27T11:19:26.177348+02:00 pc-linux kdeinit5[20788]: kf5.kio.core: Invalid URL: QUrl("")
2019-06-27T11:19:26.177531+02:00 pc-linux kdeinit5[20788]: message repeated 2 times: [ kf5.kio.core: Invalid URL: QUrl("")]
2019-06-27T11:19:26.374856+02:00 pc-linux kdeinit5[23248]: kf5.kio.core: Invalid URL: QUrl("")
2019-06-27T11:19:26.385746+02:00 pc-linux kdeinit5[23248]: message repeated 5 times: [ kf5.kio.core: Invalid URL: QUrl("")]
2019-06-27T11:19:29.214088+02:00 pc-linux plasmashell[2734]: KActivitiesStats( 0x5642a397d590 ) ResultModelPrivate::onResultScoreUpdated  result added: "/home/linux" score: 40269.8 last: 1561627015 first: 1556530854

Operating System: openSUSE Tumbleweed 20190623
KDE Plasma Version: 5.16.1
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.3
Kernel Version: 5.1.7-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-4590 CPU @ 3.30GHz
Memory: 15,5 GiB
Comment 5 Michael K. 2019-06-28 04:56:53 UTC
Now it works again! Haven't changed anything. Strange
Comment 6 Frederick Zhang 2019-08-16 13:57:37 UTC
Ok... The reason in my case is that I disabled Baloo and it turned out that the tag function relies on Baloo to work. (Well, it seems that there are actually 2 flavours: the xattr implementation, which relies on Baloo; the Nepomuk custom database implementation, which doesn't need Baloo but was unstable hence deprecated. Correct me if I misunderstood something.)
Comment 7 Ahmad Samir 2019-11-20 10:01:31 UTC
Please ensure you have the baloo*-file package installed. The packaging schema could differ on your distro, so it's whatever package that has these files:
/usr/bin/baloo_file
/usr/bin/baloo_file_extractor
/usr/bin/balooctl

Perhaps we should look into improving the error/log message, make it suggest installing the needed baloo* package(s).
Comment 8 Erik Quaeghebeur 2019-11-20 10:34:15 UTC
(In reply to Ahmad Samir from comment #7)
> Please ensure you have the baloo*-file package installed.
These are installed.

(In reply to Frederick Zhang from comment #6)
> Ok... The reason in my case is that I disabled Baloo and it turned out that
> the tag function relies on Baloo to work.
And this turns out to also be the reason for me.

(In reply to Ahmad Samir from comment #7)
> Perhaps we should look into improving the error/log message, make it suggest
> installing the needed baloo* package(s).
Well, I think it should at least mention baloo. Perhaps at the end ‘(Is baloo inactive?)’ or something like that. I suggest closing this bug once the log messages have been improved.

(In reply to Christoph Feck from comment #1)
> What happens if you use the tags:/ URL in Dolphin?
Nothing, even though I added a tag to a file and force-indexed that file.
Comment 9 Ahmad Samir 2019-11-20 12:34:51 UTC
(In reply to Erik Quaeghebeur from comment #8)
> (In reply to Ahmad Samir from comment #7)
> > Please ensure you have the baloo*-file package installed.
> These are installed.
> 

I don't usually have baloo enabled, so I got the messages mixed up. There are two places where the log messages are coming from:
- "Failed to open the database", baloo is properly installed but isn't enabled:
https://phabricator.kde.org/D25421

- kio_tags complaining about not being able to open "tags:/" this could be caused by not having baloo-file package installed.
Comment 10 Erik Quaeghebeur 2019-11-20 12:44:09 UTC
(In reply to Ahmad Samir from comment #9)
> - kio_tags complaining about not being able to open "tags:/" this could be
> caused by not having baloo-file package installed.
I had both that message and the package installed (but disabled). Enabling baloo has eliminated both types of errors.
Comment 11 Ahmad Samir 2019-11-20 14:15:30 UTC
(In reply to Erik Quaeghebeur from comment #10)
> (In reply to Ahmad Samir from comment #9)
> > - kio_tags complaining about not being able to open "tags:/" this could be
> > caused by not having baloo-file package installed.
> I had both that message and the package installed (but disabled). Enabling
> baloo has eliminated both types of errors.

I meant kio.core that was complaining (not kio_tags).

With a fresh user account:
- Baloo is enabled by default
- Make sure baloo5-file isn't installed then open dolphin from terminal:
kf5.kio.core: "Couldn't enter folder tags:/"