Page MenuHomePureOS Tracker

sudo apt update errors with GLib-CRITICAL assertion
Closed, ResolvedPublic

Description

todd@librem-13v2:~$ sudo apt update
Hit:1 http://repo.puri.sm/pureos green InRelease
                             
(appstreamcli:32678): GLib-CRITICAL **: 10:29:00.257: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed

(appstreamcli:32678): GLib-CRITICAL **: 10:29:00.257: g_variant_new_variant: assertion 'value != NULL' failed

(appstreamcli:32678): GLib-ERROR **: 10:29:00.257: g_variant_new_parsed: 11-13:invalid GVariant format string
Trace/breakpoint trap
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code
todd@librem-13v2:~$

Event Timeline

todd created this task.Aug 26 2018, 10:30
mak closed this task as Resolved.Aug 26 2018, 10:33
mak triaged this task as High priority.

I've already fixed this in Debian days ago and ensured that the issue is resolved in PureOS yesterday.
If you upgrade PureOS fully (apt update ; apt full-upgrade) the issue should be gone.

todd reopened this task as Open.Aug 26 2018, 10:35

In the error above, I am trying to simply do:

sudo apt update

But get the error. So need to know the work-around to get it updated.

mak closed this task as Resolved.Aug 26 2018, 10:39

@todd Just run the command I've shown above. Or update with GNOME Software, that should also do the trick.
apt update was actually successful (despite the appearance and exit code), you only need to update your packages with full-upgrade afterwards.

This is definitely fixed, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906538 for reference.

todd added a comment.Aug 26 2018, 10:59
This comment was removed by todd.
todd added a comment.Aug 26 2018, 11:02

Running:

sudo apt full-upgrade

After the update errors (therefore, ignoring the error), resolved my issue.

mak added a comment.Aug 26 2018, 11:20

Neat :-)
Since the error is triggered by archive metadata, there is no way to ensure people have upgraded their system prior to fetching new metadata. We just have to rely on people upgrading their system regularly.