-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Release 10.7.14: 502 Bad Gateway #3224
Comments
For me version |
Same for me and happens both locally and on my main server hosted by Hetzner. Nothing else has changed, just simply an update and anytime I try to retrieve an URL it shuts the page down with a 502 error. Downgrading to 10.7.13 works. |
I'm not seeing the error, it would be very handy if any of you would share the actual error message + stack trace here. |
Same here. Getting 502 errors when calling getMedia/getFirstMediaUrl in certain parts of our app. Broken since updating to 10.7.14 |
Nginx is loosing connection to php completely. With Laravel Sail all browsers loosing connection immediately. Somehow it's destroying the php process. Searching logs for more error details now. |
Ok, even though the tests are indicating everything is ok, I'm going to revert the changes made in the last release. |
I've just released 10.7.15 that reverts the changes of 10.7.14 In that previous version a potential N+1 probably was solved by explicitly setting a related model on a My apologies for any inconvenience. Do let me know if 10.7.15 works for you. |
Works for me. Thanks very much for the very fast reaction! |
Could you help me set up a test case for this? Which Laravel version are you using, is this from a web request or is there possibly dispatching a job? |
Laravel: 10.5.0 It fails at a very simple Livewire component. I stripped everything out of it and it still fails.
So nothing special at all... Maybe it's the Livewire serialization. When I run the same script from Tinkerwell it works. |
The error came even with one of my API routes implementation of api route return Lecturer::query()
->select('id', 'name')
->orderBy('name')
->get()
->map(function (Lecturer $lecturer) {
// Here is the touchpoint to media library!!!
$lecturer->image =
$lecturer->getFirstMediaUrl('avatar', 'thumb');
return $lecturer;
}); Lecturer Model class Lecturer extends Model implements HasMedia
{
use HasFactory;
use HasSlug;
use InteractsWithMedia;
public function registerMediaConversions(Media $media = null): void
{
$this
->addMediaConversion('preview')
->fit(Manipulations::FIT_CROP, 300, 300)
->nonQueued();
$this->addMediaConversion('thumb')
->fit(Manipulations::FIT_CROP, 130, 130)
->width(130)
->height(130);
}
public function registerMediaCollections(): void
{
$this->addMediaCollection('avatar')
->singleFile()
->useFallbackUrl(asset('img/einundzwanzig.png'));
$this->addMediaCollection('images')
->useFallbackUrl(asset('img/einundzwanzig.png'));
}
} config
|
@steveallinson @Jam0r85 Do you guys have the error in a Livewire application? |
@SebastianSchoeps Yes, it's a Livewire app. |
@steveallinson @SebastianSchoeps @HolgerHatGarKeineNode would any of you guys want to try a local version of your app with this PR? #3226 |
With the code from this PR, I no longer have PHP processes crashing. I had the same problem with Laravel Sail and locally. Now the crash is no longer present locally. But I have not tested it on the production server. |
Yes it's in livewire but also happens with an attribute in my model(s) and plain blade files.
Anytime I called the above Model and it had an uploaded file to that collection I received 502. Nothing appears in my nginx log either. I just ran composer update and suddenly I was getting 502 errors anytime I tried to interact with a media URL eg. displaying an image. I'd share an error if I could find one but I only get the 502 error page and that's it. I can confirm with @HolgerHatGarKeineNode that it seemed to mess up my local installation. I assumed it was an issue with my system but when I pushed the change to my live server the same thing happened there too. Latest version of laravel, using valet, everything up to date, etc,. |
Also experiencing this problem. I'm in the middle of a big update, so I was losing my mind trying to figure out this 502 gateway error. |
You see this after updating to the latest version of the package? (It rolls back the root cause) |
I'm having issues updating to 10.7.15 or downgrading to 10.7.13:
or
this one has shown up as well, not sure why I keep getting different flavors:
I've tried None of these have worked for me 🤔 |
Version is 10.7.15, you have 10.17.5 (I think?) |
Sorry had some typos there, updated my comment but the issue is still present:
(also, using the |
Same problem here cannot upgrade to 10.7.15 nor downgrade to 10.7.13 |
try lowering version further, 10.5.2 worked for me. |
I wasn't able to upgrade to 10.7.15 because it just kept on resolving 10.7.14 as the highest version. If I set 10.7.15 as the version for composer to use I get this:
If I try to put 10.7.13 I get this:
I believe that the root of this issue is in this PR: https://github.com/spatie/laravel-medialibrary/pull/3162/files
That 9.18 is missing |
I resolved this issue after few hours of debugging last night simply by downgrading to 10.7.12
|
Ah right, the reason why it might've worked for some is that they are on laravel 10 and this is only showing up if you're using laravel 9 as we still are:
|
I've just tagged 10.7.16 that fixes that problem. Anything between Laravel 9.18 and 10 is now allowed too. |
Updated to 10.7.16 and we're good! Thanks @freekmurze |
Yep can confirm 10.7.16 is working for me too. Thank you for the quick turn around and help. |
All good here as well! |
I receive a very strange 502 Bad Gateway that I cannot explain after upgrading to 10.7.14 when calling
getFirstMediaUrl
, but it seems to be a bit random when it appears. I don't know how to provide more information as I cannot really isolate the issue - I could present it in a call if you are interested. It seems to happen in the very basicArr::first
method of Laravel.It happens across different systems.
For now I will stick to release 10.7.13. This issue is more of an information to others that have the same problem.
The text was updated successfully, but these errors were encountered: