While working on Drupal 8 site, At some point I received the error below:

The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "access_check.contact_personal" has a dependency on a non-existent service "user.data". in Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences() (line 58 of /home/rajib/websites/d8/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php).
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences(Array) (Line: 42)
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processDefinition(Object) (Line: 36)
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->process(Object) (Line: 107)
Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 593)
Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1202)
Drupal\Core\DrupalKernel->compileContainer() (Line: 824)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 437)
Drupal\Core\DrupalKernel->boot() (Line: 627)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I suspect this is due to features I created, but the error message is so enigmatic that its very hard to find which module or what piece of code caused it.

what do you think about pretty error handling like Whoops at least in debug mode? It'd be easier for us to report the error to the module maintainer too when we know what module causes the error, along with the steps to reproduce it.

Comments

Anonymous’s picture

rajibmp created an issue. See original summary.

cilefen’s picture

Title: Simple and understandable debug message or pretty error handler » Replace plain exception backtraces with something friendlier and more useful
Component: render system » base system
Priority: Critical » Normal
Issue tags: -debug output +DX (Developer Experience)

Feature requests are not critical and as far as I am concerned, normal priority until shown otherwise.

dawehner’s picture

cilefen’s picture

Status: Active » Closed (duplicate)

Indeed.

willzyx’s picture

If you are intrested I have create a little sandbox module that integrate Whoops library with Drupal 8 https://www.drupal.org/sandbox/willzyx/2751843

Any help/suggestion is really appreciated :)

akalam’s picture