After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780496 - Can't open Nextcloud remote disk
Can't open Nextcloud remote disk
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: goa volume monitor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Debarshi Ray
gvfs-maint
: 783572 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-03-24 11:17 UTC by Jiri Eischmann
Modified: 2017-09-04 15:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
goa: Fix password-based authentication (1.19 KB, patch)
2017-07-19 14:45 UTC, Ondrej Holy
committed Details | Review

Description Jiri Eischmann 2017-03-24 11:17:18 UTC
I've got a Nextcloud account set up with file access enabled in Online Accounts. The remote disk appears in the side bar in Nautilus, but when I click it, nothing happens. When I go to other locations, right-click the disk and choose "Open in new tab", I'm asked to enter the password and then I can access the disk. Looks like there is a problem with getting credentials from Online Accounts.

I'm using Fedora 26 and GNOME 3.24.
Comment 1 Carlos Soriano 2017-03-28 21:54:20 UTC
This is present in gtk+ too, we get the volume mounted, then we get an error:
G_IO_ERROR_FAILED_HANDLED with message HTTP Error: Cancelled. 
We specifically skip these errors, since the documentation says:
"Operation failed and a helper program has already interacted with the user. Do not display any error dialog."
Corresponding code in gtkplacessidebar: https://git.gnome.org/browse/gtk+/tree/gtk/gtkplacessidebar.c#n2193

Also nothing changed in the code in gtkplacessidebar for this release. I can guess it's a bug in GOA, so moving to GOA.
Comment 2 Carlos Soriano 2017-03-28 21:56:09 UTC
Forgot to mention, I have the feeling is polkit dialog not appearing.
Comment 3 Debarshi Ray 2017-03-29 07:48:04 UTC
(In reply to Carlos Soriano from comment #2)
> Forgot to mention, I have the feeling is polkit dialog not appearing.

Umm... why would PolKit be relevant here? There is no privilege escalation involved.
Comment 4 Debarshi Ray 2017-03-29 07:49:06 UTC
(In reply to Jiri Eischmann from comment #0)
> I've got a Nextcloud account set up with file access enabled in Online
> Accounts. The remote disk appears in the side bar in Nautilus, but when I
> click it, nothing happens. When I go to other locations, right-click the
> disk and choose "Open in new tab", I'm asked to enter the password and then
> I can access the disk. Looks like there is a problem with getting
> credentials from Online Accounts.

Did you log out/in, as opposed to a reboot? Does a reboot fix it? Do you have /usr/libexec/gvfs-goa-volume-monitor on your system?
Comment 5 Jiri Eischmann 2017-03-29 09:14:58 UTC
It was a clean installation, I don't think I logged out and in before trying to connect to the Nextcloud disk.
Comment 6 Carlos Soriano 2017-03-29 17:17:04 UTC
(In reply to Debarshi Ray from comment #3)
> (In reply to Carlos Soriano from comment #2)
> > Forgot to mention, I have the feeling is polkit dialog not appearing.
> 
> Umm... why would PolKit be relevant here? There is no privilege escalation
> involved.

Sorry, I meant the password dialog, no polkit.
Comment 7 Debarshi Ray 2017-03-31 05:45:00 UTC
(In reply to Carlos Soriano from comment #6)
> (In reply to Debarshi Ray from comment #3)
> > (In reply to Carlos Soriano from comment #2)
> > > Forgot to mention, I have the feeling is polkit dialog not appearing.
> > 
> > Umm... why would PolKit be relevant here? There is no privilege escalation
> > involved.
> 
> Sorry, I meant the password dialog, no polkit.

There shouldn't be any password dialog either. :)

Can you mount your Google Drive in nautilus?

Here is some information on how to debug this:
https://wiki.gnome.org/Projects/GnomeOnlineAccounts/Debugging

That page specifically has information about the GVfs / GOA integration. See "Integration with GtkFileChooser and Nautilus".

Could you please invoke the EnsureCredentials D-Bus method and see if it returns an integer or throws an error? The "Checking the D-Bus interface" and "Credentials not working" sections of the above page has some information on how to do that.
Comment 8 tim 2017-05-21 19:58:47 UTC
Same here: Arch Linux, gnome-online-accounts 3.24.0. Here is a workaround with some additional informations:

https://bbs.archlinux.org/viewtopic.php?id=226011
Comment 9 Carlos Soriano 2017-06-19 10:04:42 UTC
As requrested by Rishi, gvfs log:

[csoriano@localhost ~]$ G_MESSAGES_DEBUG=all GVFS_DEBUG=1 /usr/libexec/gvfsd -r -d
dav: Added new job source 0x5569eba190a0 (GVfsBackendDav)
dav: Queued new job 0x5569eba0e2e0 (GVfsJobMount)
dav: + mount
dav: + soup_authenticate_interactive (first auth) 
dav: - soup_authenticate 
dav: send_reply(0x5569eba0e2e0), failed=1 (HTTP Error: Cancelled)
** (gvfsd:4425): DEBUG: dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): HTTP Error: Cancelled
Comment 10 Jan Vlug 2017-07-17 15:39:39 UTC
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1461066
Comment 11 Matěj Cepl 2017-07-17 16:35:25 UTC
(In reply to Jiri Eischmann from comment #0)
> I've got a Nextcloud account set up with file access enabled in Online
> Accounts.

It would be probably useful to get URL of the NextCloud account in question. Is it it HTTP or HTTPS?
Comment 12 Alexandre Franke 2017-07-18 09:11:29 UTC
(In reply to Matěj Cepl from comment #11)
> It would be probably useful to get URL of the NextCloud account in question.
> Is it it HTTP or HTTPS?

Well https://cloud.gnome.org/ for instance doesn’t work.
Comment 13 Ondrej Holy 2017-07-19 14:31:51 UTC
This is a bug in GVfs caused by GTask port. I am sorry for that, I will propose a fix for it soon...
Comment 14 Ondrej Holy 2017-07-19 14:45:26 UTC
Created attachment 355952 [details] [review]
goa: Fix password-based authentication

Password-based authentication used for ownCloud/Nextcloud was broken
by GTask port (commit fdda284). GTask is used as user_data for async
callbacks currently, however, user_data is incorrectly cast to MountOp
in this case. Use g_task_get_task_data in order to fix this issue.
Comment 15 Ondrej Holy 2017-07-19 15:10:25 UTC
Attachment 355952 [details] pushed as 5fbae72 - goa: Fix password-based authentication
Comment 16 Carlos Soriano 2017-07-19 15:13:44 UTC
Thanks Ondrej!
Comment 17 Ondrej Holy 2017-07-19 15:19:25 UTC
Pushed to gnome-3-24 stable branch also.
Comment 18 Debarshi Ray 2017-07-19 15:23:14 UTC
Yes, thanks for fixing this. One less item on my list. The patch is obviously correct.
Comment 19 António Fernandes 2017-09-04 15:52:54 UTC
*** Bug 783572 has been marked as a duplicate of this bug. ***