Bug 390236

Summary: Fails to install KNS resource, transaction never finishes
Product: [Applications] Discover Reporter: Patrick Silva <bugseforuns>
Component: KNewStuff BackendAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: edkasp, leinir, nate
Priority: NOR    
Version: 5.12.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: unknown API error
bug recreation

Description Patrick Silva 2018-02-10 20:17:47 UTC
Created attachment 110516 [details]
unknown API error

sometimes installation from kde store (icon theme, for example) fails and discover shows an error about API (see screenshot).
So "task" shows progress 0% in sidebar and I can't cancel failed installation because nothing happens when I click button to do it.
I need to kill discover using ksysguard.
This problem occurs on Arch Linux and neon dev unstable.
Comment 1 Edmund Kasprzak 2018-02-11 17:46:48 UTC
Created attachment 110546 [details]
bug recreation

bug recreation
Comment 2 Edmund Kasprzak 2018-02-11 17:48:40 UTC
Comment on attachment 110546 [details]
bug recreation

I can confirm this behavior on Neon Git Stable 20180210 (Plasma 5.12.0, KF 5.43.0, Qt 5.9.3).

Discover window cannot be closed normally  as it states "there are tasks that need to be done".

Easily reproducible on mentioned example (AwOken icon pack) and I think this addon causes the problem.
Currently, there is nothing to download there - https://store.kde.org/p/1012537
0 active download, 2 archived, that's why probably discover fails to download addon, as it's not accessible.

Details in attachment
Comment 3 Aleix Pol 2018-03-12 15:45:39 UTC
Git commit 622b94e370894161258178357400f07be0eac6be by Aleix Pol.
Committed on 12/03/2018 at 15:45.
Pushed by apol into branch 'Plasma/5.12'.

Simplify KNSTransaction creation

Have the action done within the transaction and delayed, to make sure
it happens well after adding it to the TransactionModel.

M  +9    -4    libdiscover/backends/KNSBackend/KNSBackend.cpp

https://commits.kde.org/discover/622b94e370894161258178357400f07be0eac6be