A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
I was trying to deploy saleor dashboard and storefront using nginx.
Successfully deployed Django server and stroefront server and dashboard server, but facing bellow issue while loggin into dasbhoard.
On npm start everything works normally but from nginx facing this issue.
after entering credentials it take me to home page, but when I try access product list or any other pages my JWT session get expired
Error on error.log
Traceback (most recent call last):
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, *args)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executors/sync.py", line 16, in execute
return fn(args, kwargs)
File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 59, in app_middleware
return next(root, info, kwargs)
File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 23, in resolve
return super().resolve(next, root, info, kwargs)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/middleware.py", line 72, in resolve
user = authenticate(request=context, kwargs)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/django/contrib/auth/init.py", line 72, in authenticate
user = backend.authenticate(request, **credentials)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/backends.py", line 14, in authenticate
return get_user_by_token(token, request)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/shortcuts.py", line 20, in get_user_by_token
payload = get_payload(token, context)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 90, in getpayload
raise exceptions.JSONWebTokenError(('Error decoding signature'))
graphql_jwt.exceptions.JSONWebTokenError: Error decoding signature
ERROR saleor.graphql.errors.handled A query had an error [PID:1385:MainThread]
Traceback (most recent call last):
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 86, in get_payload
payload = jwt_settings.JWT_DECODE_HANDLER(token, context)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 45, in jwt_decode
return jwt.decode(
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/jwt/api_jwt.py", line 91, in decode
decoded = super(PyJWT, self).decode(
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/jwt/api_jws.py", line 155, in decode
self._verify_signature(payload, signing_input, header, signature,
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/jwt/api_jws.py", line 223, in _verify_signature
raise InvalidSignatureError('Signature verification failed')
jwt.exceptions.InvalidSignatureError: Signature verification failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, *args)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executors/sync.py", line 16, in execute
return fn(args, kwargs)
File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 59, in app_middleware
return next(root, info, kwargs)
File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 23, in resolve
return super().resolve(next, root, info, kwargs)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/middleware.py", line 72, in resolve
user = authenticate(request=context, kwargs)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/django/contrib/auth/init.py", line 72, in authenticate
user = backend.authenticate(request, **credentials)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/backends.py", line 14, in authenticate
return get_user_by_token(token, request)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/shortcuts.py", line 20, in get_user_by_token
payload = get_payload(token, context)
File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 90, in getpayload
raise exceptions.JSONWebTokenError(('Error decoding signature'))
graphql_jwt.exceptions.JSONWebTokenError: Error decoding signature
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What I'm trying to achieve
I was trying to deploy saleor dashboard and storefront using nginx. Successfully deployed Django server and stroefront server and dashboard server, but facing bellow issue while loggin into dasbhoard. On
npm start
everything works normally but from nginx facing this issue.Steps to reproduce the problem
dasbhoiard nginx conf
django nginx conf file:
build is created and able run on specific port
after entering credentials it take me to home page, but when I try access product list or any other pages my JWT session get expired
Error on error.log
Traceback (most recent call last): File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error return executor.execute(resolve_fn, source, info, *args) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executors/sync.py", line 16, in execute return fn(args, kwargs) File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 59, in app_middleware return next(root, info, kwargs) File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 23, in resolve return super().resolve(next, root, info, kwargs) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/middleware.py", line 72, in resolve user = authenticate(request=context, kwargs) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/django/contrib/auth/init.py", line 72, in authenticate user = backend.authenticate(request, **credentials) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/backends.py", line 14, in authenticate return get_user_by_token(token, request) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/shortcuts.py", line 20, in get_user_by_token payload = get_payload(token, context) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 90, in getpayload raise exceptions.JSONWebTokenError(('Error decoding signature')) graphql_jwt.exceptions.JSONWebTokenError: Error decoding signature ERROR saleor.graphql.errors.handled A query had an error [PID:1385:MainThread] Traceback (most recent call last): File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 86, in get_payload payload = jwt_settings.JWT_DECODE_HANDLER(token, context) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 45, in jwt_decode return jwt.decode( File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/jwt/api_jwt.py", line 91, in decode decoded = super(PyJWT, self).decode( File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/jwt/api_jws.py", line 155, in decode self._verify_signature(payload, signing_input, header, signature, File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/jwt/api_jws.py", line 223, in _verify_signature raise InvalidSignatureError('Signature verification failed') jwt.exceptions.InvalidSignatureError: Signature verification failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error return executor.execute(resolve_fn, source, info, *args) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql/execution/executors/sync.py", line 16, in execute return fn(args, kwargs) File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 59, in app_middleware return next(root, info, kwargs) File "/home/user/projects/MB365/salaor/saleor_core/saleor/graphql/middleware.py", line 23, in resolve return super().resolve(next, root, info, kwargs) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/middleware.py", line 72, in resolve user = authenticate(request=context, kwargs) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/django/contrib/auth/init.py", line 72, in authenticate user = backend.authenticate(request, **credentials) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/backends.py", line 14, in authenticate return get_user_by_token(token, request) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/shortcuts.py", line 20, in get_user_by_token payload = get_payload(token, context) File "/home/user/projects/MB365/mbenv/lib/python3.8/site-packages/graphql_jwt/utils.py", line 90, in getpayload raise exceptions.JSONWebTokenError(('Error decoding signature')) graphql_jwt.exceptions.JSONWebTokenError: Error decoding signature