-
Notifications
You must be signed in to change notification settings - Fork 478
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
"LogManager not found in ..." when Sail uses PHP8.1 build. #286
Comments
I can't reproduce this issue. Everything works as expected with 8.1 |
I can confirm this issue. First request works, then each subsequent request fails with this output. Also on Linux, Pop!_OS 21.04 |
I am having this issue with 8.1 too. Ubuntu 21.04 |
In the meantime I literally just copied the config from the 8.1 docker folder to 8.0, did a find-replace changing all occurrences of 8.1 to 8.0, and ran 8.0 instead of 8.1 from docker-compose.yml. Now it works!. It seems to be something to do with the combination of Docker/Sail, Linux, and PHP 8.1 🤔 My Windows colleague doesn't seem to have this issue. @driesvints to reproduce it, it might require running Sail with 8.1 in a Linux VM or something. |
What were the changes? |
I just took my custom Dockerfile for 8.1 and converted it to 8.0 by doing a find and replace. Vast majority of changes were just which php extensions to download, like Here are some other environment specs:
|
Oddly, it's working for me now... but it doesn't work immediately after running |
Also having the exact same issue.
Running through |
@SteveEdson this is the issue tracker for Sail so if you say this is happening through artisan serve then that seems to be a general framework issue? I haven't been able to reproduce this at all. If anyone can give me a clear way to reproduce this on a vanilla Laravel install without Sail then I can have a look. |
@driesvints I've been hounding this issue now for about 8 hours and I've traced through hundreds of errors, but was finally able to get it to a repdocueable state.
The issue revolves around the /**
* Handle an incoming HTTP request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
throw new \Exception();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
dd("I should make it here safely... correct?");
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
} This is the end of my debugging, but there is a problem here and it is directly related to php 8.1. |
@driesvints If I do not have the dump statement within the code the error is a silent failure and leaves the user with a |
This issue should be fixed in the next Laravel Framework version. So, next week. |
It seems to be related to a bug in php's opcache: php/php-src#8164 Will leave a comment there tomorrow |
Description:
So I chose PHP 8.1 version and ran the command
sail build --no-cache
thensail up
. The first request is fine but after reloading the page I'm getting the error:Changing the
LOG_CHANNEL
env variable to file, stdout, etc. helps for the first request again and then the same issue arises.Downgrading the PHP version to 8 fixes the problem.
Steps To Reproduce:
In docker-compose.yml replace the PHP version with 8.1. Run the command
sail build --no-cache
, thensail up
and see the result after reloading a page several times.The text was updated successfully, but these errors were encountered: