Bug 454933 - Saving to network fails
Summary: Saving to network fails
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 20.12.3
Platform: Ubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-06 14:01 UTC by duncan
Modified: 2022-07-22 04:36 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description duncan 2022-06-06 14:01:19 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open a PDF file from a network directory (smb) 
2. Work in the file, adding markups
3. Try to save with a new name (probably name makes no difference)

OBSERVED RESULT
The 'save as' dialogue closes without complaining but the file has not been saved and Okular is now frozen and can't be closed by the usual GUI methods.

EXPECTED RESULT
In order of preference
1. The files should be saved
2. Okluar should report that it cannot save the file because ." ... "

SOFTWARE/OS VERSIONS
GNU/Linux: Ubuntu 22.04
Gnome: 42.1

ADDITIONAL INFORMATION
The smb share is on a Synology NAS running updated DSM OS. This same operation works fine with LibreOffice files and a PDF opened and saved with the default Document Viewer
Comment 1 Albert Astals Cid 2022-06-06 16:24:09 UTC
How have you mounted the file path? Or are you using smb:// urls?
Comment 2 duncan 2022-06-06 20:51:32 UTC
The path is already mounted and a LibreOffice file is saving a document around the same time to the same directory.

The path looks like this:
/run/user/1000/gvfs/smb-share:server=kiwinest2.local,share=storage/Gyldenmuld_4/Gyldenmuld_renovering/Tegninger Gyldenmuld_2022.05.29_dli.pdf

I notice that Okular cannot open the file itself when I navigate to the file. It can only open the file from my file manager by specifying Okular (rather than the current default PDF viewer). It can also open the file by the recent files list from the file manager. The file is not listed in Okulars own recent files list.

So now I'm wondering if Okular can even see the file in that location. I'm not sure how to test what might be going on to see if this has much to do with Okular at all or is a wider problem.
Comment 3 duncan 2022-06-07 09:18:19 UTC
So after chatting with some Ubuntu folks I tried to install Okular as a flatpak instead of as a snap (default method). This is just to let you know that it made no difference and Okular behaved the same.
Comment 4 Nate Graham 2022-06-07 17:47:14 UTC
It looks like GNOME's gvfs system has mounted the share and passed that path to Okular. We have a similar kio-fuse system, but it appears you're using Okular on GNOME (or opening the document from Nautilus) so gvfs is used instead.

If you close the document and open Okular and then go to File > Open, can you paste "/run/user/1000/gvfs/smb-share:server=kiwinest2.local,share=storage/Gyldenmuld_4/Gyldenmuld_renovering/Tegninger Gyldenmuld_2022.05.29_dli.pdf" in the "Name:" field? Does Okular fail to open that?

I suspect that something is being confused by this very weird file path that gvfs has provided.
Comment 5 duncan 2022-06-08 22:12:24 UTC
Hi Nate

Yes this is Gnome in a very vanilla and fresh Ubuntu install of 22.04.

Sadly I cannot paste a file path into the default file manager anywhere ... But if I navigate to the path fully (/run/user/1000/gvfs/ etc) it opens. It does not open using the shortcut/bookmark in the file manager (smb//kiwinest2.local/storage).

Even if opened with the full path I cannot save the file to that location afterwards.

Full path - yes. Via bookmark - no. Saving - no.
Comment 6 Nate Graham 2022-06-09 15:48:10 UTC
You can paste the file path in the "Name:" field of the Open dialog.

Oh, I bet your Open dialog doesn't have a name field because you're using GNOME and Okular decided to honor your platform preferences and gave you the somewhat lackluster GTK file dialog, rather than the feature-filled KDE file dialog.

In that case you can try giving Okular the file in a terminal window: `okular /run/user/1000/gvfs/smb-share:server=kiwinest2.local,share=storage/Gyldenmuld_4/Gyldenmuld_renovering/Tegninger Gyldenmuld_2022.05.29_dli.pdf`
Comment 7 duncan 2022-06-21 19:01:25 UTC
It opens the file (when I remove the spaces) but as soon as I try and do anything it freezing, says 'not responding', fails to close for a long time before eventually closing.
Comment 8 Nate Graham 2022-06-22 16:46:48 UTC
That's odd. Can you reproduce this issue in other KDE apps too? If so it's probably in KIO somewhere.
Comment 9 duncan 2022-06-22 17:35:34 UTC
Hi Nate. Please suggest a different KDE app you'd like me to use for testing, also where to install it from snap/repo/flatpack ...
Comment 10 Nate Graham 2022-06-22 17:38:34 UTC
KWrite? That's on Flathub.
Comment 11 Bug Janitor Service 2022-07-07 04:36:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2022-07-22 04:36:35 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!