Created attachment 113781 [details] output_with_screenshots The problem is every time I try to open file from smb remote location I get the error "The file <smb://path/to/umbrello/file.xmi> does not exist.". It only works when I mount the smb share manually and then open the same file. In the attachment there is an output from console where I typed "umbrello5 2>&1 | tee umbrello.log" (the moment when I tried to open is near the 103th line) and three screenshots presenting what I have been doing.
The KIO framework retrieves files from a remote location. With installed KF5 framework there is a command line application named kioclient5, with which the use case can be checked outside from umbrello. How to reproduce: If you have configured a file on an SMB server with authentication, e.g. smb://server/data/test.xmi, the file could be downloaded with kioclient5 move smb://server/data/test.xmi /tmp/test.xmi Executing this command with current KF5 packages (18.04) returns the error message "The file..... does not exist", your are reporting. Executing the same command with the KDE4 counterpart kioclient move smb://server/data/test.xmi /tmp/test.xmi opens a password dialog. After entering the correct user and password information, the file is downloaded and stored in /tmp/test.xmi. The fact that this function works with KDE4 shows that the problem lies in the underlying KF5 framework, probably in kio or the smb kioslave.
(In reply to Ralf Habacker from comment #1) > The KIO framework retrieves files from a remote location. With installed KF5 > framework there is a command line application named kioclient5, with which > the use case can be checked outside from umbrello. > > How to reproduce: > If you have configured a file on an SMB server with authentication, e.g. > smb://server/data/test.xmi, the file could be downloaded with > > kioclient5 move smb://server/data/test.xmi /tmp/test.xmi > > Executing this command with current KF5 packages (18.04) returns the error > message "The file..... does not exist", your are reporting. > > Executing the same command with the KDE4 counterpart > > kioclient move smb://server/data/test.xmi /tmp/test.xmi > > opens a password dialog. After entering the correct user and password > information, the file is downloaded and stored in /tmp/test.xmi. > > The fact that this function works with KDE4 shows that the problem lies in > the underlying KF5 framework, probably in kio or the smb kioslave. Actually executing: $ kioclient5 move smb://server/data/test.xmi /tmp/test.xmi doesn't return the error message, moreover It copies file to desired location and I can read It. My kioclient5 version is 5.13.2
> $ kioclient5 move smb://server/data/test.xmi /tmp/test.xmi > doesn't return the error message, moreover It copies file to desired location and I can read It. So you did setup a smb server (or a windows host) with hostname 'server', the share 'data' with authentification and placed a file test.xmi in the root dir, which you could download with the mentioned command ? In the log it looks you are using an incorrect url > umbrello: UMLDoc::openDocument: copy from QUrl("smb://path/to/umbrello/file.xmi") to QUrl("file:///tmp/umbrello.HAORWs") . Please retest with umbrello using the correct url and report if it works
(In reply to Ralf Habacker from comment #3) > So you did setup a smb server (or a windows host) with hostname 'server', > the share 'data' with authentification and placed a file test.xmi in the > root dir, which you could download with the mentioned command ? The fact is I changed the real urls in order to hide the company name where do I work (company name was in the url). > Please retest with umbrello using the correct url and report if it works I changed the smb share and repeated steps. Now smb hostname is 'serwerek', share is 'Oprogramowanie' and file name is 'preferences_model.xmi'. Umbrello still doesn't work and I attached the output logs again (named 'serwerek_umbrello.log'). Command: $ kioclient5 move smb://serwerek/Oprogramowanie/preferences_model.xmi /tmp/preferences_model.xmi still works perfectly and I can open the file with ubrello from location '/tmp/preferences_model.xmi' after executing kioclient5 command.
Created attachment 113836 [details] serwerek_umbrello
> $ kioclient5 move smb://server/data/test.xmi /tmp/test.xmi This will fail on the second call because of the changed kioclient5 'move' command behavior. It really moves the file instead of creating a local copy compared to the KDE4 kio client. So a better test case is kioclient5 cp smb://server/data/test.xmi /tmp/test.xmi
Looking at the implementation of the kioclient cp command (https://cgit.kde.org/kde-cli-tools.git/tree/kioclient/kioclient.cpp#n210) it turns out that umbrello uses a different KIO function - KIO:copy_file - to fetch remote files (https://cgit.kde.org/umbrello.git/tree/umbrello/umldoc.cpp#n504)
KIO::copy does not solve the issue, instead the issue is solved by using KIO::NetAccess::download(), which was used for KDE4.
What is the status of this issue? It is not clear which information is needed.
1. The recent state is that neither KIO::copy_file nor KIO::copy work in the related umbrello context, only KIO::NetAccess::download() The failing code fragment from umbrello source is: QTemporaryFile tmpfile; tmpfile.open(); QUrl dest(QUrl::fromLocalFile(tmpfile.fileName())); KIO::FileCopyJob *job = KIO::file_copy(url, dest, -1, KIO::Overwrite); KJobWidgets::setWindow(job, UMLApp::app()); job->exec(); QFile file(tmpfile.fileName()); if (job->error() || !tmpfile.exists()) { 2. To reproduce the problem with a test case provided by kio, an attempt was made to simulate this type of kio operation with kioclient5 (comment 6), but could not be reproduced in that way.
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 set the bug status 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!
Dear Bug Submitter, 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!