govigilant / statamic-gpt-spell-corrector

Automatically correct spelling in Statamic Bard fields using OpenAI
MIT License
0 stars 0 forks source link

Failed to flush buffer. #1

Open axelferdinand opened 2 hours ago

axelferdinand commented 2 hours ago

So, I managed to get this working properly locally, but in production I get the following error:

Failed to flush buffer. No buffer to flush at /home2/nimbus/vendor/govigilant/statamic-gpt-spell-corrector/src/Http/Controllers/SpellCorrectorController.php:39)

Any idea how to fix this?

axelferdinand commented 2 hours ago

Here's the full error:

[2024-10-09 10:01:19] production.ERROR: ob_flush(): Failed to flush buffer. No buffer to flush {"userId":"4882aee5-cbd6-4416-9f86-6fce956a25ce","exception":"[object] (ErrorException(code: 0): ob_flush(): Failed to flush buffer. No buffer to flush at /home2/nimbus/vendor/govigilant/statamic-gpt-spell-corrector/src/Http/Controllers/SpellCorrectorController.php:39)
[stacktrace]
#0 /home2/nimbus/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'ob_flush(): Fai...', '/home2/nimbus/v...', 39)
#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(8, 'ob_flush(): Fai...', '/home2/nimbus/v...', 39)
#2 /home2/nimbus/vendor/govigilant/statamic-gpt-spell-corrector/src/Http/Controllers/SpellCorrectorController.php(39): ob_flush()
#3 /home2/nimbus/vendor/symfony/http-foundation/StreamedResponse.php(106): Vigilant\\GptSpellCorrector\\Http\\Controllers\\SpellCorrectorController->Vigilant\\GptSpellCorrector\\Http\\Controllers\\{closure}()
#4 /home2/nimbus/vendor/symfony/http-foundation/Response.php(395): Symfony\\Component\\HttpFoundation\\StreamedResponse->sendContent()
#5 /home2/nimbus/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1188): Symfony\\Component\\HttpFoundation\\Response->send()
#6 /home2/nimbus/public/index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request))
#7 {main}
"}