Skip to content

Flatpak apps silently cancel FileChooser requests causing download failures (Edge, COSMIC + GTK portal conflict) #293

@MzaGuille

Description

@MzaGuille

Summary

On Pop!_OS 24.04 with COSMIC (Wayland), Microsoft Edge installed as a Flatpak silently cancels file downloads when "Ask me what to do with each download" is enabled. The browser either closes the download or the file never completes. No crash occurs — Edge interprets the portal's silent failure as a user cancellation.

Related issue: #285 (same root mechanism: portal sends no Response signal back to the caller)


Environment

Item Value
OS Pop!_OS 24.04 LTS (noble)
Desktop COSMIC (Wayland)
xdg-desktop-portal 1.18.4
xdg-desktop-portal-cosmic 0.1.0pop1
xdg-desktop-portal-gtk 1.15.1
Edge 146.0.3856.72-1 (Flatpak, com.microsoft.Edge from Flathub)
Flatpak runtime org.freedesktop.Platform/x86_64/25.08

Steps to Reproduce

  1. Install Microsoft Edge as Flatpak: flatpak install flathub com.microsoft.Edge
  2. Open Edge and go to edge://settings/downloads
  3. Enable "Ask me what to do with each download"
  4. Attempt to download any file from any website

Expected: A file picker dialog appears asking where to save the file.
Actual: Edge silently cancels the download. No dialog appears. A .crdownload partial file may be left in ~/Descargas (Spanish locale XDG download dir).


Root Cause Analysis

Portal configuration

/usr/share/xdg-desktop-portal/cosmic-portals.conf defines:

[preferred]
default=cosmic;gtk;
org.freedesktop.impl.portal.Secret=gnome-keyring;

This means COSMIC is tried first, GTK as fallback.

What happens at download time

When Edge (Flatpak, Wayland) needs the FileChooser portal to show a save dialog:

  1. Edge requests org.freedesktop.portal.FileChooser.SaveFile via D-Bus
  2. xdg-desktop-portal routes to the COSMIC backend first
  3. The COSMIC portal either fails to show the dialog or returns no Response signal
  4. Edge interprets the silence as cancellation and aborts the download
  5. A .crdownload partial file is left on disk (confirms the download was initiated but never completed)

Evidence from journal

systemd[...]: xdg-desktop-portal.service: Consumed X CPU time

No segfault, no OOM kill — clean exit, confirming this is a silent protocol failure, not a crash.

Workaround

Disabling "Ask me what to do with each download" in edge://settings/downloads bypasses the FileChooser portal entirely and downloads work correctly. This confirms the portal call is the failure point.


Additional Notes


Impact

Any Flatpak application that uses the FileChooser portal with a "save" dialog (downloads, exports, save-as) may be affected under COSMIC + Wayland. The failure is silent and hard to diagnose for end users new to Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions