modmore / GoogleDriveMediaSource

A media source for MODX 3.0+ to integrate your Google Drive storage.
https://docs.modmore.com/en/Open_Source/GoogleDrive/index.html
4 stars 0 forks source link

Outside of allowed scope #3

Open elitistphoenix opened 9 months ago

elitistphoenix commented 9 months ago

I go to server/manager/?a=media/browser and select the "filesystem". Setup seemed to go without issue all auth'd and user has access to shared drive. Setup the media source root to the shared drive root. Clicked it in the link above and get "Outside of allowed scope"

I saw this in the nginx logs if that helps.

`2023/12/04 04:42:50 [error] 1426#1426: *255 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught League\Flysystem\UnableToRetrieveMetadata: Outside of allowed scope in /var/www/html/core/components/googledrivemediasource/src/Adapter/DriveAdapter.php:686 Stack trace:

0 /var/www/html/core/components/googledrivemediasource/src/Adapter/DriveAdapter.php(127): modmore\GoogleDriveMediaSource\Adapter\DriveAdapter->limitToRoot()

1 /var/www/html/core/components/googledrivemediasource/src/Adapter/DriveAdapter.php(157): modmore\GoogleDriveMediaSource\Adapter\DriveAdapter->get()

2 /var/www/html/core/components/googledrivemediasource/src/Adapter/DriveAdapter.php(550): modmore\GoogleDriveMediaSource\Adapter\DriveAdapter->list()

3 /var/www/html/core/components/googledrivemediasource/src/Model/GoogleDriveMediaSource.php(781): modmore\GoogleDriveMediaSource\Adapter\DriveAdapter->listContents()

4 /var/www/html/core/src/Revolution/Processors/Browser/Directory/GetFiles.php(46): modmore\GoogleDriveMediaSource\Model\GoogleDriveMediaSource->getObjectsInContainer()

5 /var" while reading response header from upstream, client: myip, server: server, request: "POST /connectors/index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "server", referrer: "https://server/manager/?a=media/browser"`

Mark-H commented 9 months ago

Does it work if you try setting a different root in the media source settings?

elitistphoenix commented 9 months ago

I does work if I set it to "root"/the users personal drive. And yes, I did check that the user has full access to the shared drive in the G Drive webui

elitistphoenix commented 9 months ago

I've tried a few different things and checked more logs and I can't find anything to get it working. Any ideas?