Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rezserve's avatar

Dusk tests failing on CircleCI, cant figure out why.

Hello! We have been using Dusk for browser testing for a while now and everything was fine so far. We have several projects where we have dusk tests, but for two specific ones we get the following error:

PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /root/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:933

That only happens when running the tests inside CircleCI. It is weird because we use a custom docker image for CircleCI, and when we create a container using that same image and run the build process and tests locally, everything works fine. I know this is not really a Dusk problem but has anyone experienced something similar before? I did some research and other people had similar problems, with the same stack trace, mostly on pure PHPUnit, however, the solutions for them seem to be different for every case (when there is one) and I have tried all that I could to no avail.

0 likes
0 replies

Please or to participate in this conversation.