A great deal of the time, when you click the "Install" button to install an app, Discover doesn't actually install the app and instead performs a check for updates. Once this has completed, only *then* will clicking on the Install button a second time actually install the app. We should always install the app on the first click no matter what needs to happen on the backend. I'm skeptical that updates need to be fetched in the first place before you can install an app, but if this is absolutely mandatory, we should make sure updates are fetched on launch so you can install apps with no drama.
Created attachment 117411 [details] pkmon log depicting me having to click twice on the install button to install KTorrent This is trivially reproducible in Neon. Any time "Checking for updates" is displayed at the bottom of the globaldrawer, just click "Install" on any app delegate or page. Instead of installing the app, Discover completes the current update checking process. Only once this is done does the Install button actually install the app. We should disable the "Install" buttons while Discover is checking for updates, or (very preferably) allow installing apps anyway. I'm attaching a pkmon log that depicts what happens when I try to install KTorrent. The first click on "Install" doesn't do anything, but the second one (after Discover has finished checking for updates) works normally.
This looks very much like a backend's issue, it seems like we ask to install a package and the transaction changes opinion over time. I've been testing it on ArchLinux like you reported but haven't been able to reproduce there, can you confirm this?
Yeah I just trivially reproduced it on Manjaro with Plasma 5.15.1 by opening Discover and immediately clicking on the Install button for Digikam on the Featured page. The button depresses and all the other Install buttons become disabled. The drawer's status thingy on the bottom then says "Checking for updates" and the installation does not happen, and the install buttons all become re-enabled. Thereafter, clicking on any of the buttons will actually perform the installation as requested.
*** Bug 405020 has been marked as a duplicate of this bug. ***
*** Bug 407825 has been marked as a duplicate of this bug. ***
*** Bug 408729 has been marked as a duplicate of this bug. ***
Git commit 9f56ce1543bd1234d5f0107387675bde682e00b3 by Aleix Pol. Committed on 20/06/2019 at 16:19. Pushed by apol into branch 'master'. packagekit: add debug information for the attached bug M +14 -3 libdiscover/backends/PackageKitBackend/PKTransaction.cpp https://commits.kde.org/discover/9f56ce1543bd1234d5f0107387675bde682e00b3
This was fixed recently.