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

Unhandled exception #717

Open
patroqueeet opened this issue Mar 26, 2024 · 5 comments
Open

Unhandled exception #717

patroqueeet opened this issue Mar 26, 2024 · 5 comments
Assignees
Labels

Comments

@patroqueeet
Copy link

patroqueeet commented Mar 26, 2024

Dear

this line could return None

method = self.get_method()

which will fail in the next line with:

Screenshot 2024-03-26 at 12 54 12

which will then show the user a 500 error and break his/her flow...

@moggers87
Copy link
Collaborator

Please include as many relevant details about the environment you experienced the bug in:

  • Browser and version
  • Python version
  • Django version
  • django-otp version
  • django-two-factor-auth version

If you can, also provide steps to reproduce this bug.

@patroqueeet
Copy link
Author

@moggers87 I provided exact code path to your repo and the logic fail explanation. did you even try to understand? there is no need to provide the details you asked for, the error is obvious.

@moggers87
Copy link
Collaborator

Your bug report is very unclear. Is this a theoretical issue as we're not guarding against get_method returning None or have you actually seen this exception happen? If it's the latter, steps to reproduce the exception are required.

@moggers87 moggers87 self-assigned this Apr 10, 2024
@patroqueeet
Copy link
Author

Good morning, the above screenshot is from Sentry for a PROD system. So indeed it truly happens. If that helps (but I don't see how):py 3.11, dj 4.1, otp 1.3, tfa 1.16.0. steps to reproduce are unclear as I don't know what the user did. Browser was Samsung Internet on Android.

moggers87 added a commit to moggers87/django-two-factor-auth that referenced this issue Apr 11, 2024
Returning None makes it more difficult to track down cases where
an unregistered method has been used as it results in an unhelpful error
such as reported in jazzband#717
@moggers87 moggers87 added the bug label Apr 11, 2024
@patroqueeet
Copy link
Author

patroqueeet commented Apr 30, 2024

good morning, pls note. it just happened once more. again on a Samsung android device 🤔 - pls let me know, once its released, then I can report back if it keeps happening. maybe with more precise debugging information.

moggers87 added a commit to moggers87/django-two-factor-auth that referenced this issue May 23, 2024
Returning None makes it more difficult to track down cases where
an unregistered method has been used as it results in an unhelpful error
such as reported in jazzband#717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants