messagerie-melanie2 / Roundcube-Plugin-Roundrive

Plugin based on kolab_file plugin to connect to a webdav server
4 stars 12 forks source link

Debug way #2

Open filhocf opened 8 years ago

filhocf commented 8 years ago

Hi

I'm trying to use your plugin, but I can't see what happens. Have a way to debug what happens?

In other hand, is your plugin adapted to connect a owncloud with self-signed cert?

MarcusWolschon commented 8 years ago

Same here. No new UI elements but no entries in the apache error log either. How can I debug and fix this?

tpayen commented 8 years ago

Hi The error log is the same as roundcube, probably the logs/errors file if you didn't change anything.

And yes this plugin is adapted to connect to an owncloud with self-signed certificate.

MarcusWolschon commented 8 years ago

I found out that I had misnamed the folder plugins/rounddrive instead of plugins/roundrive however while the web says "Can't liste folders" (typo?) there is not a single message in logs/* about it. It's not asking me for credentials to owncloud/nextcloud, so the issue must be in connection establishing or early login.

In the source code of this plugin I can not find any debug-logging statements and the config.inc.php doesn't have an "enable_debug" setting like all the default Roundcube modules (debug_smtp=true, debug_imap=true,...).

MarcusWolschon commented 8 years ago

Credentials identical to IMAP user created but when trying to list the remote server it just shows "loading...". After a long time the "loading..." disapears but nothing happens. No log messages in logs/* (all logging in roundcube is enabled) and no user visible error messages.

There doesn't seem to be any kind of debug logging showing what it's doing or trying to do.

filhocf commented 7 years ago

Any update?

MarcusWolschon commented 7 years ago

Aparently not. No way to have a debug log that allows for actual debugging and thus no way to fix what needs to be fixed and make pull requests to get it to work.

tpayen commented 7 years ago

@MarcusWolschon please, if you're not happy with this plugin you're more than welcome to fork it (As easily allows github) and do it at your convenience, or find an other plugin that meets your requirements. There is no need for a debug log to make a pull request and like the readme said, it's an alpha version.

Anyway, if the folders aren't listed, it's either because the credentials are incorrect (like you said they need to be identical as your roundcube credentials), or because the service isn't accessible from the machine roundcube. IMO, the debug log won't give you more information than this. Have you tried making a wget from the roundcube machine to the webdav server to see if it's accessible?

@filhocf what update are you waiting for ? Do you use same credentials between roundcube and your webdav server ? Is it accessible from the roundcube server ?

filhocf commented 7 years ago

@tpayen, unhappily I can't say anything about your plugin. Roundcube (RC) and Owncloud (OC) are using the same ldap. I can logging in both, but by the plugin's vision haven't anything there. When I see the logs of nginx, php-fpm or RC, I haven't any error or other message.

So, I haven't idea how debug the behavior of your work. Can you give us some idea to debug it?

tpayen commented 7 years ago

The plugin folder list is empty ? What did you see ?

Like I said, have you tried with curl or wget ? In my plugin conf I have :

$rcmail_config['driver_webdav_url'] = 'https://roundcube.local/owncloud/remote.php/webdav/';
$rcmail_config['driver_webdav_prefix'] = '/owncloud/remote.php/webdav/';

If I try :

tpayen@roundcube.local:~$ curl -ik https://roundcube.local/owncloud/remote.php/webdav/

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No 'Authorization: Basic' header found. Either the client didn't send one, or the server is mis-configured</s:message>
</d:error>

Then with credentials:

tpayen@roundcube.local:~$ curl -ik https://<login>:"<password>"@roundcube.local/owncloud/remote.php/webdav/

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the ownCloud desktop sync client.
MarcusWolschon commented 7 years ago

@tpayen except that the Nextcloud is reachable and an account with the same username+password has been added to it and there is absolutely no information for user or administrator or developer to find out at what step it's failing. I could try to fix and improve and complete and document things if there was any place I could actually start.

sinaps1 commented 7 years ago

As login using full email? (sorry for my english)

# curl https://user:password@domain.tld/test/remote.php/webdav/ This is the WebDAV interface. It can only be accessed by WebDAV clients such as the ownCloud desktop sync client.

# curl https://'user@domain.tld':'password'@domain.tld/test/remote.php/webdav/ curl: (6) Couldn't resolve host 'domain.tld:password@domain.tld'

sinaps1 commented 7 years ago

Found my mistake. I used the configuration:

$rcmail_config['driver_webdav_url'] = 'https://domain.tld/test'; $rcmail_config['driver_webdav_prefix'] = '/remote.php/webdav/';

While there is a need:

$rcmail_config['driver_webdav_url'] = 'https://domain.tld'; $rcmail_config['driver_webdav_prefix'] = '/test/remote.php/webdav/';

@MarcusWolschon It's not your problem?

@tpayen Please fix configuration example

omocinteractive commented 5 years ago

I used the fix by sinaps1, but i get "Can't liste folders". Is there someon who use nextcloud?

omocinteractive commented 5 years ago

Ahh ... after i add a user named like the imap-user (same password) - i'm connected :)