prrvchr / mDriveOOo

Your Microsoft OneDrive data finally available in LibreOffice
https://prrvchr.github.io/mDriveOOo/
Mozilla Public License 2.0
18 stars 3 forks source link

Can´t access to OneDrive with mDriveOOo extension #10

Closed Fa5g closed 9 months ago

Fa5g commented 1 year ago

Even though I have installed the three extensions indicated in your tutorial: OAuth2OOo.oxt, jdbcDriverOOo.oxt, mDriveOOo.oxt, I have not been able to get the corresponding access to OpenDrive to create, edit and then save my files. I´m using Ubuntu 22.04.3 LTS and LibreOffice 7.5.5.2. When running in terminal the command soffice as was suggested at https://github.com/prrvchr/mDriveOOo/issues/9#issuecomment-1687750107, LibreOffice open and show its main screen, no errors at all. Maybe I´m doing something wrong! Any help would be highly appreciated. Thanks.

Fa5g commented 1 year ago

Even though I have installed the three extensions indicated in your tutorial: OAuth2OOo.oxt, jdbcDriverOOo.oxt, mDriveOOo.oxt, I have not been able to get the corresponding access to OpenDrive to create, edit and then save my files. I´m using Ubuntu 22.04.3 LTS and LibreOffice 7.5.5.2. When running in terminal the command soffice as was suggested at #9 (comment), LibreOffice open and show its main screen, no errors at all. Maybe I´m doing something wrong! Any help would be highly appreciated. Thanks.

I tried putting vnd-microsoft://xxxxx@live.com on the first drop-down, nothing happens on the LibreOffice screen, the terminal show the following:

xxxx@xxxxxxx:~$ soffice ContentProvider.init() LoggerPool.init() *** LoggerPool._getNamedLogger() io.github.prrvchr.mDriveOOo.mDriveLog ContentProvider.init() 1 Scheme: vnd-microsoft ContentProvider.init() 2 Scheme: vnd-microsoft DataSource._getDataSource() 1 DataSource._getDataSource() 2 DataSource._getDataSource() 5 DataSource._getDataSource() 6 DataSource._getDataSource() 7 DataSource._getDataSource() 9 ContentProvider.init() 1 Scheme: vnd-microsoft ContentProvider.init() 2 Scheme: vnd-microsoft DataSource._getDataSource() 1 DataSource._getDataSource() 2 DataSource._getDataSource() 5 DataSource._getDataSource() 6 DataSource._getDataSource() 7 DataSource._getDataSource() 9 ContentProvider.init() 1 Scheme: vnd-microsoft ContentProvider.init() 2 Scheme: vnd-microsoft DataSource._getDataSource() 1 DataSource._getDataSource() 2 DataSource._getDataSource() 5 DataSource._getDataSource() 6 DataSource._getDataSource() 7 DataSource._getDataSource() 9 ContentProvider.init() 1 Scheme: vnd-microsoft ContentProvider.init() 2 Scheme: vnd-microsoft DataSource._getDataSource() 1 DataSource._getDataSource() 2 DataSource._getDataSource() 5 DataSource._getDataSource() 6 DataSource._getDataSource() 7 DataSource._getDataSource() 9

prrvchr commented 1 year ago

The first thing to do, but you may have already done it?

Fa5g commented 1 year ago

I did the following:

prrvchr commented 1 year ago

I would like to point out that the Open button does not work, you must enter the connection url (ie: vnd-microsoft://your_address@your_provider.com) and validate with the enter key

Fa5g commented 1 year ago

I did it like this and it doesn't work either

prrvchr commented 1 year ago

Looking at the log that you bring me, it seems that the problem is related to the connection to the HsqlDB database.

First you have to try again with the new version of OAuth2OOo 1.1.1 and mDriveOOo 1.0.1.

I suspect a problem in the user profile, it would be good to delete the folder: /home/user/.config/libreoffice and make a copy beforehand in order to be able to restore it if necessary...

Last thing to check is the version of the python modules which is accessible in: Tools -> Options -> Internet -> OAuth2 protocol -> View log -> System info You must first enable logging and restart LibreOffice for this to take effect.

Fa5g commented 1 year ago

I followed the above steps resulting the same issue! Also deleted the profile in home/user/.config/libreoffice and no changes. At the end you can find the logs. Screenshot from 2023-08-24 21-10-59 Screenshot from 2023-08-24 21-10-44

soffice-log.txt

oAuth-log.txt

prrvchr commented 1 year ago

Looking at the log files it seems that the mDriveOOo database is not created during the first connection.

I would like to see the jdbc driver version loaded by jdbcDriverOOo.

First you must install the latest version of jdbcDriverOOo 1.0.5 which allows to record the version of the JDBC drivers in the log file.

After, can you go to: Tools -> Options -> Base drivers -> JDBC driver -> JDBC driver settings

And after make a copy of the log file which can be accessed by: Tools -> Options -> Base drivers -> JDBC driver -> UNO driver settings -> View log

Fa5g commented 1 year ago

Find the log at the end.

Screenshot from 2023-08-27 19-43-06

Screenshot from 2023-08-27 19-41-58

jdbc-driver-log.txt

prrvchr commented 1 year ago

Okay, I'm seriously lacking ideas regarding this problem...

Could you show me what is displayed in: Tools -> Options -> LibreOffice Base -> Connections and Databases

Fa5g commented 1 year ago

I tried connection pooling enabled and enable pooling for this driver (com.sun.star.comp.sdbc.JDBCDriver) also and nothing happens, the issue is the same. Screenshot from 2023-09-06 14-22-48 Screenshot from 2023-09-06 14-23-03

prrvchr commented 1 year ago

I suspect that the database is not being created on the first launch of the mDriveOOo extension.

An vnd-microsoft.odb file is created during this first launch in the folder: ~userprofile/libreoffice/4/user/uno_packages/cache/unopackages/luXXXXXXXXXXXX.tmp/mDriveOOo.oxt/hsqldb

Can you confirm the presence of this file? If it is not there, I will trace in the logging more precisely the code allowing the creation of this odb file.

Looking better at the screenshot: Options - LibreOffice Base - Connections I realize that the driver provided by the jdbcDriverOOo extension is missing. Normally there should be a line with: io.github.prrvchr.uno.sdbcx.Driver

Fa5g commented 1 year ago

The vnd-microsoft.odb file does not appear in the directory, only the followings: xxxx@xxxx:~/.config/libreoffice/4/user/uno_packages/cache/unopackages/lu55361aq9m.tmp/mDriveOOo.oxt/hsqldb$ ls -l total 1572 -rw-rw-r-- 1 xxxx xxxx 261 sep 6 16:02 Columns.csv -rw-rw-r-- 1 xxxx xxxx 1592533 sep 6 16:02 hsqldb.jar -rw-rw-r-- 1 xxxx xxxx 337 sep 6 16:02 Settings.csv -rw-rw-r-- 1 xxxx xxxx 1657 sep 6 16:02 TableColumn.csv -rw-rw-r-- 1 xxxx xxxx 129 sep 6 16:02 Tables.csv

And the io.github.prrvchr.uno.sdbcx.Driver driver isn´t listed on Options - LibreOffice Base - Connections either.

prrvchr commented 1 year ago

I just updated mDriveOOo. This update makes it possible to log the creation of the database during the first connection.

Here is the log obtained during my first connection:

 event no thread   date       time        (class/method:) message
    1     7234 2023-09-12 08:25:41.865355436 ContentProvider::__init__(): ContentProvider: io.github.prrvchr.mDriveOOo.NamedProvider Loading completed
    2     7234 2023-09-12 08:25:41.887685901 DataSource::_getDataSource(): Try to create a new data source with the URL: file:///home/prrvchr/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu7023pj63.tmp_/mDriveOOo.oxt/hsqldb/vnd-microsoft.odb
    3     7234 2023-09-12 08:25:41.896514304 DataSource::_getDataSource(): A new data source has been created with the URL: file:///home/prrvchr/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu7023pj63.tmp_/mDriveOOo.oxt/hsqldb/vnd-microsoft.odb
    4     7234 2023-09-12 08:25:43.976645569 DataBase::__init__(): DataBase: Loading completed
    5     7234 2023-09-12 08:25:44.060081650 DataBase::createDataBase(): Try to create the database with HsqlDB version: 2.7.2
    6     7234 2023-09-12 08:25:48.047168324 DataBase::createDataBase(): Successful database creation
    7     7234 2023-09-12 08:25:48.391061406 DataSource::__init__(): DataSource: Loading completed
    8     7234 2023-09-12 08:25:48.393041235 NamedContentProvider::__init__(): ParameterizedProviderNamed Loading completed
    9     7234 2023-09-12 08:25:48.394889198 NamedContentProvider::createContentIdentifier(): Identifier: vnd-microsoft://prrvchr@gmail.com/ -> vnd-microsoft://prrvchr@gmail.com/
   10     7234 2023-09-12 08:25:55.307353780 DataBase::__init__(): DataBase: Loading completed
   11     7234 2023-09-12 08:25:55.451503023 Content::__init__(): Content loading completed
   12     7234 2023-09-12 08:25:55.455238154 ContentUser::__init__(): ContentUser loading completed
   13     7234 2023-09-12 08:25:55.457692547 NamedContentProvider::queryContent(): Identitifer: vnd-microsoft://prrvchr@gmail.com/ ... Completed
   14     7234 2023-09-12 08:25:55.460855772 Content::execute(): command.Name: open
   15     7234 2023-09-12 08:25:56.049137845 Content::_updateFolderContent(): The content of the folder:  is obtained with Request!!!
   16     7234 2023-09-12 08:25:56.967740140 Content::execute(): command.Name: open IsFolder: True
   17     7234 2023-09-12 08:25:57.247404574 NamedContentProvider::createContentIdentifier(): Identifier: vnd-microsoft://prrvchr@gmail.com/ -> vnd-microsoft://prrvchr@gmail.com/
   18     7234 2023-09-12 08:25:57.249749087 NamedContentProvider::queryContent(): Identitifer: vnd-microsoft://prrvchr@gmail.com/ ... Completed
   19     7234 2023-09-12 08:25:57.252278296 Content::execute(): command.Name: getPropertyValues
   20     7234 2023-09-12 08:25:57.254098372 Content::_getPropertiesValues(): ERROR: Requested property: CreatableContentsInfo is not available

On the other hand, it is not normal that the jdbcDriverOOo driver is not listed in: Options -> LibreOffice Base -> Connections

Here is the screenshot I get after installing jdbcDriverOOo: Connection Pool

Here is my about LibreOffice: About LibreOffice

Fa5g commented 1 year ago

I uninstalled the three extensions, downloaded and installed again. I noticed the jdbcDriverOOo.jar driver is listed in the directory ~/.config/libreoffice/4/user/uno_packages/cache/unopackages/lu263512ch1f.tmp/jdbcDriverOOo.oxt/, but not in the ~/.config/libreoffice/4/user/uno_packages/cache/unopackages/lu263512ch1f.tmp/jdbcDriverOOo.oxt/driver/ directory where all the others that come with LibreOffice are, see screenshots. Perhaps for this reason this driver is not listed in Options - LibreOffice Base - Connections, I tried to copy the .jar file into the LibreOffice driver directory and it doesn't work either. It is a shame that this useful extension has not yet been able to work in LibreOffice, perhaps by identifying the reason why the jdbcDriverOOo is not installed correctly, you will be able to solve it. The log file is attached also.

Screenshot from 2023-09-12 13-33-06 Screenshot from 2023-09-12 13-33-21

io.github.prrvchr.jdbcDriverOOo.Driver.log

prrvchr commented 1 year ago

I noticed the jdbcDriverOOo.jar driver is listed in the directory ~/.config/libreoffice/4/user/uno_packages/cache/unopackages/lu263512ch1f.tmp/jdbcDriverOOo.oxt/, but not in the ~/.config/libreoffice/4/user/uno_packages/cache/unopackages/lu263512ch1f.tmp/jdbcDriverOOo.oxt/driver/ directory where all the others that come with LibreOffice are...

This is normal.

What is the log obtained during your first connection with mDriveOOo from: Tools -> Options -> Internet -> mDriveOOo -> View log?

And is the list of drivers the same in the wizard accessible by: File -> New -> Database?

DataBase Wizard

Fa5g commented 1 year ago

After install "sudo apt install libreoffice-base" the io.github.prrvchr.uno.sdbcx.Driver appeared on Options - LibreOffice Base - Connections, but still experiencing the same issue. When try to create a new database the listed drivers are shown on the screenshot. The mDriveLog is attached also. Screenshot from 2023-09-12 15-45-31 WhatsApp Image 2023-09-12 at 3 45 05 PM io.github.prrvchr.mDriveOOo.mDriveLog.log

prrvchr commented 1 year ago

After install "sudo apt install libreoffice-base" the io.github.prrvchr.uno.sdbcx.Driver appeared on Options - LibreOffice Base - Connections

for sure it can't work without this package...

You still need to remove the following 2 packages and it should work...

sudo apt remove libreoffice-sdbc-hsqldb sudo apt remove libhsqldb1.8.0-java

Thank you to confirm.

Fa5g commented 1 year ago

libreoffice-sdbc-hsqldb and libhsqldb1.8.0-java uninstalled, after OS reboot, tried writing vnd-microsoft://... on the 1st drop-down, nothing happens, resulting the same issue. The io.github.prrvchr.uno.sdbcx.Driver always appeared on Options - LibreOffice Base - Connections. Now the content on directory ~/.config/libreoffice/4/user/uno_packages/cache/unopackages/lu55361aq9m.tmp/mDriveOOo.oxt/hsqldb is:

total 1584 -rw-rw-r-- 1 fasg fasg 261 sep 12 13:15 Columns.csv -rw-rw-r-- 1 fasg fasg 1592533 sep 12 13:15 hsqldb.jar -rw-rw-r-- 1 fasg fasg 337 sep 12 13:15 Settings.csv -rw-rw-r-- 1 fasg fasg 1657 sep 12 13:15 TableColumn.csv -rw-rw-r-- 1 fasg fasg 129 sep 12 13:15 Tables.csv -rw-rw-r-- 1 fasg fasg 328 sep 12 16:07 vnd-microsoft.odb.log -rw-rw-r-- 1 fasg fasg 420 sep 12 16:07 vnd-microsoft.odb.properties -rw-rw-r-- 1 fasg fasg 101 sep 12 16:07 vnd-microsoft.odb.script

The vnd-microsoft.odb file is still missing.

vnd-microsoft.odb.log

prrvchr commented 1 year ago

If you were missing the libreoffice-base package, I think your LibreOffice is not properly installed.

Uninstall the 3 extensions.

Try reinstalling LibreOffice and removing the 2 HsqlDB packages: sudo apt remove libreoffice sudo apt autoremove sudo apt install libreoffice sudo apt remove libreoffice-sdbc-hsqldb sudo apt remove libhsqldb1.8.0-java

Reinstall the 3 extensions and making a copy of the mDrive log on first connection.

Fa5g commented 1 year ago

Worked! but couldn't read the remote directories, the file box was blank, only was read the root directory, I tried writing the file name, enter and suddenly the LibreOffice closed, I uninstall and install the three drivers and worked again, but always can read the root remote directory only.

prrvchr commented 1 year ago

Since the problems come from your configuration, I advise you, first of all, to try to create a new Microsoft oneDrive account, with an empty oneDrive, to ensure proper functioning.

Fa5g commented 1 year ago

Tried with new account and other accounts, it seems the driver doesn't update the remote files and always open the local file list recovered the first time.

prrvchr commented 11 months ago

Well I believe that this issue has nothing to do with mDriveOOo but rather is due to a bad installation of LibreOffice or even the system. As I have no possibility of resolving these types of problems, I prefer to close this issue.

prrvchr commented 9 months ago

Hi Fa5g,

I have just added a feature in the logs which allows you to list all the Python packages used by the extension, their origin (already installed on the system or provided by the extension) and their version (if it comes from the system). This ensures that the Python configuration (except with Windows where Python comes with LibreOffice) is functional.

To use this new functionality, you must use the latest versions of OAuth2OOo 1.2.4, jdbcDriverOOo 1.0.8 and mDriveOOo 1.0.7

This information is available in the extension options dialog window: Tools -> Options -> Internet -> Extension name -> View log -> System info

prrvchr commented 9 months ago

Well since mDriveOOo version 1.1.0 allows you to install and/or upgrade Python packages with the pip install requirements.txt and/or pip install --upgrade <package-name> command, I allow myself to consider that this type of malfunction is resolved by this new functionality, so I close.

You are free to open a new one if necessary and thank you for your contribution.