Unable to delete or update addons: trash portal failed?

I am unable to update addons, at all. I have tried this in “safe mode” (Pressing shift when starting Anki to disable addons). This is the following message i get when attempting to delete an addon:

Unable to update or delete add-on. Please start Anki while holding down the shift key to temporarily disable add-ons, then try again.

Debug info: Trash portal failed on /home/mal/.local/share/Anki2/addons21/323586997

This (presumably) applies to all addons. I can’t test all of them, but after doing it for 5 addons and getting the same errors, I don’t think this is an addon problem

I’m not sure if it’s relevant but a quick googling found a similar error with a different app that was resolved after deleting GTK_USE_PORTAL.

I had GTK_USE_PORTAL=1 in my /etc/environment , which I think I added to force Qt-based applications to use more ‘native’ File Open and File Save dialogue boxes under Cinnamon. When I removed this and rebooted, I no longer experience the same error

https://gitlab.gnome.org/GNOME/glib/-/issues/2249

Solved. I had GTK_USE_PORTAL=1 in my .profile. I removed it and now it is working.

https://www.reddit.com/r/archlinux/comments/f69349/gnomegiogvfs_directories_refuse_to_be_moved_to/

I guess, the following command can be used to check if it exists or not.

printenv GTK_USE_PORTAL

or

echo $GTK_USE_PORTAL

2 Likes

Unsetting that fixes anki. But it’s quite a shame that this environment variable wasn’t supported :frowning_face: