Bug 97898 - CMIS: "generic input / output error" when attempting to access Google Drive
Summary: CMIS: "generic input / output error" when attempting to access Google Drive
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 98463 (view as bug list)
Depends on:
Blocks: CMIS
  Show dependency treegraph
 
Reported: 2016-02-16 11:08 UTC by korry
Modified: 2018-03-08 16:30 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
No 2-factor auth in Google (202.64 KB, image/png)
2016-03-03 15:35 UTC, korry
Details
Save to Google Drive does not work (no 2-factor auth) (211.00 KB, image/png)
2016-03-04 19:51 UTC, korry
Details
Backtrace - breakpoints in ucbhelper::cancelCommandExecution (8.02 KB, text/plain)
2016-03-08 20:56 UTC, Szymon Kłos
Details
Wireshark log of a failed Google Drive connection session (183.37 KB, application/octet-stream)
2016-03-09 14:06 UTC, Giuseppe Castagno (aka beppec56)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description korry 2016-02-16 11:08:43 UTC
When trying to open or save a remote file, it is impossible to enter the credentials for Google Drive, Onedrive and Alfresco (user name and password fields are read-only). It is possible to setup another cloud though.

Kubuntu 14.04; LibreOffice 5.1.0.3 installed from PPA; AMD64
Comment 1 Buovjaga 2016-02-17 12:36:09 UTC
Repro.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: a6f876d45bd4e41a7143594a6cb11b6893a0f620
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-11_00:07:38
Locale: fi-FI (fi_FI)

Ubuntu 15.10 64-bit 
Version: 5.1.0.3
Build ID: 1:5.1.0~rc3-0ubuntu1~wily0
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
Locale: en-US (en_US.UTF-8)
Comment 2 korry 2016-03-03 12:55:09 UTC
After an update to LibreOffice Version: 5.1.1.2
Build ID: 1:5.1.1~rc2-0ubuntu1~trusty0
CPU Threads: 8; OS Version: Linux 3.16; UI Render: default; 
Locale: bg-BG (en_US.UTF-8)
i am able to enter credentials for Google Drive, but after i try to save or open a remote file, i get a "generic input / output error" and it does not work; credentials for OneDirve and Alfresco still can not be entered.
Comment 3 Buovjaga 2016-03-03 13:06:25 UTC
We still don't have support for Google drive 2-factor auth.
Comment 4 korry 2016-03-03 15:35:07 UTC
Created attachment 123201 [details]
No 2-factor auth in Google
Comment 5 korry 2016-03-03 15:36:04 UTC
Thanks however i do not use the 2-factor auth. for Google.
Comment 6 Buovjaga 2016-03-03 16:00:25 UTC
According to this, it is required: https://bugs.documentfoundation.org/show_bug.cgi?id=97788#c3
Comment 7 korry 2016-03-03 16:10:12 UTC
Well, now i am a bit confused, because you say, 2-factor auth is required, but Jays comment says "The Google Drive doesnt function as it now requires 2-factor authentication, which hasnt yet been implemented from our end." As per this statement it won't work (yet). Does save / open to / from Google Drive work for you? Besides, even i prefer Google Drive, i won't mind to use OneDrive for my LO docs. But this does not work for me as well, i am still unable to enter my credentials.
Comment 8 Buovjaga 2016-03-03 16:17:30 UTC
I don't use any cloud services.
Comment 9 korry 2016-03-03 16:28:23 UTC
Can you please test? Either Google Drive or OneDrive. Thanks in advance.
Comment 10 Yousuf Philips (jay) (retired) 2016-03-03 21:41:05 UTC
So i guess i should have been clearer with my comment :D. For those who have 2-factor authentication enabled, our Google Drive implementation wont be able to work. The One Drive implementation isnt functional, as mentioned by the developer who implemented it (bug 62437 Comment 15). I dont have any ideas regarding Alfresco Cloud, but its disabled due to missing credentials.

http://opengrok.libreoffice.org/xref/core/config_host/config_oauth2.h.in#27

So i just tested Google Drive on Windows and it worked fine, so you'll need to provide more details on how the error showed up.

Version: 5.1.1.1 (x64)
Build ID: c43cb650e9c145b181321ea547d38296db70f36e
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
Locale: en-US (en_US)
Comment 11 korry 2016-03-04 19:50:19 UTC
Hi Jay, thank you for your reply. I just get the error on the screenshot. Is there a way to log the LO behaviour (and what should i do if yes)?
Steps to reproduce:
Start LO
Add a connection to Google Drive
Save to remote server
Comment 12 korry 2016-03-04 19:51:05 UTC
Created attachment 123297 [details]
Save to Google Drive does not work (no 2-factor auth)
Comment 13 Yousuf Philips (jay) (retired) 2016-03-04 21:32:14 UTC
I reported a very similar bug yesterday as well in bug 98416. I got an email from google stating a successful login, but the error stopped me from going further. I thought it could be a 64-bit issue only, but same with 32-bit. Thought it could be a profile issue, but clearing the profile didnt solve it either. In order to fix this, a dev would need to look at why this is happening.
Comment 14 Szymon Kłos 2016-03-05 21:12:26 UTC
The support of cloud services requires some configuration for OAuth 2.0 in the config_host/config_oauth2.h file. This services are inaccessible or 'generic input / output error' occurs (mostly, but not only) when this configuration is incorrect / missing.

LO should be compiled with correct GDRIVE_CLIENT_ID and GDRIVE_CLIENT_SECRET values to get it working.
Comment 15 korry 2016-03-07 11:17:19 UTC
So is there a chance to enable open / save from / to a cloud when LO is installed from a repository or it should be compiled from source? Also, what is the location of the config_host/config_oauth2.h file and what values should be put in there?

I believe 9 out of 10 people are installing LO from a repository so cloud services will not work for them if i get it correctly?
Comment 16 Szymon Kłos 2016-03-08 20:56:18 UTC
Created attachment 123411 [details]
Backtrace - breakpoints in ucbhelper::cancelCommandExecution
Comment 17 Szymon Kłos 2016-03-08 21:04:07 UTC
I installed Kubuntu 14.04, LibreOffice from PPA (Version: 5.1.1.2, Build ID: 1:5.1.1~rc2-0ubuntu1~trusty0) and I used gdb to create backtrace.

The reason of an error message must be different from that I mentioned above. In this moment I can't tell where is the problem.
Comment 18 Giuseppe Castagno (aka beppec56) 2016-03-09 14:06:04 UTC
Created attachment 123432 [details]
Wireshark log of a failed Google Drive connection session

Wireshark log of failing Linux Google Drive connection, obtained with:

Version: 5.1.1.2
Build ID: 1:5.1.1~rc2-0ubuntu1~trusty0
CPU Threads: 8; OS Version: Linux 3.13; UI Render: default; 
Locale: en-US (en_US.UTF-8)

Which looks like a Canonical build.

It seems that at a certain point (see attached Wireshark log frame 281) the client (LO) sent a 'Encrypted Alert' followed by a terminate connection sequence.

Probably caused by a wrong certificate, because it happened just after the negotiation phase.

This bug can be further analyzed by the original builder, LO needs to be built in a special way to do that.

I attached a Wireshark log in bug 98416, comment 4 of a working Google Drive connection, that can used as a reference.
Comment 19 Szymon Kłos 2016-03-09 16:30:32 UTC
LibreOffice had problem with handling certificates / HTTPS connections in CMIS:
http://bosdonnat.fr/libreoffice-reaches-cmis-https.html
https://bugs.documentfoundation.org/show_bug.cgi?id=72277

It could be still unresolved.
Comment 20 Björn Michaelsen 2016-03-11 15:00:16 UTC
(In reply to Giuseppe Castagno (aka beppec56) from comment #18)
> Build ID: 1:5.1.1~rc2-0ubuntu1~trusty0
> [...]
> Which looks like a Canonical build.

Note that that is _not_ a "Canonical build". The LibreOffice ppa is community maintained. Canonical builds are those that end up in the official distro archives.

Does this problem exist with https://launchpad.net/ubuntu/+source/libreoffice/1:5.1.1~rc2-0ubuntu1 on Ubuntu xenial (which will be Ubuntu 16.04)?
Comment 21 Giuseppe Castagno (aka beppec56) 2016-03-14 08:35:31 UTC
(In reply to Björn Michaelsen from comment #20)

> > [...]
> > Which looks like a Canonical build.
> 
> Note that that is _not_ a "Canonical build". The LibreOffice ppa is
> community maintained. Canonical builds are those that end up in the official
> distro archives.

sorry, I didn't know.

> 
> Does this problem exist with
> https://launchpad.net/ubuntu/+source/libreoffice/1:5.1.1~rc2-0ubuntu1 on
> Ubuntu xenial (which will be Ubuntu 16.04)?

I'll give it a try, installing 16.04 on a VM.
Comment 22 Giuseppe Castagno (aka beppec56) 2016-03-14 08:39:55 UTC
Daily master builds are not Google Drive enabled, this one:

<http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF/gdrivetest2/LibreOfficeDev_5.2.0.0.alpha0_Linux_x86-64_deb.tar.gz>

It's a special version of master build created to check bug 98416.
It probably fixes this bug as well.

Note that there's still bug 87938 (two-factor auth for gdrive not working) - so if you want to test, you have to disable two-factor authentication temporarily.

At <http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF/gdrivetest2> rpms are available as well.
Comment 23 Yousuf Philips (jay) (retired) 2016-03-21 20:47:44 UTC
*** Bug 98463 has been marked as a duplicate of this bug. ***
Comment 24 Giuseppe Castagno (aka beppec56) 2016-05-13 07:28:30 UTC
Works with this TDF version (not 2FA enabled):

Version: 5.1.3.2
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
CPU Threads: 8; OS Version: Linux 3.13; UI Render: default; 
Locale: en-US (en_US.UTF-8)
Comment 25 korry 2016-05-13 08:01:57 UTC
(In reply to Giuseppe Castagno (aka beppec56) from comment #24)
> Works with this TDF version (not 2FA enabled):
> 
> Version: 5.1.3.2
> Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
> CPU Threads: 8; OS Version: Linux 3.13; UI Render: default; 
> Locale: en-US (en_US.UTF-8)

Version: 5.1.3.2
Build ID: 1:5.1.3~rc2-0ubuntu1
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; 
Locale: bg-BG (en_US.UTF-8)

Still saving to Google Drive does not work. 2-factor authentication is disabled. I get 
Error saving the document Untitled1:
The specified device is invalid.

Kubuntu Xenial 16.04, clean install.
Comment 26 Giuseppe Castagno (aka beppec56) 2016-05-13 08:18:08 UTC
(In reply to korry from comment #25)
...
> 
> Version: 5.1.3.2
> Build ID: 1:5.1.3~rc2-0ubuntu1
> CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; 
> Locale: bg-BG (en_US.UTF-8)

this is a Ubuntu version (don't know if an official or a community one).

I don't have a 16.04 installed yet.
I fixed only TDF official version.
Comment 27 pva 2017-02-23 16:03:19 UTC
Guys, is there any way to debug this problem somehow? The message itself it not usefull at all, but there are no errors in console. I've tried to rebuild libreoffice on gentoo with different options: +java, with/without extensions, but problem still persists. This is 5.3.0.3.
Comment 28 pva 2017-02-25 07:16:04 UTC
Ok, I've build libreoffice with debug enabled, but all I noticed is this:

info:ucb.ucp.cmis:15923:1:ucb/source/ucp/cmis/cmis_content.cxx:584: Unexpected libcmis exception: Object not found
...
warn:uui:15923:1:uui/source/iahndl.cxx:246: replaceMessageWithArguments: No arguments passed!

Is there any way to ask libreoffice report what was called in libcmis? Currently I've asked for help at libcmis issue tracker as well: https://github.com/tdf/libcmis/issues/13
Comment 29 Buovjaga 2017-04-23 18:24:27 UTC
A user reports the problem on Ubuntu 17.04, while Flatpak version is working fine: https://www.reddit.com/r/libreoffice/comments/66pw50/remote_general_input_output_error_while_using/

Do we close this as fixed and let Ubuntu fix it in their end?
Comment 30 Yousuf Philips (jay) (retired) 2017-04-23 22:32:44 UTC
(In reply to Buovjaga from comment #29)
> Do we close this as fixed and let Ubuntu fix it in their end?

Yes we close it as it works in official builds, like the latest fresh. Distro build issues should be taken up with those distros on their bug trackers.

Version: 5.3.2.2
Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: group

@korry: Please file a bug at the link below and make sure to link to this bug report in the description.

https://bugs.launchpad.net/ubuntu/+source/libreoffice
Comment 31 Olivier Tilloy 2018-03-08 16:30:05 UTC
Bug filed against ubuntu: https://launchpad.net/bugs/1754400.