Occasional 'Gs failed to load metadata: cancelled by user action' runtime warning on console
The warning itself is related to the PackageKit plugin, printed from:
by g_log() at gmessages.c:1494
by gs_loading_page_refresh_cb() at gs-loading-page.c:89
by g_task_return_now() at gtask.c:1224
by g_task_return() at gtask.c:1290
by run_job_cb() at gs-plugin-loader.c:3656
by g_task_return_now() at gtask.c:1224
by g_task_return() at gtask.c:1290
by finish_op() at gs-plugin-job-refresh-metadata.c:418
by plugin_refresh_metadata_cb() at gs-plugin-job-refresh-metadata.c:373
by g_task_return_now() at gtask.c:1224
by g_task_return() at gtask.c:1290
by refresh_metadata_cb() at gs-plugin-packagekit.c:3764
by g_simple_async_result_complete() at gsimpleasyncresult.c:805
by complete_in_idle_cb() at gsimpleasyncresult.c:817
by g_idle_dispatch() at gmain.c:5912
by g_main_context_dispatch() at gmain.c:3394
by g_main_context_iterate.constprop.0() at gmain.c:4188
by g_main_context_iteration() at gmain.c:4254
by g_application_run() at gapplication.c:2564
by main() at gs-main.c:49
The cancelled by user action
comes from the libdnf. Tracking this even closer, the PackageKit cancels the operation on its own:
09:26:54 PackageKit adding transaction 0x1a63190
09:26:54 PackageKit sending object path: '/1_cecacdbd'
09:26:54 PackageKit notify::connected
09:26:54 PackageKit SetHints method called: locale=en_US.UTF-8, background=true, interactive=false, cache-age=4294967295
09:26:54 PackageKit locale changed to en_US.UTF-8
09:26:54 PackageKit cache-age changed to 4294967295
09:26:54 PackageKit RefreshCache method called: 0
09:26:54 PackageKit transaction now waiting-for-auth
09:26:54 PackageKit authorizing action org.freedesktop.packagekit.system-sources-refresh
09:26:54 PackageKit transaction now ready
09:26:54 PackageKit changing transaction to exclusive mode
09:26:54 PackageKit 1 transactions in list, 1 committed but not finished
09:26:54 PackageKit transaction now running
09:26:54 PackageKit install uid now 1000
09:26:54 PackageKit install cmdline now PackageKit: refresh-cache
09:26:54 PackageKit setting role for /1_cecacdbd to refresh-cache
09:26:54 PackageKit-DNF got state loading-cache with hint (null)
09:26:54 PackageKit CreateTransaction method called
09:26:54 PackageKit job count now 2
09:26:54 PackageKit trying to open database '/var/lib/PackageKit/transactions.db'
09:26:54 PackageKit job count is now at 0
09:26:54 PackageKit transaction now new
09:26:54 PackageKit setting sender to :1.247
09:26:54 PackageKit adding transaction 0x1a63310
09:26:54 PackageKit sending object path: '/2_eaccbabc'
09:26:54 PackageKit SetHints method called: locale=en_US.UTF-8, background=false, interactive=false, cache-age=4294967295
09:26:54 PackageKit locale changed to en_US.UTF-8
09:26:54 PackageKit cache-age changed to 4294967295
09:26:54 PackageKit Resolve method called: 327680, glibc-all-langpacks&glibc-common&glibc-gconv-extra&....
09:26:54 PackageKit transaction now ready
09:26:54 PackageKit changing transaction to exclusive mode
09:26:54 PackageKit 2 transactions in list, 2 committed but not finished
09:26:54 PackageKit cancelling running background transactions and instead running /2_eaccbabc
09:26:54 PackageKit cancelling running background transaction /1_cecacdbd
09:26:54 PackageKit CancelBg method called on /1_cecacdbd
...
09:26:54 PackageKit emitting allow-cancel 0
09:26:54 PackageKit 2 transactions in list, 2 committed but not finished
09:26:54 PackageKit emitting error-code transaction-cancelled, 'cancelled by user action'
09:26:54 PackageKit emitting allow-cancel 1
09:26:54 PackageKit 2 transactions in list, 2 committed but not finished
09:26:54 PackageKit backend was running for 307 ms
09:26:54 PackageKit emitting finished 'cancelled-priority', 307
09:26:54 PackageKit transaction now finished
09:26:54 PackageKit running /2_eaccbabc as previous one finished
09:26:54 PackageKit transaction now running
09:26:54 PackageKit 2 transactions in list, 1 committed but not finished
09:26:54 PackageKit install uid now 1000
09:26:54 PackageKit install cmdline now PackageKit: resolve
09:26:54 PackageKit setting role for /2_eaccbabc to resolve
09:26:54 PackageKit-DNF got state query with hint (null)
The /1_cecacdbd
is a background operation to refresh cache. The following /2_eaccbabc
is a foreground operation, which cancels the running background operation - it's cancelled by the PackageKit itself.
I do not know what to do with it. Either the cache refresh cannot be set as a background operation, or the next op can run only after the first is finished, but that won't fix a case where another application runs a transaction while the background transaction is running.