Bug 72504 - EDITING: Unable to edit .odb file with non-local URL
Summary: EDITING: Unable to edit .odb file with non-local URL
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All Linux (All)
: highest major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Network
  Show dependency treegraph
 
Reported: 2013-12-09 05:24 UTC by TriumphGuru
Modified: 2019-07-10 14:25 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
this breaks local files the same way attempting to allow remote files end up (3.15 KB, text/plain)
2013-12-19 17:03 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TriumphGuru 2013-12-09 05:24:57 UTC
ODB file is located on server (smb) share (x_workdisk on 192.168.1.2), which gets mounted in my filesystem. Able to open ODB file, but attempts to open a form for data entry or open a table results in error message: "SQL Status: HY000
The given URL contains no valid local file system path. Please check the location of your database file."
The problem only occurred after I installed Ubuntu 13.10 with LibreOffice 4.1.2.3 Build ID: 410m0(Build:3).  The database can be opened and edited on other computers running Ubuntu 12.04 and 12.10.  My PC could also open and edit the ODB file when running Ubuntu 13.04 (and the version of LibreOffice that came with that version of OS).
I am able to open and edit ODT spreadsheets located in the same folder on the server without a problem.
No configuration changes have been made to the server, which is running Ubuntu 11.04 (which has OpenOffice 3.2).
Comment 1 Maxim Monastirsky 2013-12-09 09:09:43 UTC
Hi,

(In reply to comment #0)
> ODB file is located on server (smb) share (x_workdisk on 192.168.1.2), which
> gets mounted in my filesystem.
How do you mount it?

> The database can be opened and edited on other computers running Ubuntu 12.04
> and 12.10.
With LibreOffice 4.1, or with an older version?

> My PC could also open and
> edit the ODB file when running Ubuntu 13.04 (and the version of LibreOffice
> that came with that version of OS).
Which is version 4.0 I guess. What happens if you open it on this PC from the command line (like 'libreoffice smb://192.168.1.2/share_name/doc_name.odb')?
Comment 2 TriumphGuru 2013-12-09 11:09:33 UTC
(In reply to comment #1)
> Hi,
> 
> (In reply to comment #0)
> > ODB file is located on server (smb) share (x_workdisk on 192.168.1.2), which
> > gets mounted in my filesystem.
> How do you mount it?
Using GUI. Bookmarked in "Files", so clicking on bookmark mounts and opens folder. Originally as "Connect to Server".  I've been doing it the same way for years.
> 
> > The database can be opened and edited on other computers running Ubuntu 12.04
> > and 12.10.
> With LibreOffice 4.1, or with an older version?
With older version (3.5.7.2) on 12.04.
> 
> > My PC could also open and
> > edit the ODB file when running Ubuntu 13.04 (and the version of LibreOffice
> > that came with that version of OS).
> Which is version 4.0 I guess. What happens if you open it on this PC from
> the command line (like 'libreoffice
> smb://192.168.1.2/share_name/doc_name.odb')?
Exactly the same thing. Main database window opens OK, double-click on a table or form to open it, and the same error message is displayed.
LibreOffice 4.1.2.3 on my PC is able to open and edit ODS and ODT files that are located in the same folder on the server.  Problem is specific to ODB files, it seems.
Comment 3 Maxim Monastirsky 2013-12-09 13:07:09 UTC
Confirmed with 4.1.3.2 (GIO build) & master (GNOME-VFS build, Build ID: 93210ec3b3e7e773e998a3771136043748232f85) under Fedora 19 (64-bit). I get this error when trying to switch to 'Tables'.

As a workaround open /usr/share/applications/libreoffice-base.desktop file, and comment the line 'X-GIO-NoFuse=true'. Also make sure you have 'gvfs-fuse' package. This will bring back the old behavior.
Comment 4 Maxim Monastirsky 2013-12-09 13:09:34 UTC
(In reply to comment #3)
> As a workaround open /usr/share/applications/libreoffice-base.desktop file,
Note that this file will be replaced with every LibreOffice update.
Comment 5 Maxim Monastirsky 2013-12-09 13:51:04 UTC
I can reproduce this bug also with ftp (same env as above). I'll change the summary to reflect that.
Comment 6 TriumphGuru 2013-12-09 22:23:56 UTC
(In reply to comment #3)
> Confirmed with 4.1.3.2 (GIO build) & master (GNOME-VFS build, Build ID:
> 93210ec3b3e7e773e998a3771136043748232f85) under Fedora 19 (64-bit). I get
> this error when trying to switch to 'Tables'.
> 
> As a workaround open /usr/share/applications/libreoffice-base.desktop file,
> and comment the line 'X-GIO-NoFuse=true'. Also make sure you have
> 'gvfs-fuse' package. This will bring back the old behavior.

Thank you for the workaround - it works as you predicted. To comment the line, I actually had to edit /usr/lib/libreoffice/share/xdg/base.desktop.  Also I note your comment #4.
Comment 7 Maxim Monastirsky 2013-12-10 06:43:01 UTC
(In reply to comment #4)
> Note that this file will be replaced with every LibreOffice update.
Just forgot: You can make a copy of this file to your user profile at .local/share/applications, and it should override the system one, so you won't need to edit it after every upgrade.
Comment 8 Lionel Elie Mamane 2013-12-12 15:34:14 UTC
@Caolán: this seems to be a side-effect of

 commit f574e1defdb537bdd741edd2523563aa0b03be5a
 Author: Caolán McNamara <caolanm@redhat.com>
 Date:   Tue Apr 2 15:52:41 2013 +0100

    add X-GIO-NoFuse so we get url:// instead of file://~.gvfs/


The code in connectivity/source/drivers/hsqldb/HDriver.cxx
ODriverDelegator::connect
expects a file:// URL, which is exactly what your commit changes...

Do you have any hint for us on how to adapt that code to deal with non-file:// URLs, or "infer" the equivalent "file://~.gvfs/" or some other way out?
Comment 9 Caolán McNamara 2013-12-18 12:32:01 UTC
hmm... inferring the equivalent file://~.gvfs/ etc would only work for the specific Linux + gio mounted case, not other platforms or mechanisms.
Comment 10 Lionel Elie Mamane 2013-12-18 13:28:01 UTC
(In reply to comment #9)
> hmm... inferring the equivalent file://~.gvfs/ etc would only work for the
> specific Linux + gio mounted case, not other platforms or mechanisms.

Well, it would solve the regression, which according to my understanding is *only* in the case of "gio mounted".
Comment 11 Caolán McNamara 2013-12-19 17:03:14 UTC
hacking on trying to get base to support remote files is seems that base is unhappy on anything that doesn't support the supposed optional XActiveDataStreamer in ucb. e.g. the attached patch breaks base on local files
Comment 12 Caolán McNamara 2013-12-19 17:03:55 UTC
Created attachment 90995 [details]
this breaks local files the same way attempting to allow remote files end up

some more debugging required here.
Comment 13 Björn Michaelsen 2014-01-17 09:51:44 UTC Comment hidden (obsolete)
Comment 14 Michael Stahl (CIB) 2014-02-03 19:22:09 UTC
according to comment #8 broken since 4.1.0 release
Comment 15 tommy27 2014-05-12 19:13:27 UTC
please retest against current 4.2.4.2 release.
if issue is still there, please move it to mab4.2 list since 4.1.x is EOL
Comment 16 Maxim Monastirsky 2014-05-25 07:11:42 UTC
(In reply to comment #15)
> please retest against current 4.2.4.2 release.
> if issue is still there, please move it to mab4.2 list since 4.1.x is EOL
done.
Comment 17 Dennis Schridde 2014-06-25 15:15:15 UTC
Also exists in KUbuntu's LibreOffice version 1:4.2.3~rc3-0ubuntu2.
Comment 18 tommy27 2014-12-08 09:47:58 UTC
please retest with recent 4.3.x or 4.4.x versions and tell if bug persists.
if yes, move this bug to mab4.3 list (Bug 75025) since 4.2.x is END OF LIFE
Comment 19 Robinson Tryon (qubit) 2014-12-11 19:09:18 UTC
TESTING with LO Daily build (2014-12-09) on Ubuntu 14.04
Version: 4.5.0.0.alpha0+
Build ID: df62a2c81bef2bcd96a5f14802e41815f0bdc2da
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master

(In reply to TriumphGuru from comment #0)
>

REPRO Steps:

- Put these test files on the local system and the remote server
ODT (attachment 96587 [details])
ODS (attachment 110499 [details])
ODB (attachment 58813 [details])

I used an ftp server:
(Using the regular dialogs didn't work, so I used the LibreOffice dialogs:
  Tools -> Options -> General -> Use LibreOffice dialogs
Then click on the 'Server' button to add FTP server info)

- Check that you can open/edit the local files without error (For the ODB, just try to open a table)
- Check that you can open/edit the remote ODT and ODS files without error

That works

- Try to open the ODB file

> Able to open ODB file, but attempts to open a
> form for data entry or open a table results in error message: "SQL Status:
> HY000
> The given URL contains no valid local file system path. Please check the
> location of your database file."

RESULT:

File opens, but things look grayed-out. Clicking on the 'Tables' icon gives me a dialog "The connection to the data source "fdo45789" could not be established.... the given URL contains no valid local filesystem path..."

CONFIRMED with LO 4.5.0.0 (master)

mab4.2 -> mab4.3
Comment 20 Alex Thurgood 2015-01-03 17:38:26 UTC Comment hidden (no-value)
Comment 21 Matthew Francis 2015-01-10 02:12:57 UTC
Adding Keywords: bisected to indicate that a commit has already been identified for the regression
Comment 22 Robinson Tryon (qubit) 2015-12-13 11:09:20 UTC Comment hidden (obsolete)
Comment 23 Guillermo Lo Coco 2016-05-06 14:56:27 UTC
I'm migrating some Windows machines to Ubuntu 16.04 and I found this old annoying bug.

It seems to open ODB files when are mounted in FSTAB, but I strictly need "smb://server/share" URL feature.

FSTAB is not an option in my setup and I feel stuck.
Comment 24 Joel Madero 2016-05-06 15:28:28 UTC
(In reply to Guillermo Lo Coco from comment #23)
> I'm migrating some Windows machines to Ubuntu 16.04 and I found this old
> annoying bug.
> 
> It seems to open ODB files when are mounted in FSTAB, but I strictly need
> "smb://server/share" URL feature.
> 
> FSTAB is not an option in my setup and I feel stuck.

Hi Guillermo,

Apologies that you feel stuck but this is a volunteer project. Thanks for confirming you hit this issue also but that will not push the bug to being fixed any faster. We have a few thousand open bugs, this is a volunteer project - volunteers fix bugs when they find them interesting. 

Base is hands down our least popular component and there aren't a lot of developers that enjoy working on it so it might be some time before it's resolved (it might never be resolved). So, you should figure out a solution that works for you given this constraint.

Just want to be honest with you about the status of how bugs get fixed in our project.

Best,
Joel
Comment 25 Guillermo Lo Coco 2016-05-06 17:49:30 UTC
Thanks Joel,
I appreciate your sincerity and very fast reply.
Comment 26 Guillermo Lo Coco 2016-05-09 12:20:36 UTC
Hi Joel,

I tried ftp:// URL and also not work. Maybe you can point me out an alternative.

A shared workstation, most of them share the same guest user, and connect to a server with different privileges. Fstab credentials are static. I need something a user can fill with user/pass, like "Connect to Server" dialog.

(the small business I'm helping made a great effort to redesign there DB in Base, I never thought this gonna happend)

Thanks for your patience.
Comment 27 Joel Madero 2016-05-09 15:16:16 UTC
(In reply to Guillermo Lo Coco from comment #26)
> Hi Joel,
> 
> I tried ftp:// URL and also not work. Maybe you can point me out an
> alternative.

I honestly have no idea - I don't do enterprise level stuff. Ask on ask.libreoffice.org or on the user mailing list.


Best,
Joel
Comment 28 Guillermo Lo Coco 2016-05-26 18:26:38 UTC
Today I was trying to load a BASE ODB from my USB-connected mobile storage and found out the same error.

LO Base is unable to load any file located in GVFS share (smb, ftp, mtp, and so on)

Is this bug trivial ?
Comment 29 Xisco Faulí 2016-09-26 14:53:44 UTC
Adding Cc: to Caolán McNamara
Comment 30 Justin L 2017-02-24 19:04:29 UTC Comment hidden (no-value)
Comment 31 Justin L 2017-02-24 19:07:33 UTC Comment hidden (no-value)
Comment 32 Ηλίας Ηλιάδης 2018-05-29 11:37:56 UTC
Still exists in 5.1.6.2 (UBUNTU 16.04).

Since most Linux systems do not automount smb shares but rather use the smb URL protocol, it is not possible to fully access, from Linux, the LO Documents in shares.

Adding this in case it has some useful info:
running a file in:   smb://MyFileServer/MyShare/

Παρουσιάστηκε ένα σφάλμα σκελετού σεναρίου κατά την εκτέλεση του σεναρίου Python vnd.sun.star.script:LibraryTA|mdlgeneral.py$initapp?language=Python&location=document.

Μήνυμα: <class 'uno.com.sun.star.uno.RuntimeException'>: Couldn't convert file url  to a system path for reason (21)
  /usr/lib/python3/dist-packages/unohelper.py:184 in function fileUrlToSystemPath() [return pyuno.fileUrlToSystemPath( url )]
  vnd.sun.star.tdoc:/48755696/Scripts/python/LibraryTA/mdlgeneral.py:34 in function <module>() []
  /usr/lib/libreoffice/program/pythonscript.py:452 in function getModuleByUrl() [exec(code, entry.module.__dict__)]
  /usr/lib/libreoffice/program/pythonscript.py:993 in function getScript() [mod = self.provCtx.getModuleByUrl( fileUri )]

python script:
33: thisODB = XSCRIPTCONTEXT.getDocument()
34: tmpurl = unohelper.fileUrlToSystemPath('{}/{}'.format(thisODB.URL,'Scripts/python/LibraryTA'))
Comment 33 QA Administrators 2019-05-30 02:55:41 UTC Comment hidden (obsolete)
Comment 34 Gérard Vilain 2019-07-10 13:49:36 UTC Comment hidden (off-topic)