Bug 502635 - electron apps cannot save files any more
Summary: electron apps cannot save files any more
Status: RESOLVED DOWNSTREAM
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.4
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-10 07:57 UTC by slartibart70
Modified: 2025-04-10 15:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slartibart70 2025-04-10 07:57:11 UTC
I am using 2 flatpak apps, postman 11.40.1 and bruno 2.1.0 as well as mongodb-compass 1.45.4 or 1.46 installed as rpm

Problem is, that those applications offer export functionality (saving to files on local storage).
Using mongodb-compass and postman the sympton is:
- use the save/export functionality in the app
- the 'save-as' dialog rendered by plasma appears
- click on 'save' in the file dialog

The file dialog just closes, but the underlying application does not seem the get the 'notification' that i selected a file for saving. Both apps just return to the previous 'export/save' functionality where i am supposed to select a file for saving (with the 'save-as' dialog)
So, this is an endless loop without ever getting my data saved...

No crash reports, no se-linux problems - i just get the feeling that the 'save-as' dialog is .... just closing by pressing the save-button without triggering any action.

BUT, big but: bruno is an exception:
this flatpak electron app is using the flatpak lib
Freedesktop Platform          org.freedesktop.Platform                     freedesktop-sdk-23.08.30         23.08               system

and can still successfully save files.
Postman uses:
Freedesktop Platform          org.freedesktop.Platform                     freedesktop-sdk-24.08.16         24.08               system

so this is maybe a hint to the underlying problem?
Please investigate, as this might severly affect multiple apps (either flatpak or rpms)

Experiments i did so far:
mongodb-compass is running as Xwayland app, 'xlsclients' shows the app in the list when started.
I already added these envVars (QT_QPA_PLATFORM=xcb) and (GTK_USE_PORTAL=0) without any change.
Another try was to start mongodb-compass with [--ignore-additional-command-line-flags --ozone-platform-hint=auto] to force native wayland-mode - this also does not help

Any further advice on this?
Comment 1 slartibart70 2025-04-10 07:59:51 UTC
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.13.10-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland

i'm on latest nightly builds of plasma 6.4(!)
Comment 2 slartibart70 2025-04-10 08:03:24 UTC
Just to add this bit of info:
other applications do save files normally, so this seems to affect only electron apps - but also (see bruno) not all of them.
I also use ferdium (latest nightly, electron based) and this app can also save files normally.
Comment 3 Nate Graham 2025-04-10 14:12:43 UTC
Assuming you've got the KDE desktop portal support properly in use (we'll test that later), can you test some other non-electron Flatpak apps? If the same thing happens there, it's possible there's an issue with our portal support.

If it works on those apps, then it's much more likely to be a bug in Electron.
Comment 4 slartibart70 2025-04-10 14:23:49 UTC
i just installed rnote (com.github.flxzt.rnote) for starters,
file save and pdf export do work properly
Comment 5 Nate Graham 2025-04-10 14:36:40 UTC
In that case there are two options:
- Electron is busted
- Our desktop portal somehow has a bug that only gets triggered by Electron apps

To rule out user customization, can you try to reproduce the issue in a new clean user account with no changes to any default settings?
Comment 6 slartibart70 2025-04-10 15:02:34 UTC
i tried on fc42 beta: postman can save files.
Then, there was an update to flatpak on my fc41:
Freedesktop Platform                       org.freedesktop.Platform                 freedesktop-sdk-24.08.17      24.08            system

Now, postman can (again) save on my system (no relogin, just starting postman again after i tested successfully on fc42 on anther machine)

mongodb-compass is still broken and cannot save
Comment 7 slartibart70 2025-04-10 15:26:21 UTC
well, i think we can close this issue regarding plasma: it's definitely an application error:
i tested mongodb-compass on fc42 (plasma 6.4 nightly, same as fc41) in 
version 1.40.4-1.el7:  saving works
version 1.46.0-1.el8: saving is broken

at least some relief ... the problem with postman was only a coincidence then? (and my suboptimal number of sample-applications :-D)
Anyway, thanks for the quick response
Comment 8 Nate Graham 2025-04-10 15:53:58 UTC
You're very welcome!