saleor-app-framework-python
saleor-app-framework-python copied to clipboard
Connecting to Saleor – Invalid Token Error
For three days now I'm trying to connect this framework with saleor-platform. I constantly getting response from GraphQL that token is invalid.
The only way to install this app for me is to run install_app on saleor platform – it always fails on creating webhooks, but then I can click retry on the Dashboard and then it works. However trying to /products/ on complex app always fails with the same problem as creating webhooks – saleor responds that token is invalid. The same happends if I try to validate token on GrapQL Playground.
This token was generated a minute ago and not working.
What am I doing wrong? It seems like saleor-platform and this saleor-app-framework-python not working toghether.
When I try to install_app
on saleor-platform:
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://{IP}:5000/configuration/install
on saleor-app-framework-python
INFO: 13.53.139.222:44186 - "GET /configuration/manifest/ HTTP/1.1" 307 Temporary Redirect
INFO: 13.53.139.222:44186 - "GET /configuration/manifest HTTP/1.1" 200 OK
INFO: 13.53.139.222:44190 - "GET /configuration/manifest/ HTTP/1.1" 307 Temporary Redirect
INFO: 13.53.139.222:44190 - "GET /configuration/manifest HTTP/1.1" 200 OK
Error when executing a GraphQL call to Saleor
Unable to finish installation of app for 13.53.139.222:8000.
INFO: 13.53.139.222:44192 - "POST /configuration/install HTTP/1.1" 403 Forbidden
Trying to create_app
on saleor-platform:
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://{IP}:5000/configuration/install
on saleor-app-framework-python:
INFO: 13.53.139.222:44202 - "POST /configuration/install/ HTTP/1.1" 307 Temporary Redirect
Error when executing a GraphQL call to Saleor
Unable to finish installation of app for 13.53.139.222:8000.
INFO: 13.53.139.222:44202 - "POST /configuration/install HTTP/1.1" 403 Forbidden
This is what I get on /products on saleor-app-framework-python side after install_app and retry on Dashboard:
Provided X-SALEOR-DOMAIN and X-SALEOR-TOKEN are incorrect.
INFO: 192.168.0.11:53856 - "GET /products/ HTTP/1.1" 400 Bad Request
It there anything I can do to fix this?
I will add a logger that should be there anyways to help us debug, but before that please tell me which Saleor version are you using?
I've tried 3.0 and the one that is on main branch – on both is the same problem.
The logger is (was) there. Please set the saleor_app.install
logger to DEBUG
and check for the list of GraphQL errors.
@wrobelp I was facing the same issue, I figured out that saleor's install_app
utility by default makes the tokens inactive.
When I was using ./manage.py install_app https://my-domain.com/app-manifest
- I received 403s all the time, however once I did ./manage.py install_app https://my-domain.com/app-manifest --activate
- everything worked just fine.