View Issue Details

IDProjectCategoryView StatusLast Update
0007316GraphQL BaseGeneralpublic2022-04-06 09:45
Reportertte Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versionv6.0.1 
Fixed in Versionv6.0.2 
Summary0007316: Internal server error 500 when requesting JWT
DescriptionFollowing the instructions on https://docs.oxid-esales.com/interfaces/graphql/en/6.0/requests.html and https://github.com/OXID-eSales/graphql-base-module I tried to obtain a token for proper authentication:

curl \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{"query": "{token(username: \"<my-username>\", password: \"<my-password>\")}"}' \
    https://<my-shop-domain>/graphql/

Unfortunately, this results in an internal server error (500) which eventually can be traced back to GraphQL\Language\Visitor::visit:273:
$result = call_user_func($visitFn, $node, $key, $parent, $path, $ancestors);

<my-username> => OXID account/email with admin rights
<my-password> => OXID account password
<my-shop-domain> => OXID shop domain

Is there something I have to take care of before obtaining the token? In addition, which users are allowed to obtain a token?

OXID version: 6.4.1

Regards,
Tobias
TagsNo tags attached.

Activities

QA

2022-03-30 16:00

administrator   ~0013812

Last edited: 2022-03-30 16:01

Hey Tobias,

I checked the issue and I could reproduce it by following the current documentation. That's because a version is pulled by composer which isn't released yet. A workaround would be to declare the exact version you want to install by the following command
composer require oxid-esales/graphql-base ^6.0.1

Alternative
composer require oxid-esales/graphql-storefront ^2.0.0

Since it works with this version (tested it with your provided curl command and with the tool Altair), the issue isn't reproducible in the tagged version. But I will acknowledge this issue, since the documentation needs to be changed.

Thank you for bringing this to our attention.

Kind regards
Michael

HR

2022-04-06 09:44

administrator   ~0013814

Fixed in 6.0.2 base patch. Can now be installed with minimum-stability 'stable' as the upload fork was tagged.