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

Overriding createNewSession is not working + framework dependency issue #82

Closed
maccinza opened this issue Mar 2, 2022 · 11 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@maccinza
Copy link

maccinza commented Mar 2, 2022

I have a fastapi project using supertokens-python with the following init configuration:

init(
        app_info=InputAppInfo(
            app_name=APP_NAME,
            api_domain=API_DOMAIN,
            website_domain=WEBSITE_DOMAIN,
            api_base_path=API_BASE_PATH,
            website_base_path=WEBSITE_BASE_PATH,
        ),
        supertokens_config=SupertokensConfig(
            connection_uri=SUPERTOKENS_CONNECTION_URL
        ),
        framework="fastapi",
        recipe_list=[
            session.init(
                jwt=session.JWTConfig(enable=True),
            ),
            passwordless.init(
                flow_type="MAGIC_LINK",
                contact_config=ContactEmailOnlyConfig(
                    create_and_send_custom_email=login_flow
                ),
            ),
            thirdparty.init(
                override=thirdparty.InputOverrideConfig(apis=override_thirdparty_apis),
                sign_in_and_up_feature=thirdparty.SignInAndUpFeature(
                    providers=[
                        Google(
                            client_id=GOOGLE_CLIENT_ID,
                            client_secret=GOOGLE_CLIENT_SECRET,
                        ),
                        Github(
                            client_id=GITHUB_CLIENT_ID,
                            client_secret=GITHUB_CLIENT_SECRET,
                        ),
                        Apple(
                            client_id=APPLE_CLIENT_ID,
                            client_key_id=APPLE_CLIENT_KEY_ID,
                            client_private_key=APPLE_CLIENT_PRIVATE_KEY,
                            client_team_id=APPLE_CLIENT_TEAM_ID,
                        ),
                        Facebook(
                            client_id=FACEBOOK_CLIENT_ID,
                            client_secret=FACEBOOK_CLIENT_SECRET,
                        ),
                    ]
                ),
            ),
        ],
        mode="asgi",  # use wsgi if you are running using gunicorn
        telemetry=False,
    )

I have some integration tests for the passwordless login flow that are working normally with that configuration.

I would like to add custom data to the user's session access token, so I tried following the docs: https://supertokens.com/docs/passwordless/common-customizations/user-roles/assigning-session-roles

And updated the configuration with my override_functions implementation:

session.init(
                override=session.InputOverrideConfig(functions=override_functions),
                jwt=session.JWTConfig(enable=True),
            ), 

Now the integration test for the passwordless flow fails when trying to consume the created code (POSTing to /api/signinup/code/consume) with a 500. I even tried using an empty override implementation as it follows but it still returns the 500:

from supertokens_python import init, InputAppInfo
from supertokens_python.recipe.session.interfaces import RecipeInterface
from supertokens_python.recipe import session
from typing import Union, Dict, Any

def override_functions(original_implementation: RecipeInterface):
    original_implementation_create_new_session = original_implementation.create_new_session

    async def create_new_session(request: Any, user_id: str,
                                 access_token_payload: Union[None, Dict[str, Any]],
                                 session_data: Union[None, Dict[str, Any]], user_context: Dict[str, Any]):

        return await original_implementation_create_new_session(request, user_id, access_token_payload, session_data, user_context)

    original_implementation.create_new_session = create_new_session
    return original_implementation

@rishabhpoddar
Copy link
Contributor

Which version of the SDK are you using?

@rishabhpoddar rishabhpoddar added the bug Something isn't working label Mar 2, 2022
@rishabhpoddar
Copy link
Contributor

It seems that you are using the latest version cause user_context was added only to that. Is there a stack trace I can see for the 500 error?

@rishabhpoddar rishabhpoddar self-assigned this Mar 2, 2022
@maccinza
Copy link
Author

maccinza commented Mar 2, 2022

Which version of the SDK are you using?
I'm using version 0.4.1

It seems that you are using the latest version cause user_context was added only to that. Is there a stack trace I can see for the 500 error?
There is no stack trace currently, is there a easy way to enable it for supertokens-python? The supertokens-core error log is empty and the info log doesn't show anything particularly useful:

02 Mar 2022 12:53:38:312 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [SuperTokens housekeeper] thread | io.supertokens.storage.mysql.HikariLoggingAppender.doAppend(HikariLoggingAppender.java:136) | SuperTokens - Pool stats (total=10, active=0, idle=10, waiting=0)

02 Mar 2022 12:53:52:991 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-4] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:158) | API called: /apiversion. Method: GET

02 Mar 2022 12:53:52:991 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-4] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:180) | API ended: /apiversion. Method: GET

02 Mar 2022 12:53:53:011 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-7] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:155) | API called: /recipe/handshake. Method: POST. Version: 2.12

02 Mar 2022 12:53:53:011 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-7] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:180) | API ended: /recipe/handshake. Method: POST

02 Mar 2022 12:54:08:313 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [SuperTokens housekeeper] thread | io.supertokens.storage.mysql.HikariLoggingAppender.doAppend(HikariLoggingAppender.java:136) | SuperTokens - Pool stats (total=10, active=0, idle=10, waiting=0)

02 Mar 2022 12:54:22:133 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-9] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:155) | API called: /recipe/signinup/code. Method: POST. Version: 2.12

02 Mar 2022 12:54:22:174 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-9] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:180) | API ended: /recipe/signinup/code. Method: POST

02 Mar 2022 12:54:22:244 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-1] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:155) | API called: /recipe/signinup/code/consume. Method: POST. Version: 2.12

02 Mar 2022 12:54:22:382 +0000 | DEBUG | pid: 23250e99-21aa-4b2a-8186-19c1861dbd6e | [http-nio-0.0.0.0-3567-exec-1] thread | io.supertokens.webserver.WebserverAPI.service(WebserverAPI.java:180) | API ended: /recipe/signinup/code/consume. Method: POST

@rishabhpoddar
Copy link
Contributor

Can you try upgrading to the latest version of the python SDK (0.5.0) and seeing if this error still persists?

The error is from the python SDK, so the core won't have any error logs. Since the python SDK API is throwing an error, you can add a global exception handler in fastapi and print the error there. But first do try version 0.5.0 of the python SDK

@maccinza
Copy link
Author

maccinza commented Mar 2, 2022

Can you try upgrading to the latest version of the python SDK (0.5.0) and seeing if this error still persists?

The error is from the python SDK, so the core won't have any error logs. Since the python SDK API is throwing an error, you can add a global exception handler in fastapi and print the error there. But first do try version 0.5.0 of the python SDK

Trying to use 0.5.0 makes my service break with ModuleNotFoundError: No module named 'django':

auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'
auth_supertoken_1   | Traceback (most recent call last):
auth_supertoken_1   |   File "/usr/local/bin/uvicorn", line 8, in <module>
auth_supertoken_1   |     sys.exit(main())
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
auth_supertoken_1   |     return self.main(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
auth_supertoken_1   |     rv = self.invoke(ctx)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
auth_supertoken_1   |     return ctx.invoke(self.callback, **ctx.params)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
auth_supertoken_1   |     return __callback(*args, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 426, in main
auth_supertoken_1   |     run(app, **kwargs)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 452, in run
auth_supertoken_1   |     server.run()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run
auth_supertoken_1   |     return asyncio.run(self.serve(sockets=sockets))
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
auth_supertoken_1   |     return loop.run_until_complete(main)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
auth_supertoken_1   |     return future.result()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in serve
auth_supertoken_1   |     config.load()
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 456, in load
auth_supertoken_1   |     self.loaded_app = import_from_string(self.app)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
auth_supertoken_1   |     raise exc from None
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
auth_supertoken_1   |     module = importlib.import_module(module_str)
auth_supertoken_1   |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
auth_supertoken_1   |     return _bootstrap._gcd_import(name[level:], package, level)
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
auth_supertoken_1   |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
auth_supertoken_1   |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
auth_supertoken_1   |   File "/work/./app/main.py", line 6, in <module>
auth_supertoken_1   |     from supertokens_python import get_all_cors_headers
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/__init__.py", line 18, in <module>
auth_supertoken_1   |     from . import supertokens
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/supertokens.py", line 26, in <module>
auth_supertoken_1   |     from .normalised_url_domain import NormalisedURLDomain
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/normalised_url_domain.py", line 19, in <module>
auth_supertoken_1   |     from .utils import is_an_ip_address
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/utils.py", line 25, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.framework import DjangoFramework
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/framework.py", line 15, in <module>
auth_supertoken_1   |     from supertokens_python.framework.django.django_request import DjangoRequest
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 26, in <module>
auth_supertoken_1   |     class DjangoRequest(BaseRequest):
auth_supertoken_1   |   File "/usr/local/lib/python3.10/site-packages/supertokens_python/framework/django/django_request.py", line 27, in DjangoRequest
auth_supertoken_1   |     from django.http import HttpRequest
auth_supertoken_1   | ModuleNotFoundError: No module named 'django'

And I'm not using django.

@rishabhpoddar
Copy link
Contributor

Okay thanks. Releasing a fix for that ASAP.

@maccinza
Copy link
Author

maccinza commented Mar 2, 2022

Okay thanks. Releasing a fix for that ASAP.

You might need to add flask (and other frameworks/packages too)

@rishabhpoddar
Copy link
Contributor

Thanks for pointing out this issue @maccinza . We have released a fix in our CICD pipeline + changed the tests to make sure that issues like this make the tests fail.

It should be a few hours of running tests before I can release the new version.

@maccinza
Copy link
Author

maccinza commented Mar 2, 2022

Thanks for pointing out this issue @maccinza . We have released a fix in our CICD pipeline + changed the tests to make sure that issues like this make the tests fail.

It should be a few hours of running tests before I can release the new version.

I installed both django and flask to keep testing 0.5.0 and I can say it solves my initial issue: The session override works properly and my integration tests are passing.

Thanks for all the help @rishabhpoddar !

@rishabhpoddar
Copy link
Contributor

Great! I'll close this issue once the new version is released and then you can remove the flask and django dependencies.

@rishabhpoddar rishabhpoddar changed the title Overriding createNewSession is not working Overriding createNewSession is not working + framework dependency issue Mar 2, 2022
@rishabhpoddar
Copy link
Contributor

hey @maccinza I have released a new version of the SDK: https://pypi.org/project/supertokens-python/0.5.1/

That should work without you having to add dependencies on django and flask. Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants