Problem/Motivation

I'm using JSON:API and JSON:API Extras
When I query /jsonapi/pathauto_pattern/pathauto_pattern (also manually via url) I get a WSOD

The website encountered an unexpected error. Please try again later.
AssertionError: A JSON:API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org in assert() (line 117 of core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php).
assert(, 'A JSON:API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org') (Line: 117)
Drupal\jsonapi\EventSubscriber\ResourceResponseValidator->doValidateResponse(Object, Object) (Line: 108)
Drupal\jsonapi\EventSubscriber\ResourceResponseValidator->onResponse(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 202)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 190)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Drupal 9.5.5
PHP 8.1
Enable default JSON:API and JSON:API Extras
Using default settings

Comments

stewest created an issue. See original summary.

stewest’s picture

Issue summary: View changes
stewest’s picture

Status: Active » Closed (works as designed)

Seems to be a permission issue, but if one disables /jsonapi/pathauto_pattern/pathauto_pattern the issue goes away and Gatsby is able to connect. So perhaps it is not such an issue.

barone’s picture

This issue still persists as of
Drupal 9.5.11
jsonapi_extras 8.x-3.24

Can you please confirm the URL? The /jsonapi/pathauto_pattern/pathauto_pattern does not exists.

lguigo’s picture

This issue still persists as of
Drupal 9.5.11
jsonapi_extras 8.x-3.24

BIG problem when front using Drupal as headless. Upgrade druapl 8 to 9 break the stack !!

in "include=field_image,field_mockup,field_sommaire,field_sommaire.field_image" field "field_sommaire.field_image" give error :

The website encountered an unexpected error. Please try again later.
AssertionError: A JSON:API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org in assert() (line 117 of core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php).
assert(, 'A JSON:API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org') (Line: 117)
Drupal\jsonapi\EventSubscriber\ResourceResponseValidator->doValidateResponse(Object, Object) (Line: 108)
Drupal\jsonapi\EventSubscriber\ResourceResponseValidator->onResponse(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 202)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 148)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

bbrala’s picture

Status: Closed (works as designed) » Postponed (maintainer needs more info)

Can you give a little more info, what path? Are overwrites configured?