hevelius / files_external_onedrive

:mega: :floppy_disk: External storage support for Microsoft OneDrive
GNU General Public License v2.0
72 stars 22 forks source link

Can't configure #34

Open JediBrooker opened 4 years ago

JediBrooker commented 4 years ago

When trying to configure i just have a red exclamation mark and I can't add the onedrive as storage. All permissions in azure are set correctly. I was able to click grant access and go through the whole microsoft sign in process but upon return it won't allow me to click the tick box to add the storage option. here's the log...

`[files_external] Error: Exception: OneDrive storage not yet configured at <>

  1. /var/www/html/nextcloud/apps/files_external/lib/config.php line 273 OCA\Files_external_onedrive\Storage\OneDrive->__construct(" sensitive parameter replaced ")
  2. /var/www/html/nextcloud/apps/files_external/lib/Controller/StoragesController.php line 254 OC_Mount_Config::getBackendStatus(" sensitive parameters replaced ")
  3. /var/www/html/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php line 180 OCA\Files_External\Controller\StoragesController->updateStorageStatus(" sensitive parameters replaced ")
  4. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170 OCA\Files_External\Controller\GlobalStoragesController->update(" sensitive parameters replaced ")
  5. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99 OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Extern ... {}, "update")
  6. /var/www/html/nextcloud/lib/private/AppFramework/App.php line 125 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Extern ... {}, "update")
  7. /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47 OC\AppFramework\App::main("OCA\Files_Exte ... r", "update", OC\AppFramework\ ... {}, {id: "3",_route: ... "})
  8. <> OC\AppFramework\Routing\RouteActionHandler->__invoke({id: "3",_route: ... "})
  9. /var/www/html/nextcloud/lib/private/Route/Router.php line 299 call_user_func(OC\AppFramework\ ... {}, {id: "3",_route: ... "})
  10. /var/www/html/nextcloud/lib/base.php line 1008 OC\Route\Router->match("/apps/files_external/globalstorages/3")
    1. /var/www/html/nextcloud/index.php line 38 OC::handleRequest()

PUT /index.php/apps/files_external/globalstorages/3 from 202.185.214.188 by christian at 2020-04-20T15:35:09+00:00`

valeriop commented 4 years ago

Hi when trying to configure OneDrive external storage there is an error in log about
"Call to undefined function GuzzleHttp_idn_uri_convert()" https://github.com/guzzle/guzzle/issues/2511

I solved adding in nextcloud/apps/files_external_onedrive/composer.json: ... "require": { ... "guzzlehttp/guzzle": "^6.5"

Then run "composer update" to get latest guzzlehttp/guzzle. I didn't do a deep test but it's working now.

t-b-x commented 4 years ago

Hi Guys, same here after updating from NC 18.0.3 -> 18.0.4 OneDrive was configured correctly previously and was working fine. After Update, Plugin was disabled. After enabling "Storage is temporarily not available"

So i deleted the mount and try to re-add it as before - new error: League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_client

Checked everything in Azure, also created new application and secrets with no success. Anything changes within nextcloud?

Can you have a look? Thanks!


[index] Error: League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_client at <<closure>>

 0. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 628
    League\OAuth2\Client\Provider\GenericProvider->checkResponse(GuzzleHttp\Psr7\Response {}, {error: "invalid ... "})
 1. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 537
    League\OAuth2\Client\Provider\AbstractProvider->getParsedResponse(GuzzleHttp\Psr7\Request {})
 2. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/apps/files_external_onedrive/lib/Controller/OauthController.php line 136
    League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(League\OAuth2\Cl ... {}, {code: "Mbca0680 ... "})
 3. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Files_external_onedrive\Controller\OauthController->receiveToken("4ed5641f-9614-45bd-97d3-62dbcac4c4da", "__unmodified__", "https://cloud.i ... s", 2, "Mbca06805-3e18-80f9-e564-9d3317d97870")
 4. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_extern ... {}, "receiveToken")
 5. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_extern ... {}, "receiveToken")
 6. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Files_exte ... r", "receiveToken", OC\AppFramework\ ... {}, {_route: "files_ ... "})
 7. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "files_ ... "})
 8. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {_route: "files_ ... "})
 9. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/files_external_onedrive/oauth")
10. /var/www/vhosts/dummy.de/cloud.dummy.de/nextcloud/index.php line 38
    OC::handleRequest()

POST /index.php/apps/files_external_onedrive/oauth
ATaysikuu commented 4 years ago

Nextcloud 18.0.4 here. Same error as @t-b-x for me, I'm getting an "invalid_client_secret" error. I've been trying to configure this app, tried @valeriop solution, didn't change anything.

RAW log: { "reqId": "tyQQ5qxU8SOGUD868KEm", "level": 3, "time": "2020-05-02T10:43:02+00:00", "remoteAddr": "<CENSORED REMOTE IP>", "user": "<CENSORED USERNAME>", "app": "index", "method": "POST", "url": "/index.php/apps/files_external_onedrive/oauth", "message": { "Exception": "League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException", "Message": "invalid_client", "Code": 0, "Trace": [{ "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php", "line": 628, "function": "checkResponse", "class": "League\\OAuth2\\Client\\Provider\\GenericProvider", "type": "->", "args": [{ "__class__": "GuzzleHttp\\Psr7\\Response" }, { "error": "invalid_client", "error_description": "AADSTS7000215: Invalid client secret is provided.\r\nTrace ID: 5e9c1cf5-0d66-47fd-9c9a-06c50c780e00\r\nCorrelation ID: 8d12e711-b9bb-4175-a6a8-2f768530fdde\r\nTimestamp: 2020-05-02 10:43:02Z", "error_codes": [7000215], "timestamp": "2020-05-02 10:43:02Z", "trace_id": "5e9c1cf5-0d66-47fd-9c9a-06c50c780e00", "correlation_id": "8d12e711-b9bb-4175-a6a8-2f768530fdde", "error_uri": "https://login.microsoftonline.com/error?code=7000215" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php", "line": 537, "function": "getParsedResponse", "class": "League\\OAuth2\\Client\\Provider\\AbstractProvider", "type": "->", "args": [{ "__class__": "GuzzleHttp\\Psr7\\Request" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/lib/Controller/OauthController.php", "line": 136, "function": "getAccessToken", "class": "League\\OAuth2\\Client\\Provider\\AbstractProvider", "type": "->", "args": [{ "__class__": "League\\OAuth2\\Client\\Grant\\AuthorizationCode" }, { "code": "<CENSORED AUTHORIZATION CODE>" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 170, "function": "receiveToken", "class": "OCA\\Files_external_onedrive\\Controller\\OauthController", "type": "->", "args": ["<CENSORED CLIENT ID>", "__unmodified__", "https://<CENSORED SERVER ADDRESS>/index.php/settings/admin/externalstorages", 2, "<CENSORED AUTHORIZATION CODE>"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 99, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [{ "__class__": "OCA\\Files_external_onedrive\\Controller\\OauthController" }, "receiveToken"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/App.php", "line": 125, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [{ "__class__": "OCA\\Files_external_onedrive\\Controller\\OauthController" }, "receiveToken"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php", "line": 47, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": ["OCA\\Files_external_onedrive\\Controller\\OauthController", "receiveToken", { "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer" }, { "_route": "files_external_onedrive.oauth.receiveToken" }] }, { "function": "__invoke", "class": "OC\\AppFramework\\Routing\\RouteActionHandler", "type": "->", "args": [{ "_route": "files_external_onedrive.oauth.receiveToken" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/Route/Router.php", "line": 299, "function": "call_user_func", "args": [{ "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler" }, { "_route": "files_external_onedrive.oauth.receiveToken" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/base.php", "line": 1008, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": ["/apps/files_external_onedrive/oauth"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/index.php", "line": 38, "function": "handleRequest", "class": "OC", "type": "::", "args": [] }], "File": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/GenericProvider.php", "Line": 222, "CustomMessage": "--" }, "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0", "version": "18.0.4.2", "id": "5ead4ec022d23" }

CBerauer commented 4 years ago

NC 18.0.4: I can't configure external storage. When I try this is what I get in the log file: is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/core/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.js) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/ResourceLocator.php#105 is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/core/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.json) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/JSResourceLocator.php#114 is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/apps/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.json) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/JSResourceLocator.php#114 is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/apps/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.js) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/ResourceLocator.php#190

valeriop commented 4 years ago

NC 18.0.4: I can't configure external storage. When I try this is what I get in the log file: is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/core/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.js) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/ResourceLocator.php#105 [...]

IMHO your problem is unrelated to this issue. I think it's a misconfiguration/installation problem: /volume1/web/NCloud/core/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.js equivalent is: /volume1/web/apps/files_external_onedrive/js/onedrive.js maybe you did a link outside NC, did you ?

ATaysikuu commented 4 years ago

NC 18.0.4: I can't configure external storage. When I try this is what I get in the log file: is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/core/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.js) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/ResourceLocator.php#105 is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/core/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.json) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/JSResourceLocator.php#114 is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/apps/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.json) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/JSResourceLocator.php#114 is_file(): open_basedir restriction in effect. File(/volume1/web/NCloud/apps/files_external/js/../../../../apps/files_external_onedrive/js/onedrive.js) is not within the allowed path(s): (/volume1/web/NCloud:/volume1/Nextcloud:/dev/urandom:/var/services/tmp:/volume1/web/NCloud) at /volume1/web/NCloud/lib/private/Template/ResourceLocator.php#190

This looks like a different issue, indeed.

CBerauer commented 4 years ago

Sorted out the config issue. Now I'm also getting this: [index] Error: League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_client at <>

  1. /volume1/web/NCloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 628 League\OAuth2\Client\Provider\GenericProvider->checkResponse(GuzzleHttp\Psr7\Response {}, {error: "invalid ... "})
  2. /volume1/web/NCloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 537 League\OAuth2\Client\Provider\AbstractProvider->getParsedResponse(GuzzleHttp\Psr7\Request {})
  3. /volume1/web/NCloud/apps/files_external_onedrive/lib/Controller/OauthController.php line 136 League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(League\OAuth2\Cl ... {}, {code: "Ma79bb27 ... "})
  4. /volume1/web/NCloud/lib/private/AppFramework/Http/Dispatcher.php line 170 OCA\Files_external_onedrive\Controller\OauthController->receiveToken("2fedfca2-2c28-413f-b313-****", "unmodified", "https://beriple ... s", 2, "Ma79bb273-b95f-b521-1c56-5a28700d4670")
  5. /volume1/web/NCloud/lib/private/AppFramework/Http/Dispatcher.php line 99 OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_extern ... {}, "receiveToken")
  6. /volume1/web/NCloud/lib/private/AppFramework/App.php line 125 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_extern ... {}, "receiveToken")
  7. /volume1/web/NCloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47 OC\AppFramework\App::main("OCA\Files_exte ... r", "receiveToken", OC\AppFramework\ ... {}, {route: "files ... "})
  8. <> OC\AppFramework\Routing\RouteActionHandler->__invoke({route: "files ... "})
  9. /volume1/web/NCloud/lib/private/Route/Router.php line 299 call_user_func(OC\AppFramework\ ... {}, {route: "files ... "})
  10. /volume1/web/NCloud/lib/base.php line 1008 OC\Route\Router->match("/apps/files_external_onedrive/oauth")
    1. /volume1/web/NCloud/index.php line 38 OC::handleRequest()

POST /index.php/apps/files_external_onedrive/oauth

Any idea anyone?

salagula commented 4 years ago

Nextcloud 18.0.4 here. Same error as @t-b-x for me, I'm getting an "invalid_client_secret" error. I've been trying to configure this app, tried @valeriop solution, didn't change anything.

RAW log: { "reqId": "tyQQ5qxU8SOGUD868KEm", "level": 3, "time": "2020-05-02T10:43:02+00:00", "remoteAddr": "<CENSORED REMOTE IP>", "user": "<CENSORED USERNAME>", "app": "index", "method": "POST", "url": "/index.php/apps/files_external_onedrive/oauth", "message": { "Exception": "League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException", "Message": "invalid_client", "Code": 0, "Trace": [{ "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php", "line": 628, "function": "checkResponse", "class": "League\\OAuth2\\Client\\Provider\\GenericProvider", "type": "->", "args": [{ "__class__": "GuzzleHttp\\Psr7\\Response" }, { "error": "invalid_client", "error_description": "AADSTS7000215: Invalid client secret is provided.\r\nTrace ID: 5e9c1cf5-0d66-47fd-9c9a-06c50c780e00\r\nCorrelation ID: 8d12e711-b9bb-4175-a6a8-2f768530fdde\r\nTimestamp: 2020-05-02 10:43:02Z", "error_codes": [7000215], "timestamp": "2020-05-02 10:43:02Z", "trace_id": "5e9c1cf5-0d66-47fd-9c9a-06c50c780e00", "correlation_id": "8d12e711-b9bb-4175-a6a8-2f768530fdde", "error_uri": "https://login.microsoftonline.com/error?code=7000215" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php", "line": 537, "function": "getParsedResponse", "class": "League\\OAuth2\\Client\\Provider\\AbstractProvider", "type": "->", "args": [{ "__class__": "GuzzleHttp\\Psr7\\Request" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/lib/Controller/OauthController.php", "line": 136, "function": "getAccessToken", "class": "League\\OAuth2\\Client\\Provider\\AbstractProvider", "type": "->", "args": [{ "__class__": "League\\OAuth2\\Client\\Grant\\AuthorizationCode" }, { "code": "<CENSORED AUTHORIZATION CODE>" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 170, "function": "receiveToken", "class": "OCA\\Files_external_onedrive\\Controller\\OauthController", "type": "->", "args": ["<CENSORED CLIENT ID>", "__unmodified__", "https://<CENSORED SERVER ADDRESS>/index.php/settings/admin/externalstorages", 2, "<CENSORED AUTHORIZATION CODE>"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 99, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [{ "__class__": "OCA\\Files_external_onedrive\\Controller\\OauthController" }, "receiveToken"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/App.php", "line": 125, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [{ "__class__": "OCA\\Files_external_onedrive\\Controller\\OauthController" }, "receiveToken"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php", "line": 47, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": ["OCA\\Files_external_onedrive\\Controller\\OauthController", "receiveToken", { "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer" }, { "_route": "files_external_onedrive.oauth.receiveToken" }] }, { "function": "__invoke", "class": "OC\\AppFramework\\Routing\\RouteActionHandler", "type": "->", "args": [{ "_route": "files_external_onedrive.oauth.receiveToken" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/private/Route/Router.php", "line": 299, "function": "call_user_func", "args": [{ "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler" }, { "_route": "files_external_onedrive.oauth.receiveToken" }] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/lib/base.php", "line": 1008, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": ["/apps/files_external_onedrive/oauth"] }, { "file": "<CENSORED NEXTCLOUD LOCATION>nextcloud/index.php", "line": 38, "function": "handleRequest", "class": "OC", "type": "::", "args": [] }], "File": "<CENSORED NEXTCLOUD LOCATION>nextcloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/GenericProvider.php", "Line": 222, "CustomMessage": "--" }, "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0", "version": "18.0.4.2", "id": "5ead4ec022d23" }

same for me

daddydaycare commented 4 years ago

Sorted out the config issue. Now I'm also getting this: [index] Error: League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_client at <>

1. /volume1/web/NCloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 628
   League\OAuth2\Client\Provider\GenericProvider->checkResponse(GuzzleHttp\Psr7\Response {}, {error: "invalid ... "})

2. /volume1/web/NCloud/apps/files_external_onedrive/vendor/league/oauth2-client/src/Provider/AbstractProvider.php line 537
   League\OAuth2\Client\Provider\AbstractProvider->getParsedResponse(GuzzleHttp\Psr7\Request {})

3. /volume1/web/NCloud/apps/files_external_onedrive/lib/Controller/OauthController.php line 136
   League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(League\OAuth2\Cl ... {}, {code: "Ma79bb27 ... "})

4. /volume1/web/NCloud/lib/private/AppFramework/Http/Dispatcher.php line 170
   OCA\Files_external_onedrive\Controller\OauthController->receiveToken("2fedfca2-2c28-413f-b313-************", "**unmodified**", "https://beriple ... s", 2, "Ma79bb273-b95f-b521-1c56-5a28700d4670")

5. /volume1/web/NCloud/lib/private/AppFramework/Http/Dispatcher.php line 99
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_extern ... {}, "receiveToken")

6. /volume1/web/NCloud/lib/private/AppFramework/App.php line 125
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_extern ... {}, "receiveToken")

7. /volume1/web/NCloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\Files_exte ... r", "receiveToken", OC\AppFramework\ ... {}, {_route: "files_ ... "})

8. <>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "files_ ... "})

9. /volume1/web/NCloud/lib/private/Route/Router.php line 299
   call_user_func(OC\AppFramework\ ... {}, {_route: "files_ ... "})

10. /volume1/web/NCloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/files_external_onedrive/oauth")

11. /volume1/web/NCloud/index.php line 38
    OC::handleRequest()

POST /index.php/apps/files_external_onedrive/oauth

Any idea anyone?

This is the error I get too. Grant access seemed to work, but still have red mark, and the error in log is League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_client

stuba commented 3 years ago

Same problem here with 19.0.4

hevelius commented 3 years ago

Hi guys,

I have started to work on files_external_onedrive to resolves several compatibilities issues with version of NC>=18. The error you mention above is releated to a new feature that hidden secret parameters with oauth2 auth method.

So on the second request the value of client_secret is wrong because replaced with "unmodified".

I have resolved this issue on the develop branch and for the end of this month I hope to release a new verion of files_external_onedrive.

CBerauer commented 3 years ago

Very cool. Looking forward to try it out.

Am 11.12.2020 um 14:46 schrieb Mario notifications@github.com:

 Hi guys,

I have started to on files_external_onedrive to resolves several compatibilities issues with version of NC>=18. The error you mention above is releated to a new feature that hidden secret parameters with oauth2 auth method.

So on the second request the value of client_secret is wrong because replaced with "unmodified".

I have resolved this issue on the develop branch and for the end of this month I hope to release a new verion of files_external_onedrive.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

atkulp commented 2 years ago

I see this is marked as closed, but using the latest version of the app with NC 21.0.4 I still see "unmodified" for client_secret in step 2. is there any other trick to try?