APT repository access for Debian package installation(host). Error

Apt repository check failure (1. sudo -S apt-get update && sudo -S apt-get check; 2. dpkg --audit).

(appstreamcli:8904): GLib-CRITICAL **: 19:28:10.271: 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:8904): GLib-CRITICAL **: 19:28:10.271: g_variant_new_variant: assertion ‘value != NULL’ failed

(appstreamcli:8904): GLib-ERROR **: 19:28:10.271: g_variant_new_parsed: 11-13:invalid GVariant format string
Trace/breakpoint trap (core dumped)
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.

how can i fix this error?

Hi fst19021,

It seems the issue from your host.

Are you using standalone Ubuntu host PC? Or something like VM/docker?
Have you checked the network access on your host?