Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanic 19.12.2 issues with CORS #43

Closed
HarpoMarxHr opened this issue Apr 16, 2020 · 1 comment
Closed

Sanic 19.12.2 issues with CORS #43

HarpoMarxHr opened this issue Apr 16, 2020 · 1 comment

Comments

@HarpoMarxHr
Copy link

Hi, I have a question regarding CORS plugin for Sanic.
These are packages currently installed on my system:
sanic==19.12.2
sanic-base-extension==0.1.1
Sanic-Cors==0.10.0.post3
sanic-jwt==1.4.0
Sanic-Plugins-Framework==0.9.0
sanic-redis-extension==0.1.1

I run sanic server behind uvicorn, the issue is that there is an exception on every request id CORS is implemented.

Error example:
[2020-04-16 15:02:41 +0200] [13792] [ERROR] Exception occurred while handling uri: 'http://192.168.43.55/api/auth'
Traceback (most recent call last):
File "/home/some_user/.virtualenvs/some_venv/lib/python3.7/site-packages/sanic/app.py", line 946, in handle_request
request, request_name=name
File "/home/some_user/.virtualenvs/some_venv/lib/python3.7/site-packages/spf/framework.py", line 603, in _run_request_middleware_19_12
"App must be running before you can run middleware!"
AssertionError: App must be running before you can run middleware!
ERROR: Exception occurred while handling uri: 'http://192.168.43.55/api/auth'
Traceback (most recent call last):
File "/home/some_user/.virtualenvs/some_venv/lib/python3.7/site-packages/sanic/app.py", line 946, in handle_request
request, request_name=name
File "/home/some_user/.virtualenvs/some_venv/lib/python3.7/site-packages/spf/framework.py", line 603, in _run_request_middleware_19_12
"App must be running before you can run middleware!"
AssertionError: App must be running before you can run middleware!
[2020-04-16 15:02:41 +0200] [13792] [INFO] POST - http://192.168.43.55/api/auth - 500

@ashleysommer
Copy link
Owner

Sorry for late reply.
This was discussed in #47
And was fixed in Sanic-Plugins-Framework v0.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants