acquia / headless_lightning

A more opinionated flavor of Lightning for building decoupled applications. Support ended on November 2, 2021 and this project is no longer maintained.
https://lightning.acquia.com
GNU General Public License v2.0
58 stars 16 forks source link

JSON API response failed validation #103

Closed ghost closed 6 years ago

ghost commented 6 years ago

Steps to reproduce:

  1. Make GET request to /jsonapi/node/page with valid auth_token (I used Postman)

Expected result:

Returned object containing basic page nodes

Possibly related to Schemata + JSON API: "JSON API response failed validation" error message on node endpoints?

The website encountered an unexpected error. Please try again later.
<br />
<em class="placeholder">AssertionError</em>: A JSON API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org in
<em class="placeholder">assert()</em> (line
<em class="placeholder">182</em> of
<em class="placeholder">modules/contrib/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php</em>).
<pre class="backtrace">assert(, &#039;A JSON API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org&#039;) (Line: 182)
Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber-&gt;doValidateResponse(Object, Object) (Line: 172)
Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber-&gt;onResponse(Object, &#039;kernel.response&#039;, Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher-&gt;dispatch(&#039;kernel.response&#039;, Object) (Line: 193)
Symfony\Component\HttpKernel\HttpKernel-&gt;filterResponse(Object, Object, 1) (Line: 175)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 40)
Drupal\jsonapi\StackMiddleware\FormatSetter-&gt;handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 664)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>