Server: Mouting Dropbox External Storage : Error configuring OAuth1

Created on 12 Jan 2017  路  13Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Install the latest nextcloud.
  2. Enable external storage, try to mount Dropbox with OAuth1 (app key and secret)

Expected behaviour

Dropbox auth app opening, allowing mounting Dropbox.

Actual behaviour

Error configuring OAuth1
Fetching request tokens failed. Verify that your app key and secret are correct.

That's it, I'm never able to mount it.

Server configuration

Operating system: Ubuntu Server 16.04 LTS running in an HyperV VM with Windows Server 2016.

Web server: Apache 2 - 2.4.18-2ubuntu3.1

Database: MySQL - 5.7.16-0ubuntu0.16.04.1

PHP version: PHP 7.0.8

Nextcloud version: 11.0.0 (stable)

Updated from an older Nextcloud/ownCloud or fresh install: Full fresh 11.0.0 install

Where did you install Nextcloud from: Classic archive install

Signing status: No errors have been found.

List of activated apps:


App list

Enabled:

  • activity: 2.4.1
  • announcementcenter: 3.0.0
  • apporder: 0.3.3
  • calendar: 1.4.1
  • comments: 1.1.0
  • dav: 1.1.1
  • external: true
  • federatedfilesharing: 1.1.1
  • federation: 1.1.1
  • files: 1.6.1
  • files_accesscontrol: 1.1.2
  • files_automatedtagging: 1.1.1
  • files_external: 1.1.2
  • files_pdfviewer: 1.0.1
  • files_retention: 1.0.1
  • files_sharing: 1.1.1
  • files_texteditor: 2.2
  • files_trashbin: 1.1.0
  • files_versions: 1.4.0
  • files_videoplayer: 1.0.0
  • firstrunwizard: 2.0
  • gallery: 16.0.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • nextcloud_announcements: 1.0
  • notifications: 1.0.1
  • password_policy: 1.1.0
  • provisioning_api: 1.1.0
  • richdocuments: 1.1.25
  • serverinfo: 1.1.1
  • sharebymail: 1.0.1
  • survey_client: 0.1.5
  • systemtags: 1.1.3
  • theming: 1.1.1
  • twofactor_backupcodes: 1.0.0
  • twofactor_totp: 0.5.0
  • updatenotification: 1.1.1
  • workflowengine: 1.1.1

The content of config/config.php:


Config report


{
    "system": {
        "instanceid": "ock3f8l0vbal",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.0.50",
            "example.com"
        ],
        "datadirectory": "\/var\/nextcloud\/",
        "overwrite.cli.url": "http:\/\/192.168.0.50",
        "dbtype": "mysql",
        "version": "11.0.0.10",
        "dbname": "nextcloud",
        "dbhost": "localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true
    }
}

Are you using external storage, if yes which one: None

Are you using encryption: no

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Any (tested with latest Google Chrome and Firefox, but probably serverside problem)

Operating system: Windows 10 (tested with Home and Enterprise editions)

Logs

Web server error log


Web server error log
Only this repeated 2-3 times (not linked, was not while trying to mount) :

[Tue Jan 10 21:06:11.983894 2017] [:error] [pid 60303] [client 88.209.90.89:55232] PHP Fatal error: Uncaught Error: Access to undeclared static property: OC\\Files\\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:806\nStack trace:\n#0 /var/www/nextcloud/lib/private/Files/View.php(2018): OC\\Files\\Filesystem::normalizePath('/benjamin/files...')\n#1 /var/www/nextcloud/lib/private/Files/View.php(1156): OC\\Files\\View->unlockFile('/Sync/Travail/A...', 1)\n#2 [internal function]: OC\\Files\\View->OC\\Files\\{closure}()\n#3 /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure))\n#4 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#5 {main}\n thrown in /var/www/nextcloud/lib/private/Files/Filesystem.php on line 806

Nextcloud log (data/nextcloud.log)

Provides no useful information whatsoever to help (I checked, when the error occurs the last edited date isn't changed).
Should I change to verbose log ?

Additional info

I see no server-related or Dropbox-related reason as to why this is not working. My server is connected to the internet, no firewall blocking this access, Dropbox dev app created exactly as described in docs. Only remark is that I have TOTP enabled on my Dropbox account, although it used to work perfectly in another nextcloud instance for me.

bug external storage

Most helpful comment

Anyone know if there are plans to implement OAUTH2 support in the near future?

All 13 comments

Yesterday i connected Dropbox to Nextcloud.
I have the same problem, but after i clicked "Apply for production" everything is okay.
Here you can check my configuration in Dropbox API http://i.imgur.com/ZtLMvhG.png

All manual pages recommend against applying for production. Moreover, it should work without this. I tried anyways, but Dropbox refused because "I have not connected any app to my Dropbox account before" or something like that.

Any idea then ?

I had the same problem when I try to connect right after having created the dropbox app. After 10 minutes it worked.

Nextcloud version: 12.0.0 (stable)
Got the problem:
Error configuring OAuth1
Fetching request tokens failed. Verify that your app key and secret are correct.

But Dropbox uses OAuth2

Still getting:
Error configuring OAuth1

Fetching request tokens failed. Verify that your app key and secret are correct.

Getting the same issue, fresh install of latest (12.0.0) Nextcloud on Ubuntu 16.04

I don't know much about OAuth but i suspect @wksantiago is right about the problem being Dropbox not using OAuth1

Seems like this was resolved in Owncloud: https://github.com/owncloud/core/issues/7863

I made it work so the issue isn't with Nextcloud. Two things I did: set the app in dropbox to be available to other users, not just me and (embarassingly) typed the secret manually instead of copying it.

Want to say that it won麓t be up anymore with Oauth1:

https://blogs.dropbox.com/developers/2017/09/api-v1-shutdown-details/

So there should be a PR for the right error message and the new Oauth2 :D

Anyone know if there are plans to implement OAUTH2 support in the near future?

Dropbox support was moved to a separate app, please report issues with this over there: https://github.com/icewind1991/files_external_dropbox

Please try this new app, because it uses updated libraries that support newer Dropbox APIs.

The app works with Nextcloud 12+

@MorrisJobke Do you know why this app is not listed in the app store? Did the author just not submit it? Would be helpful if it's in the app store, because we get some requests from users that/why Dropbox connection isn't working.

Correct - it was not published to the app store yet

Was this page helpful?
0 / 5 - 0 ratings