Bug 411983 - drkonqi fails to send a bug report about Plasma crash: "Did not receive a token"
Summary: drkonqi fails to send a bug report about Plasma crash: "Did not receive a token"
Status: RESOLVED FIXED
Alias: None
Product: drkonqi
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-16 22:07 UTC by Patrick Silva
Modified: 2019-09-25 10:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (40.29 KB, image/jpeg)
2019-09-16 22:07 UTC, Patrick Silva
Details
screenshot, broken plasma (45.26 KB, image/png)
2019-09-23 15:59 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-09-16 22:07:04 UTC
Created attachment 122684 [details]
screenshot

SUMMARY
As we can see in the attached screenshot, drkonqi fails to send a bug report
about Plasma crash and shows an error message. This happened on Wayland if it matters.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.63.0
Qt Version: 5.12.3
Comment 1 Harald Sitter 2019-09-23 12:45:49 UTC
How long did it take you to get through the dialog? Did you change your bugzilla password in the mean time? Can you reproduce this? 

There must be more going on here. That error only appears when your session has timed out and drkonqi tries to login again (automatically).
Comment 2 Harald Sitter 2019-09-23 13:14:57 UTC
I've just tried the scenario where the token simply timed out, drkonqi managed to correctly log in again and refresh the token. So, there is definitely some piece of information missing here.
Comment 3 Patrick Silva 2019-09-23 14:57:12 UTC
On neon unstable edition this problem occurs when I try to report plasma crashes.
drkonqi can report crash with gwenview, for example, without any problem.

I can't reproduce this bug on Plasma 5.17 beta. 
I reported a Plasma crash with this beta release on Arch Linux without any problem a few minutes ago.
Comment 4 Harald Sitter 2019-09-23 15:15:46 UTC
Is it reproducible?

Right now the drkonqi in neon unstable is equal to 5.17 beta. What's more, I don't see why this wouldn't work for plasma but other piece of software work... drkonqi has no differentiation between different software whatsoever.
Comment 5 Patrick Silva 2019-09-23 15:25:13 UTC
yes, it's reproducible.
But currently plasma is broken on my neon unstable, task manager does not load and my wallpaper was replaced with a black screen. Furthermore, several KCMs do not open because a problem with some module. Maybe this explains why drkonqi can not only report plasma crashes.
Comment 6 Harald Sitter 2019-09-23 15:32:39 UTC
It's not impossible that the general brokenness is the cause, if it was it would still apply to all software. As I said, there is nothing that makes plasma special from a drkonqi point of view.

Since it is reproducible there may be a way to get more useful data though...

Please add the following to your /etc/environment

QT_LOGGING_RULES="*=true"
KDE_FORK_SLAVES=1

and then logout and in again, crash plasmashell and try to file the bug report. Immediately after the error copy your ~/.local/share/sddm/wayland-session.log (I think that's the path anyway_. It probably contains your password, so you want to strip that and then either attach it here or send it to me directly by mail if you want to be extra careful not to leak sensitive data that may be in the log.
The log should contain the actual network transfer with bugzilla and give an idea why exactly things are going wrong.
Comment 7 Patrick Silva 2019-09-23 15:59:19 UTC
Created attachment 122821 [details]
screenshot, broken plasma

currently drkonqi does not say "Did not receive a token".
As we can see in the attached screenshot, it just says "error sending the crash report".
I have just sent you the requested log to your email.
Comment 8 Harald Sitter 2019-09-23 16:22:41 UTC
Thanks for the log there are a bunch of things I can follow up on.

The error you see is a direct result of the API coming back with 404 

> kf5.kio.kio_http: "HTTP/1.1 404 Not Found"
> kf5.kio.kio_http: QUrl("https://bugs.kde.org/rest/bug?token=xx") response code:  404 previous response code: 0

although it really shouldn't, so that needs investigating.

Additionally I'm noticing that your requests have a Cookie header

> kf5.kio.kio_http: "Cookie: Bugzilla_login_request_cookie=xx"

although they really shouldn't. So, my current theory is that your original issue may have to do with the Cookie thing, and who knows maybe even the 404. I'd guess KIO auto-injects the cookie from older drkonqi versions. I'll need to investigate this a bit.

Out of interest: what happens when you click retry a bunch of times? Does it eventually work or just stay broken?
Comment 9 Patrick Silva 2019-09-23 16:38:53 UTC
It stays broken. After a few clicks on "Retry" button I got "Did not receive a token" error again.
Comment 10 Harald Sitter 2019-09-25 09:58:52 UTC
The problem in fact is that plasmashell has no "unspecified" version on bugzilla which is the default drkonqi assumes is always there. That supposedly needs some fail-safe put in place.
Comment 11 Harald Sitter 2019-09-25 10:50:48 UTC
Git commit b769764b4727affd05d00d8b7d63053871908365 by Harald Sitter.
Committed on 25/09/2019 at 10:44.
Pushed by sitter into branch 'Plasma/5.17'.

fix default version selection to allow for renamed "unspecified" versions

Summary:
plasmashell for example has a "master" instead of "unspecified". if we
still tried to file a bug against "unspecified" bugzilla will throw rather
unhelpful errors. instead as a fallback to finding a "proper" version, make
sure to set the "default" to something sane. if the hardcoded default
doesn't map to an actual version as per the API we pick the lowest possible
id and file against that instead. seeing as you cannot remove versions this
should technically be the "unspecified" version no matter what it was
renamed to.

Test Plan: can file bugs against plasmashell even when kcrash passed an empty or unmapped version

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24214

M  +14   -1    src/bugzillaintegration/productmapping.cpp

https://commits.kde.org/drkonqi/b769764b4727affd05d00d8b7d63053871908365