Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Export chat history" on Linux does not save any data #28267

Closed
HibGut opened this issue Aug 12, 2024 · 4 comments · Fixed by #28268
Closed

"Export chat history" on Linux does not save any data #28267

HibGut opened this issue Aug 12, 2024 · 4 comments · Fixed by #28268
Labels

Comments

@HibGut
Copy link

HibGut commented Aug 12, 2024

Steps to reproduce

Default:

  1. Enter a group.
  2. From the 3 dots at the top-right, click "Export chat history"
  3. In the "Chat export settings" window, leave all settings as pre-selected by default.
    1 defaults
  4. Click "Export"
    2 export complete
  5. After the process finished, click "Show my data".

Alternative 1:
3. In the "Chat export settings" window, leave all settings as pre-selected by default, but do click on the Path value "Downloads/Telegram Desktop"
4. A file chooser opens at the Downloads folder location. Do not navigate to any other other location, click directly on "Select" in the file chooser
3 select Downloads
5. Continue as in Default

Alternative 2:
3. In the "Chat export settings" window, leave all settings as pre-selected by default, but do click on the Path value "Downloads/Telegram Desktop"
4. A file chooser opens at the Downloads folder location. Navigate to some other other location, click "Select" in the file chooser
5. Continue as in Default

Expected behaviour

Default:
To find a folder called "ChatExport [name of group]" within a folder called Telegram Desktop within my Downloads folder. This ChatExport folder should contain all saved messages and media.

Alternative 1:

  1. The Path setting in the "Chat export settings" window to remain on Downloads/Telegram Desktop because I didn't select anything different in the file chooser.
  2. To find a folder called "ChatExport [name of group]" within a folder called Telegram Desktop within my Downloads folder. This ChatExport folder should contain all saved messages and media.

Alternative 2:

  1. The Path setting in the "Chat export settings" window to change to the newly selected location.
  2. To find a folder called "ChatExport [name of group]" within the newly selected location. This ChatExport folder should contain all saved messages and media.

Actual behaviour

Default:
The ChatExport folder does not exist anywhere. The Telegram Desktop folder is not created.

Alternative 1 and 2:

  1. The Path setting in the "Chat export settings" window changes to /run/user/1000/doc/[random 8 hex digits], not matching the location picked in the file chooser.
    4 different path
  2. "Export your data" process window briefly appears, showing "Initializing"
  3. "Export your data" window shows "Disk error happened :(" Nothing is exported.
    5 disk error

Operating system

GNOME 43.9 on Debian 12

Version of Telegram Desktop

Telegram 5.3.2

Installation source

Flatpak

Crash ID

No response

Logs

No response

@HibGut HibGut added the bug label Aug 12, 2024
@ilya-fedin
Copy link
Contributor

Hm, I can reproduce only the default case on my KDE machine. The description of the rest of the issue looks very like you have encountered some xdg-desktop-portal-gnome bug. You can try a distro with newer GNOME version, maybe it's fixed there (but I wouldn't be surprised if it's not and you have to report it to GNOME). Or maybe you need to know some GNOME-specific setting to make it work. Sadly I can't guide you here as I'm not a GNOME user, you have to refer to Debian/GNOME support channels. Or you can switch from flatpak to unsandboxed build to avoid the GNOME's middleman altogether.

@HibGut
Copy link
Author

HibGut commented Aug 13, 2024

very like you have encountered some xdg-desktop-portal-gnome bug.

Looks like that may be true. I have no idea what xdg-desktop-portal-gnome is (I'm just a user, no sysadmin or dev), but after some investigation I found that /run/user/1000/doc/ is locked
doc directory locked
... and appears with a wrong date:
doc directory wrong date
The [random 8 hex digits] directories inside doc all appear to be created by Flatpak apps. The one belonging to Telegram has a Downloads folder inside, which maps to the real Downloads folder, probably a hard link.
doc dir Downloads

Maybe the lock prevents Telegram from writing data? There is an open bug on the Flatpak Github that's probably the same issue flatpak/xdg-desktop-portal#553 (df /run/user/1000/doc also gives me Operation not permitted) and people in there mention this xdg-desktop-portal thing.

But as I said, IDK what that is and already spend way more time than I should on trying to hunt down something that should just work. At the end, I don't really want to learn the details of obscure internal components, I just want Downloads to work.

Does the merge mean the default download is going to work at the next release?

@ilya-fedin
Copy link
Contributor

Maybe the lock prevents Telegram from writing data?

IIRC there was some drama that the GNOME portal implementation provides directory access as read-only for flatpak apps. It seems they provide better security at the price of applications like tdesktop being unable to write data. KDE folks seem to be more pragmatic so their implementation works just fine.

Does the merge mean the default download is going to work at the next release?

Hope so. Have no way to test until release.

@ilya-fedin
Copy link
Contributor

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants