typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

"Save-as" does not work #5275

Closed dcfreire closed 2 years ago

dcfreire commented 2 years ago

Describe the bug Ever since release (ver >= 1.0) I can't use the save-as functionality for any files or export files. This is a big problem considering that I cannot create new files on Typora, and then open it on Typora to edit it. When trying clicking save-as or the export buttons nothing happens on screen, but this is printed to the terminal:

(typora:114856): Gtk-WARNING **: 15:47:01.744: Can't open portal file chooser: GDBus.Error:org.freedesktop.portal.Error.InvalidArgument: invalid filter: no filters

The file chooser opens normally when opening files and folders.

To Reproduce Steps to reproduce the behavior:

  1. Go to File
  2. Click on Save-as

Expected behavior The file chooser opens, and lets me save the file.

Screenshots / Screencasts If applicable, add screenshots / screencasts to help explain your problem.

Desktop (please complete the following information):

Typora Version 1.2.4

Additional context Save-as works fine on typora 0.11

abnerlee commented 2 years ago

Does GTK_USE_PORTAL=0 ./Typora work?

Or install xdg-desktop-portal-gtk

dcfreire commented 2 years ago

I already had xdg-desktop-portal-gtk installed and it does not fixes the issue, however setting GTK_USE_PORTAL=0 does.

davidfhill commented 2 years ago

I tested two Typora versions on Linux Mint 20.03 Una. Version 1.3.6 (installed through the Linux Mint 20.03 Software Manager) does not open the save/save as dialog when clicking Save or Save As. Version 1.2.3 (available for download from the typora.io website) functions properly as expected when clicking Save or Save As. The bug appears to have been introduced in version 1.3.

plumlis commented 2 years ago

Same here. But this issue is only on Flatpak version. It's normal with deb and binary.

Fedora 36 64 bit Gnome - wayland

sirrahn commented 2 years ago

Am also experiencing this with the flatpak version on Fedora 36, gnome wayland and gnome xorg. Version 1.3.6

Syize commented 2 years ago

Same problem in Arch Linux, with xdg-desktop-portal-gtk installed, and export function also doesn't work. However, if set GTK_USE_PORTAL=0, this problem can be solved

sirrahn commented 2 years ago

How do you set the GTK_USE_PORTAL=0 ?

exergonic commented 2 years ago

How do you set the GTK_USE_PORTAL=0 ?

From a command line, invoke typora but prefix it with the desired environmental variable, i.e. GTK_USE_PORTAL=0 typora

sonnie-sonnig commented 2 years ago

I can second this. Same issues here, but not just with the flatpak, but also with the AUR version. Both 1.3.6.

Tested with:

xdg-desktop-portal-gtk is installed.

How can I set the environment variable? GTK_USE_PORTAL=0 typora doesn't work with the flatpak, GTK_USE_PORTAL=0 io.typora.Typora as well is not working.

benji88i commented 2 years ago

Hi there,

So for us fedora users who don't know how to run the unpack and run the binary version and are stuck with the issues with flatpak (still unable to print or save files), is there a way to build an rpm package or is there a copr repo or rpm version that is trusted?

Maybe the snap version would be better supported..

plumlis commented 2 years ago

Hi there,

So for us fedora users who don't know how to run the unpack and run the binary version and are stuck with the issues with flatpak (still unable to print or save files), is there a way to build an rpm package or is there a copr repo or rpm version that is trusted?

Maybe the snap version would be better supported..

https://github.com/RPM-Outpost/typora

try this script

benji88i commented 2 years ago

Thanks a lot!

Sorry do I need to download something from github before I run "./create-package.sh"

benji88i commented 2 years ago

Is there anyway to rollback the flathub version. ?

akosma commented 2 years ago

Same issue here; Typora 1.3.6 on Ubuntu 20.04, installed with Flatpak. xdg-desktop-portal-gtk installed. Setting flatpak override --user --env=GTK_USE_PORTAL=0 io.typora.Typora does not solve the issue.

bluesangel commented 2 years ago

Issue persists on FedoraCore 36 after setting GTK_USE_PORTAL=0 through Flatseal. This environment variable is not a working fix.

abnerlee commented 2 years ago

Does version 1.4.4 works?

plumlis commented 2 years ago

Still doesn't work.

(Typora:2): Gtk-WARNING **: 15:34:20.227: Can't open portal file chooser: GDBus.Error:org.freedesktop.portal.Error.InvalidArgument: invalid filter: no filters

sonnie-sonnig commented 2 years ago

Does version 1.4.4 works?

Yes for the manual .deb-File-Update. No for the Flatpak. (PopOS 22.04 / Gnome 42.3.1 / X11)

abnerlee commented 2 years ago

Could you try 1.4.5 (flatpak)? It should be fixed in that version

sonnie-sonnig commented 2 years ago

Could you try 1.4.5 (flatpak)? It should be fixed in that version

Unfortunately not. This is my terminal output, when starting Typora 1.4.5. with flatpak run io.typora.Typora


Gtk-Message: 08:35:28.778: Failed to load module "appmenu-gtk-module"
Gtk-Message: 08:35:28.814: Failed to load module "canberra-gtk-module"
Gtk-Message: 08:35:28.814: Failed to load module "canberra-gtk-module"
[2:0908/083528.825389:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0908/083528.825417:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0908/083528.860230:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0908/083528.860281:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0908/083528.860307:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

(Typora:2): Gtk-WARNING **: 08:35:33.572: Can't open portal file chooser: GDBus.Error:org.freedesktop.portal.Error.InvalidArgument: invalid filter: no filters
abnerlee commented 2 years ago

@sonnie-sonnig Sorry, but does Export → PDF now shows the dialog in 1.4.5?

sonnie-sonnig commented 2 years ago

@abnerlee Yes, this seems to work properly with the flatpak 1.4.5.

abnerlee commented 2 years ago

@sonnie-sonnig Could you try 1.4.6 and see if it works now?

plumlis commented 2 years ago

It works well now.

abnerlee commented 2 years ago

Fixed in 1.4.6

sonnie-sonnig commented 2 years ago

It works well now.

I second that. Works fine with 1.4.6 from flathub. TY for your work.