Upgrade KDENeon to 24.04 From the GUI Keeps Failing

When trying to upgrade from the notification I keep getting this error:

localuser:root being added to access control list
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in function pulse
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 216, in pulse
    self.dialog.installationProgress.setValue(
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Unit packagekit.socket does not exist, proceeding anyway.
Created symlink /run/systemd/system/packagekit.socket → /dev/null.
Created symlink /run/systemd/system/packagekit.service → /dev/null.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit packagekit.service is masked.
exitMainLoopMidFlight
Removed /run/systemd/system/packagekit.service.
Removed /run/systemd/system/packagekit.socket.

So far I have tried adding export XDG_RUNTIME_DIR=/run/user/$(id -u) to my .bashrc, but it didn’t seem to help.

I also tried running apt full-upgrade and apt dist-upgrade but they only show me autoremoveable packages now.

I am not sure if this is a GUI issue or some other thing with my system, but I am not sure how to resolve this.

Also when trying pkcon upgrade-system I get this error

The daemon crashed mid-transaction!

I wouldn’t be in a rush to upgrade now after reading this.

Patience is a virtue.

Are you gonna crosspost this message on every new topic about upgrading?

Derailing multiple posts with the same message is not a virtue.

Then go break your system. I’m not trying to stop you. I’m just saying that upgrading right now is perhaps not a great idea; especially if you have no backup of your drive ready. :smile:

Hastiness is not a virtue. Crossposting to inform people to not be hasty and to consider the outcome is a virtue.

Is this error shown in the beginning of the upgrade process? I’m asking because in my case after it installed the updated packages (before cleaning up and rebooting) I got a similar message but my system is upgraded to 24.04 with no obvious issues, so I just ignored it.

The upgrade gets stuck right here, On step 2 it looks like.
image
Then it shows me the error I got and closes itself.

OK. It’s a different case.

I think the first line “localuser:root being added to access control list” is maybe the actual error, and the rest is just boilerplate. But I am not too sure.

@oalmadani here’s a solution that worked for me.

  1. Open /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py and do the following replacement on lines 216 - 218

Replace this

self.dialog.installationProgress.setValue(
            (self.current_bytes + self.current_items) /
            float(self.total_bytes + self.total_items) * 100)

With this

self.dialog.installationProgress.setValue(int(
            (self.current_bytes + self.current_items) /
            float(self.total_bytes + self.total_items) * 100))
  1. Run sudo apt update and see if there are lines starting with “Err:”. This makes system update fail so we need to disable them.
    In my case I had “Err:15 [LINK] cloud-sdk InRelease
    The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY XXX” so I had to disable it in /etc/apt/sources.list.d/google-cloud-sdk.list by adding “#” so line looks like this: “# deb [signed-by=/usr/share/keyrings/cloud.google.gpg] [LINK] cloud-sdk main”. In your case a different package may be failing so Google things around until you resolve all "Err:"s in sudo apt update.

  2. Check if XDG_RUNTIME_DIR is set with “echo $XDG_RUNTIME_DIR”. If not, do echo “export XDG_RUNTIME_DIR=/run/user/$(id -u)” >> ~/.zshrc if you use ZSH and echo “export XDG_RUNTIME_DIR=/run/user/$(id -u)” >> ~/.bashrc for BASH. Make sure to restart terminal after those changes or do source ~/.your-shell-rcfile

  3. Run sudo do-release-upgrade in command line and watch update process

1 Like

Thank you for your reply.

Step 2 worked for me. I had similar errors/warnings from apt update that I was getting from some of my repos.
I assumed the upgrade script disabled them when it said it disabled 3rd party repos, but whatever.

After that the upgrade script from the notification worked from me.

Also @jsalatas thanks for the headsup about the error message you got at the end. It happened to me too, and I was able to ignore it as well.