qruto / laravel-wave

Painless Laravel Broadcasting with SSE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: ob_flush(): Failed to flush buffer. No buffer to flush

edalzell opened this issue · comments

What happened?

Running SSE normally (redis worker running, Echo on front end).

See a ton of these in my log: https://flareapp.io/share/87newjDP

How to reproduce the bug

Run my app.

Sorry don't know the repro issue yet.

Package Version

0.7.1

PHP Version

8.2.8

Laravel Version

10.18.0

Which operating systems does with happen with?

macOS

Notes

No response

This code silences the error, not sure yet if everything still works:

if (ob_get_contents()) {
    ob_flush();
}

Hi @edalzell. Probably you have disabled output buffering on the server.

Is it works normal on a local environment?
Have you debugged what echo $this returns at ServerSentEvent::__invoke method?

Hi @edalzell. Probably you have disabled output buffering on the server.

Is it works normal on a local environment? Have you debugged what echo $this returns at ServerSentEvent::__invoke method?

This error is occurring locally. And I didn't get it before, it's a new thing.

But I did switch recently to Herd (from Brew/Valet), so maybe it is off? I'll check, thanks!

Probably we have found a source, let test it on Herd.

Confirmed, Herd does NOT have output_buffering = 4096 in its php.ini.

Sorry about the confusion.

NP, thank you for your involvement.