Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get Dropbox working #12355

Closed
frarude opened this issue Nov 21, 2014 · 9 comments
Closed

get Dropbox working #12355

frarude opened this issue Nov 21, 2014 · 9 comments

Comments

@frarude
Copy link

frarude commented Nov 21, 2014

Unable to activate Dropbox external storage. Always error message "Fetching request tokens failed. Verify that your Dropbox app key and secret are correct."
App code and secret correct and verified. CA certs are valid and up-to-date.

Solution:

remove debian package php-dropbox and install files and folders
(/usr/share/owncloud/) apps/files_external/3rdparty/Dropbox
from git instead.
Modify apps/files_external/lib/dropbox.php and external/ajax/dropbox.php to contain
require_once DIR.'/../3rdparty/Dropbox/autoload.php';
instead of the relative path. (This is a relevant difference between debian package and git)

Steps to reproduce

  1. debian system (sid)
  2. install apache, php, (and minimum additional: php-dropbox )
  3. install owncloud 7
  4. follow steps to activate a Dropbox external

Expected behaviour

external_files Dropbox should work

Actual behaviour

It is not possible to activate a Dropbox synchronization

Server configuration

Operating system: Linux Debian (tested on sid)

Web server: apache 2.4.10, php5.6.3

Database: mysql -5.5

PHP version: php5.6.3
packages: (php5-oauth php-dropbox)

ownCloud version: 7.x (any of them until 7.03)

Updated from an older ownCloud or fresh install: updated via package manager of debian

List of activated apps:
external storage

The content of config/config.php:

$CONFIG = array (
  'instanceid' => '52667b4537971',
  'passwordsalt' => 'xx',
  'datadirectory' => '/usr/share/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '7.0.3.4',
  'appstoreenabled' => false,
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/share/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
  ),
  'dbname' => 'owncloud',
  'dbhost' => '127.0.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'xx',
  'installed' => true,
  'forcessl' => true,
  'ldapIgnoreNamingRules' => false,
  'theme' => '',
  'maintenance' => false,
  'has_internet_connection' => true,
  'overwritewebroot' => '/owncloud',
  'trusted_domains' =>
  array (
    0 => 'test.domain.de',
  ),
  'loglevel' => '2',
  'share_folder' => '/Shared',
)

Are you using external storage, if yes which one: dropbox sftp

Are you using encryption: no

Client configuration

Browser: firefox 31

Operating system: linux

Logs

Web server error log

no relevant entries

ownCloud log (data/owncloud.log)

nothing relevant to this problem:
{"app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set '
always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0","level":3,"time":"2014-11-21T07:31:59+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T07:41:59+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T07:47:53+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T07:47:54+00:00"}
{"app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set '
always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0","level":3,"time":"2014-11-21T07:47:54+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T07:47:54+00:00"}
{"app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set '
always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0","level":3,"time":"2014-11-21T07:47:54+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T07:47:55+00:00"}
{"app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set '
always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0","level":3,"time":"2014-11-21T07:47:55+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T08:05:27+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T08:05:28+00:00"}
{"app":"PHP","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set '
always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0","level":3,"time":"2014-11-21T08:05:28+00:00"}
{"app":"core","message":"Login failed: 'cdef9bbc-f432-1031-884f-39f7c9039ff7' (Remote IP: '134.169.203.17', X-Forwarded-For: '')","level":2,"time":"201
4-11-21T08:05:28+00:00"}

Browser log

nothing relevant to this problem
@LukasReschke
Copy link
Member

As far I can see you're using packages by the Debian maintainers. Those are unsupported by us, if you cannot experience this bug with the official packages available via http://owncloud.org/install/#instructions-packages I'm going to close this issue and ask you to get touch with the Debian maintainers.

@karlitschek
Copy link
Contributor

@LukasReschke Do you have evidence that the packaging might make a difference?

@LukasReschke
Copy link
Member

@LukasReschke Do you have evidence that the packaging might make a difference?

remove debian package php-dropbox and install files and folders
(/usr/share/owncloud/) apps/files_external/3rdparty/Dropbox
from git instead.
Modify apps/files_external/lib/dropbox.php and external/ajax/dropbox.php to contain
require_once DIR.'/../3rdparty/Dropbox/autoload.php';
instead of the relative path. (This is a relevant difference between debian package and git)

That looks PRETTY much like a packaging problem ;-)

@LukasReschke
Copy link
Member

Additionally, really, we already have way too many issues just with our own distribution. If other distributions break it by manually patching things we shouldn't care about that too much…

See

require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
- we're doing it correctly…

@LukasReschke
Copy link
Member

From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Tue, 5 Nov 2013 20:39:36 -0400
Subject: Adapt Dropbox path

The Debian package depends on the needed classes instead of embedding
them, i.e. php-dropbox.

Forwarded: not-needed
Last-Update: 2013-11-06
---
 apps/files_external/ajax/dropbox.php | 2 +-
 apps/files_external/lib/dropbox.php  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files_external/ajax/dropbox.php b/apps/files_external/ajax/dropbox.php
index bbedf8e..6971fa2 100644
--- a/apps/files_external/ajax/dropbox.php
+++ b/apps/files_external/ajax/dropbox.php
@@ -1,6 +1,6 @@
 <?php

-require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
+require_once 'Dropbox/autoload.php';

 OCP\JSON::checkAppEnabled('files_external');
 OCP\JSON::checkLoggedIn();
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index 9f297d2..88d7115 100644
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -22,7 +22,7 @@

 namespace OC\Files\Storage;

-require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
+require_once 'Dropbox/autoload.php';

 class Dropbox extends \OC\Files\Storage\Common {

That's within their patches.

@karlitschek
Copy link
Contributor

Ok. Makes sense

@frarude
Copy link
Author

frarude commented Nov 21, 2014

I am aware that this is not an owncloud fault but I think many people do search here. For all of them I wrote this "Issue".

@DavidPrevot
Copy link

Upstream bug tracker is not the appropriate place for Debian specific
issues. Please, file a bug report in the BTS, preferably using reportbug.

https://www.debian.org/Bugs/Reporting

People using the Debian package, as distributed by Debian, should look there:

https://bugs.debian.org/owncloud

Regards

David

@DavidPrevot
Copy link

[Sorry for continuing this thread, but I didn’t get any answer by mail or bug report]

@frarude I updated php-dropbox to fix this issue, can you please give it a
try and report back that it works as expected (preferably via a bug report)?

https://people.debian.org/~taffit/php/php-dropbox_1.0.0-3_all.deb

Thanks in advance.

Regards

David

@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants