Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297294

Symfony\Component\Serializer\Exception\NotEncodableValueException: Syntax error in Symfony\Component\Serializer\Encoder\JsonDecode->decode()

$
0
0

When trying to send a post request to authenticate user

i.e.

curl -X POST \
  'http://localhost/Drupal/user/login?_format=json' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'name="admin"' \
  -F 'pass="admin"'

Getting error:

The website encountered an unexpected error. Please try again later

.

Message:

Symfony\Component\Serializer\Exception\NotEncodableValueException: Syntax error in Symfony\Component\Serializer\Encoder\JsonDecode->decode() (line 78 of F:\Program Files\\Drupal\vendor\symfony\serializer\Encoder\JsonDecode.php).

in public function decode($data, $format, array $context = []){}, $data is empty


Viewing all articles
Browse latest Browse all 297294

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>