Skip to content
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

Glide error: Unable to read file from location #7350

Open
stuartcusackie opened this issue Jan 13, 2023 · 3 comments
Open

Glide error: Unable to read file from location #7350

stuartcusackie opened this issue Jan 13, 2023 · 3 comments
Labels

Comments

@stuartcusackie
Copy link

stuartcusackie commented Jan 13, 2023

Bug description

Just had a random crash as a client was editing content.

Unable to read file from location: containers/images/clubs/aston-quay-44.jpg/35460d82eb5142426fb66450f2dc015c.jpg.

I FTPd to the server to check the cache folders at storage/statamic/glide/containers/etc and the file was missing. I guess there was a reference to this file somewhere in storage/framework/cache/glide but for some reason the file did not exist.

I am using Spatie's responsive image package so I opened an issue there and the problem appears to have been solved by a package update. I will keep this issue open though as the author (ncla) states that Statamic catches these errors for glide:data_uri however the same error can still occur for glide:data_url

How to reproduce

No idea.

Logs

{
    "class": "Spatie\\LaravelIgnition\\Exceptions\\ViewException",
    "message": "Unable to read file from location: containers/images/clubs/aston-quay-44.jpg/35460d82eb5142426fb66450f2dc015c.jpg.",
    "code": 0,
    "file": "/home/forge/mysite.ie/vendor/league/flysystem/src/UnableToReadFile.php:24",
    "trace": [
        "/home/forge/mysite.ie/vendor/league/flysystem/src/Local/LocalFilesystemAdapter.php:265",
        "/home/forge/mysite.ie/vendor/league/flysystem/src/Filesystem.php:75",
        "/home/forge/mysite.ie/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php:951",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Breakpoint.php:269",
        "/home/forge/mysite.ie/vendor/spatie/blink/src/Blink.php:279",
        "/home/forge/mysite.ie/vendor/statamic/cms/src/Support/Blink.php:18",
        "/home/forge/mysite.ie/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:338",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Breakpoint.php:278",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Breakpoint.php:215",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Breakpoint.php:246",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Breakpoint.php:62",
        "/home/forge/mysite.ie/vendor/laravel/framework/src/Illuminate/Conditionable/Traits/Conditionable.php:34",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Breakpoint.php:63",
        "/home/forge/mysite.ie/vendor/spatie/statamic-responsive-images/src/Tags/ResponsiveTag.php:75",
        "/home/forge/mysite.ie/vendor/laravel/framework/src/Illuminate/Collections/Arr.php:560",
        "/home/forge/mysite.ie/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:739",

Environment

Environment
Laravel Version: 9.43.0
PHP Version: 8.1.12

Statamic
Version: 3.3.60 PRO

Statamic Addons
jonassiewertsen/statamic-live-search: 1.5.1
jonassiewertsen/statamic-livewire: 2.9.0
justbetter/statamic-image-optimize: 1.1.4
rias/statamic-redirect: 2.5.0
spatie/statamic-responsive-images: 2.14.4
statamic/seo-pro: 3.1.3
stuartcusackie/statamic-cache-requester: 1.0.2

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

@ncla
Copy link
Contributor

ncla commented Jan 14, 2023

I have found one way to trigger this consistently is by changing the image_manipulations.cache config value from false to true.

Two other people in Responsive Images have also reported that this can happen when editing content, one of them saying that it is possible that they were editing while a deploy was happening. However I am not aware of reproducible steps for this one unfortunately.

@joshuablum
Copy link
Member

joshuablum commented Apr 22, 2024

Hey @stuartcusackie,

Since this came up in on our helpdesk I'm curious: Which cache driver are you using? Redis by any chance?

@stuartcusackie
Copy link
Author

Hi @joshuablum

It's been a while but it must be using the File cache driver, since that's all I ever use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants