Bug 453296 - Discover keeps claiming "Offline update failed: The transaction did not complete"
Summary: Discover keeps claiming "Offline update failed: The transaction did not compl...
Status: RESOLVED DUPLICATE of bug 445652
Alias: None
Product: Discover
Classification: Applications
Component: Updates (offline) (other bugs)
Version First Reported In: 5.24.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-02 13:19 UTC by postix
Modified: 2022-05-04 15:57 UTC (History)
3 users (show)

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


Attachments
Screenshot of the notification (121.54 KB, image/png)
2022-05-02 13:19 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2022-05-02 13:19:11 UTC
Created attachment 148514 [details]
Screenshot of the notification

SUMMARY

I use offline updates on this system and last week updating the kernel had failed due to a dying battery.
The issue could be fully resolved:
booting an older kernel, manually upgrading (dnf --refresh upgrade), regenerating the missing initramfs files and rebooting. 

However, Discover still annoys on every login that
```
Offline update failed
The update of 1 package has failed.
The transaction did not complete.
```

Clicking on "Update system" opens Discover, which refreshes the repository list and then displays packages to be updated, but non of these are related to the ominous "1 package" from the error message.

It seems Discover has set an flag for the failed offline update but is unable to detect that it needs to be cleared.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.17.4-200.fc35.x86_64 (64-bit)
Graphics Platform: X11
Comment 1 postix 2022-05-02 13:24:04 UTC
A `sudo pkcon refresh force && systemctl reboot` has not resolved the issue either.
Comment 2 postix 2022-05-02 13:31:57 UTC
Neither a `sudo pkcon update && sudo pkcon refresh force && systemctl reboot` helped.
`pkcon update` said that no packages needed an update.
Comment 3 postix 2022-05-02 13:38:22 UTC
Invalidating the cache:

`mv ~/.cache/discover ~/.cache/discover.bak`
`mv ~/.cache/discoverupdate ~/.cache/discoverupdate.bak`

followed by a reboot did not help, too.
Comment 4 Nate Graham 2022-05-03 16:34:48 UTC
Can you paste the output of `ls /var/lib/PackageKit/`?
Comment 5 postix 2022-05-03 17:07:19 UTC
(In reply to Nate Graham from comment #4)
> Can you paste the output of `ls /var/lib/PackageKit/`?

```
exa /var/lib/PackageKit/
offline-update-competed  transactions.db
```

Here indeed lies the culprit:

```
cat /var/lib/PackaeKit/offline-update-competed
[PackageKit Offline Update Results]
Success=false
ErrorCode=failed-initialization
ErrorDetails=The transaction did not complete
````

So is this an upstream issue of PackageKit not noticing that the status has changed or failing to update the status?
Comment 6 Nate Graham 2022-05-03 17:10:14 UTC
If you open Discover, do you get offered the same set of updates again?

If yes, then the transaction really did fail to complete, for some reason.

If no, then the bug is in either PackageKit or Discover failing to delete that file (not sure which is responsible).
Comment 7 postix 2022-05-03 17:54:05 UTC
(In reply to Nate Graham from comment #6)
> If you open Discover, do you get offered the same set of updates again?

Nope, after updating everything and rebooting Discover shows the notification and opening it says "No updates available".

 > If no, then the bug is in either PackageKit or Discover failing to delete that file (not sure which is responsible).
:)
Comment 8 Nate Graham 2022-05-04 15:57:51 UTC

*** This bug has been marked as a duplicate of bug 445652 ***