Comments (8)
Ok so I made some progress.
Looks like either not using the GOOGLE_DRIVE_FOLDER
variable or setting the backup name to ""
in the spatie backup config works. But if I try to define a custom folder and leave the default name in the backup config to env('APP_NAME')
, then it fails.
I'm not sure where the problem lies here but I suspect that if the spatie backup feature is working for all the other file systems then I imagine it's something that this file system does differently. I tried to investigate more but I'm out of time to keep looking around for now.
One thing I did notice is that in the laravel-google-drive-ext-demo, in the routes file (web.php
), these lines:
Route::get('list-files', function() {
$recursive = false; // Get subdirectories also?
$contents = collect(Storage::cloud()->listContents('/', $recursive));
If I change the /
to any other directory, I get the same error that it's not found even though the directory exists. For example:
$contents = collect(Storage::cloud()->listContents('dominarelingles', $recursive));
Is that listContents
method supposed to allow us to define where we want to look, or is it only supposed to be used with the root directory, or is there something I'm missing here?
from flysystem-google-drive-ext.
I'm still facing the same issue, it works well when you omit a folder name but when you add the folder to the environment path it gives the same error. I got this error when trying to implement spatie backup with the package.
Also this error is not in version 1.0.0 but too bad I can't downgrade to this version on laravel 9. I hope this issue get fixed soon
Here is a fix for this issue. Check the last comment. I hope this helps
#77
from flysystem-google-drive-ext.
Hello @chrisrollins65 ,
I was having the exact same problem you mention, I spent many hours struggling and trying to find a solution for this error. I tried your workaround and it worked perfectly for me.
Just wanted to thank you for updating this Issue with your findings.
from flysystem-google-drive-ext.
This package doesn't use folderId, just folder name(regular path), read documentation
from flysystem-google-drive-ext.
Thanks, sorry I missed that. I've made the following changes but the error still occurs:
Service provider:
$adapter = new GoogleDriveAdapter($service, $config['folder']);
filesystems.php:
'folder' => env('GOOGLE_DRIVE_FOLDER'),
.env:
GOOGLE_DRIVE_FOLDER="Dominar el ingles"
Also tried this:
GOOGLE_DRIVE_FOLDER="/Dominar el ingles"
The folder is at the root of my Drive.
Seems like this is what the documentation says to do but it's still not working...
from flysystem-google-drive-ext.
Team drive??
Here is a working demo: laravel-google-drive-ext-demo
Also avoid whitespace
from flysystem-google-drive-ext.
Not a team drive, my own personal unshared drive.
I'll try installing that demo and seeing if it works for me.
On my own personal app I set GOOGLE_DRIVE_FOLDER
to dominarelingles
and also changed the name to match in my Google Drive. It still gives me the exact same error that it is unable to find "Dominar el ingles". I'm running this command as it is much faster than the backup command:
php artisan backup:list
Looks like there's a setting in spatie's backups.php
where it sets the name to the app name:
'name' => env('APP_NAME', 'laravel-backup'),
And it looks like that's what is used by this package when looking? That would explain why it's still looking for "Dominar el ingles" instead of "dominarelingles" like I changed it to.
Curiously, if I omit that environment variable altogether (so it should be null
), I don't get any error. Instead I get this:
> php artisan backup:list
+-------------------+--------+-----------+---------+--------------+--------------------+--------------+
| Name | Disk | Reachable | Healthy | # of backups | Newest backup | Used storage |
+-------------------+--------+-----------+---------+--------------+--------------------+--------------+
| Dominar el ingles | google | ✅ | ❌ | 0 | No backups present | 0 KB |
+-------------------+--------+-----------+---------+--------------+--------------------+--------------+
Unhealthy backup destinations
-----------------------------
+-------------------+--------+------------------+----------------------------------------------------------+
| Name | Disk | Failed check | Description |
+-------------------+--------+------------------+----------------------------------------------------------+
| Dominar el ingles | google | Maximumageindays | No existe ninguna copia de seguridad de esta aplicación. |
+-------------------+--------+------------------+----------------------------------------------------------+
from flysystem-google-drive-ext.
I'm still facing the same issue, it works well when you omit a folder name but when you add the folder to the environment path it gives the same error. I got this error when trying to implement spatie backup with the package.
Also this error is not in version 1.0.0 but too bad I can't downgrade to this version on laravel 9. I hope this issue get fixed soon
from flysystem-google-drive-ext.
Related Issues (20)
- creating a new folder in my drive HOT 2
- Backup failed because: Unable to write file at location: HOT 11
- Invalid value at 'payload' (Map) ? HOT 6
- Error in masbug because upgrade system Google API HOT 5
- Duplicate root directories created when instantiating the adapter HOT 3
- 401 Request had invalid authentication credentials (laravel jobs) HOT 4
- Don't list files and Directories in shared folder HOT 1
- Laravel 10 support HOT 2
- Can't display paths, just IDs HOT 1
- How to move app to live HOT 1
- Argument #1 ($value) must be of type Countable|array, null given in GoogleDriveAdapter.php:1037 HOT 3
- Fails to report delete error
- Moving folders will fall into the trash HOT 3
- Allowed memory size issue HOT 1
- When uploading a file to a shared folder, the file doesn't end up in the desired destination. HOT 10
- PHP Warning: Invalid argument supplied for foreach() in vendor/masbug/flysystem-google-drive-ext/src/GoogleDriveAdapter.php on line 1104 HOT 19
- listContents returns empty array HOT 3
- Move Shared Drive file to a folder HOT 2
- cannot list directory shortcuts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flysystem-google-drive-ext.