Bug 511102 - "You can help us improving this application..." popup showing every time I start Discover
Summary: "You can help us improving this application..." popup showing every time I st...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kuserfeedback
Classification: Frameworks and Libraries
Component: Telemetry Provider (other bugs)
Version First Reported In: 6.19.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-10-25 16:09 UTC by John Veness
Modified: 2025-11-08 00:19 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.20
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Veness 2025-10-25 16:09:31 UTC
SUMMARY
For a few weeks now (so starting in 6.4.something, still present in 6.5.0), Discover keeps showing the popup at the bottom of the window about contributing. I'm sure it used to only show that once in a while - maybe only once ever (per user account).

STEPS TO REPRODUCE
1. Run Discover
2. View popup at bottom of window saying "You can help us improving this application by sharing statistics and participate in surveys" (which is terrible English by the way, but let's worry about that separately!), with a Contribute button
3. Wait for a short while
4. Observe popup disappears
5. Quit Discover
6. Run Discover again
7. Notice the popup appears again
8. This time, click the Contribute button, which opens System Settings > User Feedback, which is already set to Disabled
9. Quit System Settings
10. Quit Discover
11. Run Discover
12. Notice the popup again

OBSERVED RESULT
The "You can help us improving this application by sharing statistics and participate in surveys" popup appears every time I start Discover.

EXPECTED RESULT
The "You can help us improving this application by sharing statistics and participate in surveys" popup can appear the first time I start Discover, but never again, especially if User Feedback is set to Disabled.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20251022
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.4-1-default (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2025-10-29 19:39:03 UTC
This comes from discover/qml/Feedback.qml, but nothing there has changed in months. It'll be a regression in KUserFeedback, a regression in Qt, or a local issue on your system.

Moving to KUserFeedback for now.
Comment 2 Volker Krause 2025-10-30 16:11:29 UTC
https://invent.kde.org/frameworks/kuserfeedback/-/merge_requests/81 is what comes to mind as a recent change in this area.
Comment 3 John Veness 2025-10-30 20:26:04 UTC
If it's relevant, the contents of my ~/.local/state/UserFeedback.org.kde.discover file (which is dated from last time I run Discover) is:

[Source-applicationSourceName]
dataSourceCommonSettings\activeState=true

[Source-applicationVersion]
dataSourceCommonSettings\activeState=true

[Source-locale]
dataSourceCommonSettings\activeState=true

[Source-opengl]
dataSourceCommonSettings\activeState=true

[Source-platform]
dataSourceCommonSettings\activeState=true

[Source-qtVersion]
dataSourceCommonSettings\activeState=true

[Source-screens]
dataSourceCommonSettings\activeState=true

[Source-startCount]
dataSourceCommonSettings\activeState=true

[Source-usageTime]
dataSourceCommonSettings\activeState=true

[UserFeedback]
ApplicationStartCount=676
ApplicationTime=664571
LastEncouragement=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8d\x33\x4^R\x91\0)
LastSubmission=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8c\x44\x3\xb1\xda\xc4\0)
Comment 4 John Veness 2025-11-01 00:04:01 UTC
I have spent several hours troubleshooting this and I think I have narrowed this down to some very specific steps to reproduce:

1, Create a brand-new Linux user
2, Copy the above into ~/.local/state/UserFeedback.org.kde.discover
3, Run Discover
4, Notice the popup appears every time you launch Discover

The crazy thing, and the thing that took ages to work out, is that the problem will persist even if you delete ~/.local/state/UserFeedback.org.kde.discover. It turns out that a file ~/.config/KDE/UserFeedback.conf is created that contains just:

[UserFeedback]
LastEncouragement=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8d\x33\x4^R\x91\0)

You have to delete *both* ~/.local/state/UserFeedback.org.kde.discover and ~/.config/KDE/UserFeedback.conf at the same time (while Discover isn't running), to fix the issue.

This also implies that another set of reproducible steps is:

1, Create a brand-new Linux user
2, Create a ~/.config/KDE/UserFeedback.conf file containing:
[UserFeedback]
LastEncouragement=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8d\x33\x4^R\x91\0)
3, Run Discover
4, Notice the popup appears every time you launch Discover

As to how I got into this state in the first place, I don't know, but this is a user that I've had for quite a long time, since Plasma 5 times, so I imagine there must be other people in a similar state.
Comment 5 pallaswept 2025-11-01 04:54:58 UTC
Thanks for digging into it. I'm seeing this, too. It pops up very briefly, and disappears in less than a second. I have to really be quick to click the button. I also have feedback disabled, perhaps this is relevant?
Comment 6 Nicolas Fella 2025-11-05 19:20:54 UTC
I think I know what's going on, and it's not https://invent.kde.org/frameworks/kuserfeedback/-/merge_requests/81

relevant code is at https://invent.kde.org/frameworks/kuserfeedback/-/blob/master/src/provider/core/provider.cpp#L389

If the last encouragement was today the next one will be in 30 days. 30 days in milliseconds is enough to overflow int, causing a negative interval for the timer. Qt 6.10 changed the behavior of that (https://codereview.qt-project.org/c/qt/qtbase/+/613038) and sets the interval to 1ms, so we get the message immediately
Comment 7 John Veness 2025-11-05 19:36:54 UTC
Thanks for Discover-ing that :)

Out of interest, does that mean that before that change in Qt, the encouragement wasn't shown every 30 days either? Was it shown just once, then never again, maybe?
Comment 8 Bug Janitor Service 2025-11-05 19:43:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kuserfeedback/-/merge_requests/87
Comment 9 Nicolas Fella 2025-11-05 19:44:03 UTC
(In reply to John Veness from comment #7)
> Thanks for Discover-ing that :)
> 
> Out of interest, does that mean that before that change in Qt, the
> encouragement wasn't shown every 30 days either? Was it shown just once,
> then never again, maybe?

I'm not sure. Before Qt 6.10 the behavior wasn't well defined. It's possible that the encouragement never worked in that case
Comment 10 Nate Graham 2025-11-05 19:45:59 UTC
I suspect it never worked. I never saw it despite opting in.
Comment 11 John Veness 2025-11-05 19:48:47 UTC
My recollection is only seeing it very rarely, certainly less often than every 30 days. Possibly, I only ever saw it once ever per Linux user.

We might need to brace for possible complaints if people will now see it every 30 days!
Comment 12 Nicolas Fella 2025-11-06 10:12:07 UTC
Good question, actually. Volker, what's the intention behind the code?
Comment 13 Volker Krause 2025-11-06 16:08:13 UTC
(In reply to Nate Graham from comment #10)
> I suspect it never worked. I never saw it despite opting in.

It obviously wont show up at all if you have opted in to participate, it's meant to encourage people to do that, not bother those who already have.

The issue identified here would only break this permanently if you'd start Discover within the first 5 days of the 30 days period and keep it running indefinitely. There could of course be other issues hiding behind this one.

If you consider 30 days too often, it's Discover explicitly asking for that, so this can be easily changed there, the library has encouragements disabled by default.
Comment 14 pallaswept 2025-11-06 16:46:19 UTC
Just for the record: I test a lot of bugs, and throw a lot of errors that don't concern KDE devs and would amount to a torrent of misleading useless spam cluttering up the bugzilla. Trust me, you do not want me to provide user feedback/stats/crashdumps :D 

I contribute in other ways (testing lots of bugs!) but I do have it disabled for a good reason.

Meanwhile I don't use discover a lot, basically its role is to update plasmoids. Once every 30 days is almost every time for me.

Just offering that up for perspective of the intentionally opted-out user who isn't just being stingy. I've generally found that KDE is pretty good with not nagging me, so I'm sure this will be fine in the end.
Comment 15 Nicolas Fella 2025-11-07 15:23:45 UTC
Git commit 17679d4aacaa9f68400cfbd80e7ba46ef5cec4a4 by Nicolas Fella.
Committed on 07/11/2025 at 12:10.
Pushed by nicolasfella into branch 'master'.

Properly handling large timeouts for encouragement timer

If the last encouragement was recently then 30 days later is a long
time from now. Particularly enough so that when converting it to int
it will overflow and result in a negative number.

We then pass that negative value to QTimer. Since Qt 6.10 that results
in a timeout of 1ms, which causes the encouragement to trigger immediately.

To avoid that make sure to use 64bit integers for the handling, and use
QChronoTimer, which can properly handle timeouts too large for 32bit int

M  +11   -6    src/provider/core/provider.cpp
M  +5    -4    src/provider/core/provider_p.h

https://invent.kde.org/frameworks/kuserfeedback/-/commit/17679d4aacaa9f68400cfbd80e7ba46ef5cec4a4