plasma-discover "cannot refresh cache whilst offline"

Bug #1945030 reported by Michael Navigator
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Plasma Discover
Won't Fix
Medium
plasma-discover (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I am unable to install regular packages from Ubuntu repositories through Plasma Discover front end, throwing the error "no network connection available" It's also unable to search and install updates throwing the error "cannot refresh cache whilst offline" at startup.

However, snaps install just fine, and I can also install packages through apt or Synaptic package manager.

From what I gather after a google search, it's a conflict between packagekit and networkmanager on Ubuntu. Some relevant bug reports I found
https://bugs.kde.org/show_bug.cgi?id=412834
https://github.com/blue-systems/plasma-issues/issues/225
https://github.com/PackageKit/PackageKit/issues/336

Ubuntu release:
Description: Ubuntu Impish Indri (development branch)
Release: 21.10

Package name:
plasma-discover:
  Instalado: 5.22.5-0ubuntu1
  Candidato: 5.22.5-0ubuntu1
  Tabela de Versão:
 *** 5.22.5-0ubuntu1 500
        500 http://pt.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        100 /var/lib/dpkg/status

What I expected to happen:
Discover is able to search and apply for updates and install regular Ubuntu packages

What happened instead:
Discover cannot search for updates and install regular Ubuntu packages for apparently not detecting network connection.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: plasma-discover 5.22.5-0ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-16.16-generic 5.13.13
Uname: Linux 5.13.0-16-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu69
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sat Sep 25 03:14:45 2021
InstallationDate: Installed on 2021-09-24 (0 days ago)
InstallationMedia: Kubuntu 21.10 "Impish Indri" - Beta amd64 (20210924)
SourcePackage: plasma-discover
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Harry Coin (hcoin) wrote :

SUMMARY
"Cannot refresh cache whilst offline" -- except I'm not offline, obviously since I'm filing this report.

STEPS TO REPRODUCE
1. Click the icon indicating updates are available in the task bar
2. Click 'check for updates'.
3. Notice it gives an error message and does nothing of any use.

System is the latest Ubuntu 'eoan', though this bug has been around for a long time.

My system's network is configured via systemd/networkd as is indicated in /etc/netplan.
I don't use the network manager for anything. This bug appears whether the disused network-manager is enabled or disabled in systemd, or is running or not running.

OBSERVED RESULT

EXPECTED RESULT

SOFTWARE/OS VERSIONS
Windows:
macOS:
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
Qt Version:

ADDITIONAL INFORMATION

Revision history for this message
In , Nate-b (nate-b) wrote :

> I don't use the network manager for anything.

That's the problem. Your configuration is unsupported (not by Discover but by PackageKit itself). If you don't want to use NetworkManager, you need to remove it. If it's installed, you need to use it.

Not my decision, but this is the way the PackageKit people believe it ought to behave. See https://github.com/hughsie/PackageKit/issues/336

Revision history for this message
Michael Navigator (cbnavigator) wrote :
Revision history for this message
In , Michael Navigator (cbnavigator) wrote :

Is there any development about this issue?

It's happening on latest Kubuntu 21.10 Beta - I am unable to search and install updates through Discover with this error and also unable install packages from regular Ubuntu repositories "no network connection available" but it is able install snaps... so in essence Discover is crippled right now in Kubuntu.

Changed in plasma-discover:
importance: Unknown → Medium
status: Unknown → Won't Fix
Revision history for this message
In , Nate-b (nate-b) wrote :

No, because this issue is outside of KDE's control. Happily, it looks like it was actually fixed upstream in https://github.com/PackageKit/PackageKit/pull/506 17 days ago. Probably either no PackageKit release has been made with that fix yet, or you have an older PackageKit release that doesn't include it.

Revision history for this message
In , Rik Mills (rikmills) wrote :

(In reply to Nate Graham from comment #3)
> No, because this issue is outside of KDE's control. Happily, it looks like
> it was actually fixed upstream in
> https://github.com/PackageKit/PackageKit/pull/506 17 days ago. Probably
> either no PackageKit release has been made with that fix yet, or you have an
> older PackageKit release that doesn't include it.

For 21.10 there is a fixed packagekit currently waiting for approval by the Ubuntu release team.

Revision history for this message
In , Michael Navigator (cbnavigator) wrote :

(In reply to Rik Mills from comment #4)
> (In reply to Nate Graham from comment #3)
> > No, because this issue is outside of KDE's control. Happily, it looks like
> > it was actually fixed upstream in
> > https://github.com/PackageKit/PackageKit/pull/506 17 days ago. Probably
> > either no PackageKit release has been made with that fix yet, or you have an
> > older PackageKit release that doesn't include it.
>
> For 21.10 there is a fixed packagekit currently waiting for approval by the
> Ubuntu release team.

I can confirm that as of today, latest PackageKit updates on Kubuntu 21.10 Beta fixed this issue with Discover. It is now able to search and apply updates and also install regular packages. Thank you.

Revision history for this message
Michael Navigator (cbnavigator) wrote :

The latest PackageKit updates on Kubuntu 21.10 fixed this issue with Discover, which is now able to search and apply updates and also install regular packages.

Changed in plasma-discover (Ubuntu):
status: New → Fix Released
Revision history for this message
In , Nate-b (nate-b) wrote :

Great news!

Revision history for this message
In , golge (golgeadam) wrote :

The error persists, does anyone know the solution? kubuntu 21.10 urgent answer

Revision history for this message
In , Norman Gan (ngan610) wrote :

I'm evaluating kubuntu 21.10 beta, and i got the whole system patched but i still have the same problem.

I have the:
"Wants=network-online.target" <-- patch that was supposedly going to fix this but i still get the whole "Cannot refresh cache whilst offline" , any thoughts?

Revision history for this message
In , Norman Gan (ngan610) wrote :

I don't know if this might work for everyone but a workaround to the "Cannot refresh cache whilst offline", is to restart the packagekit service:

Do a:
systemctl status packagekit

and you will get lines like this:

PackageKit[2067]: refresh-cache transaction /193_cdedbaab from uid 1000 finished with failed after 148ms

Then do a:

systemctl restart packagekit

and then:
PackageKit[6339]: get-updates transaction /201_daaaadaa from uid 1000 finished with success after 222ms

which means it works, i was able to install normal packages from discover and apper.
systemctl status packagekit

Revision history for this message
Mike Potjer (mnmike) wrote :

The solution I found is with Network-Manager settings found in the file: /etc/networkmanager/networkmanager.conf.

Change setting under heading ifupdown from managed=true to managed=false; restart the system and discover will refresh the cache and you will no longer get the message: "cannot refresh the cache whilst offline".

Simple fix!!! Hope it works for everyone as it has for me. Mike

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.