icewind1991 / files_external_dropbox

External Storage backend for Dropbox
GNU Affero General Public License v3.0
56 stars 19 forks source link

Exception: Creating storage failed #23

Open voodoomatz opened 6 years ago

voodoomatz commented 6 years ago

Hi, I added the app successfully and activated in admin>settings for all users. I set up a Dropbox app. In user>settings>external storage, I selected DropboxV2, entered client id and client secret and successfully granted access. However, I still receive the following error:

Exception: Creating \OCA\Files_external_dropbox\Storage\Dropbox storage failed

The Nextcloud error log shows:

files_external Exception: Creating \OCA\Files_external_dropbox\Storage\Dropbox storage failed/share/CE_CACHEDEV1_DATA/Web/nextcloud/apps/files_external/lib/config.php - line 237: OCA\Files_external_dropbox\Storage\Dropbox->__construct({ configured ... "})/share/CE_CACHEDEV1_DATA/Web/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 256: OC_Mount_Config::getBackendStatus("\OCA\File ... x", { configured ... "}, false, "true")/share/CE_CACHEDEV1_DATA/Web/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 305: OCA\Files_External\Controller\StoragesController->updateStorageStatus(OCA\Files_Ex ... {}, "true")/share/CE_CACHEDEV1_DATA/Web/nextcloud/apps/files_external/lib/Controller/UserStoragesController.php - line 107: OCA\Files_External\Controller\StoragesController->show("10", "true")/share/CE_CACHEDEV1_DATA/Web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 166: OCA\Files_External\Controller\UserStoragesController->show("10", "true")/share/CE_CACHEDEV1_DATA/Web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99: OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Ex ... {}, "show")/share/CE_CACHEDEV1_DATA/Web/nextcloud/lib/private/AppFramework/App.php - line 118: OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Ex ... {}, "show")/share/CE_CACHEDEV1DATA/Web/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App::main("OCA\Files ... r", "show", OC\AppFramew ... {}, { id: "10",_ ... "})OC\AppFramework\Routing\RouteActionHandler->_invoke({ id: "10", ... "})/share/CE_CACHEDEV1_DATA/Web/nextcloud/lib/private/Route/Router.php - line 297: call_userfunc(OC\AppFramew ... {}, { id: "10", ... "})/share/CE_CACHEDEV1_DATA/Web/nextcloud/lib/base.php - line 987: OC\Route\Router->match("/apps/files ... 0")/share/CE_CACHEDEV1_DATA/Web/nextcloud/index.php - line 42: OC::handleRequest()

System: Apache 2.3, PHP7.2, Nextcloud 14.0.1

Any ideas?

ghost commented 6 years ago

I'm experiencing something very similar on NextCloud 13. The indicator doesn't turn green after granting access, and I get "Exception: Creating \OCA\Files_external_dropbox\Storage\Dropbox storage failed." in the Files view.

obriat commented 6 years ago

Same here:

aakerman commented 6 years ago

Same here

Nextcloud 14.0.3 PHP Version 7.2.11 Deb Ubuntu - VPS/Dreamhost

iddo commented 6 years ago

Encountered the same issue, working with NextCloud's docker container v14.0.3.0.

{
  "reqId": "SbopiPUr1PirP6NPTTxi",
  "level": 3,
  "time": "2018-11-16T12:17:06+00:00",
  "remoteAddr": "172.19.0.3",
  "user": "iddo",
  "app": "files_external",
  "method": "PUT",
  "url": "/apps/files_external/globalstorages/1",
  "message": {
    "Exception": "Exception",
    "Message": "Creating \\OCA\\Files_external_dropbox\\Storage\\Dropbox storage failed",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/apps/files_external/lib/config.php",
        "line": 237,
        "function": "__construct",
        "class": "OCA\\Files_external_dropbox\\Storage\\Dropbox",
        "type": "->",
        "args": [
          {
            "configured": "false",
            "client_id": "<REDACTED>",
            "client_secret": "<REDACTED>",
            "token": "false"
          }
        ]
      },
      {
        "file": "/var/www/html/apps/files_external/lib/Controller/StoragesController.php",
        "line": 256,
        "function": "getBackendStatus",
        "class": "OC_Mount_Config",
        "type": "::",
        "args": [
          "\\OCA\\Files_external_dropbox\\Storage\\Dropbox",
          {
            "configured": "false",
            "client_id": "<REDACTED>",
            "client_secret": "<REDACTED>",
            "token": "false"
          },
          false,
          true
        ]
      },
      {
        "file": "/var/www/html/apps/files_external/lib/Controller/GlobalStoragesController.php",
        "line": 179,
        "function": "updateStorageStatus",
        "class": "OCA\\Files_External\\Controller\\StoragesController",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files_External\\Lib\\StorageConfig"
          },
          true
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 166,
        "function": "update",
        "class": "OCA\\Files_External\\Controller\\GlobalStoragesController",
        "type": "->",
        "args": [
          1,
          "DropboxV2",
          "files_external_dropbox",
          "oauth2::oauth2",
          {
            "configured": "false",
            "client_id": "<REDACTED>",
            "client_secret": "<REDACTED>",
            "token": "false"
          },
          {
            "encrypt": true,
            "previews": true,
            "enable_sharing": false,
            "filesystem_check_changes": 1,
            "encoding_compatibility": false,
            "readonly": false
          },
          [],
          [],
          100,
          true
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 99,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files_External\\Controller\\GlobalStoragesController"
          },
          "update"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 118,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files_External\\Controller\\GlobalStoragesController"
          },
          "update"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Files_External\\Controller\\GlobalStoragesController",
          "update",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "id": "1",
            "_route": "files_external.global_storages.update"
          }
        ]
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "->",
        "args": [
          {
            "id": "1",
            "_route": "files_external.global_storages.update"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 297,
        "function": "call_user_func",
        "args": [
          {
            "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler"
          },
          {
            "id": "1",
            "_route": "files_external.global_storages.update"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 987,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/files_external/globalstorages/1"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 42,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/apps/files_external_dropbox/lib/Storage/Dropbox.php",
    "Line": 106,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36",
  "version": "14.0.3.0"
}
paulcalabro commented 4 years ago

Has anyone managed to get this working?

iddo commented 4 years ago

Has anyone managed to get this working?

I ended up creating a dropbox docker container with a mounting point on the host that is defined as external storage within nextcloud, works great so far.