-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to check existence in Laravel AWS s3 v3 #1604
Comments
Can you fill out specific version? and what S3 provider do you use? Do you have any special configuration? I have very little to debug your issue right now 😅 |
+1, we're also experiencing this issue in Laravel 9.41 with league/flysystem-aws-s3-v3 3.10.3 |
Can you share the full stack trace and error message? There is a test case for checking file existence after deletion and that passes for S3 in CI, which runs against AWS S3: https://github.com/thephpleague/flysystem/blob/3.x/src/AdapterTestUtilities/FilesystemAdapterTestCase.php#L276 |
I'm closing this for now, re-opening when there is more info. |
It's necessary to set the following permissions for the bucket otherwise most probably receive the error.
|
I'm getting this error now and I will have to be doing some shenanigans to debug/figure it out. But in case @frankdejonge wants to improve the issue even without more information available, I would say the root cause comes from here:
which inherits this method:
and is called from here:
What essentially happens here is that there is an issue with the S3 configuration. The AWS S3 Client is giving us an exception about said issue. Flysystem is hiding that issue from us by wrapping it up on it's own exception. Laravel reporting system will report the exception Some questions that we, users, have when we see this issue are:
I understand that Flysystem is putting the
All in all, what this means is that in the ecosystem of Laravel Exception Reporting and S3 Provider, Flysystem is hiding away crucial information from it's users and making us have to write custom code to handle Flysystem Exception just so that we can know what really happened. |
Coming back here to add more info. Apparently the check for existing files never worked (aws/aws-sdk-php#2445) and always returned |
my final findings can be read here: laravel/framework#45639 Conclusion is that there is an ambiguous 403 Forbidden thrown by AWS and we're left in a state where we can't reliably determine whether to |
Bug Report
Summary
For checking file deleted success status. I check it with if file exists. Instead of returning false i am getting unable to check error.
"Unable to check existence for: uploads/file/lesson_zip/2-520123-Lesson_2_Pronouns-Project_reference.pdf on line 19 in file /var/www/html/vendor/league/flysystem/src/UnableToCheckExistence.php"
How to reproduce
The text was updated successfully, but these errors were encountered: