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

Bug: Login with code instead of password #198

Open
2 tasks done
ttraxxrepo opened this issue Sep 2, 2024 · 2 comments
Open
2 tasks done

Bug: Login with code instead of password #198

ttraxxrepo opened this issue Sep 2, 2024 · 2 comments
Labels
bug Something isn't working stale

Comments

@ttraxxrepo
Copy link

ttraxxrepo commented Sep 2, 2024

Before submitting a bug report...

  • This bug wasn't already reported.
    (I have checked every bug report on GitHub)

  • I've cleared the sessions folder.

Branch

master

Commit

0a94091

Describe the bug

Sometimes when logging in to Microsoft, it defaults to emailing a 2fa code instead of pulling up the input to provide a password.

Proposed after entering username in the login input, the following code to click "Use Your Password Instead" switch to the password input should the code option be what defaults:

        # If it sends email code, switch to password
        if sb.is_element_visible("#idA_PWD_SwitchToPassword"):
            sb.uc_click("#idA_PWD_SwitchToPassword")

Copy and paste your error

2024-09-02 16:53:22 [ERROR] [root] [main.py:42] 
Traceback (most recent call last):
  File "/msrewards/main.py", line 40, in main
    earned_points = executeBot(currentAccount, args)
  File "/msrewards/main.py", line 235, in executeBot
    with Browser(mobile=False, account=currentAccount, args=args) as desktopBrowser:
  File "/msrewards/src/browser.py", line 52, in __init__
    self.webdriver = self.browserSetup()
  File "/msrewards/src/browser.py", line 109, in browserSetup
    driver = webdriver.Chrome(
  File "/usr/local/lib/python3.10/dist-packages/seleniumwire/undetected_chromedriver/webdriver.py", line 61, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/undetected_chromedriver/__init__.py", line 466, in __init__
    super(Chrome, self).__init__(
  File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/chromium/webdriver.py", line 66, in __init__
    super().__init__(command_executor=executor, options=options)
  File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 212, in __init__
    self.start_session(capabilities)
  File "/usr/local/lib/python3.10/dist-packages/undetected_chromedriver/__init__.py", line 724, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 299, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
  File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 354, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: cannot connect to chrome at 127.0.0.1:42801
from chrome not reachable
Stacktrace:
#0 0x5581889fc86a <unknown>
#1 0x5581886cac91 <unknown>
#2 0x5581886b693f <unknown>
#3 0x558188708813 <unknown>
#4 0x5581886fe4bc <unknown>
#5 0x55818874b64e <unknown>
#6 0x55818874ae66 <unknown>
#7 0x55818873f233 <unknown>
#8 0x55818870d093 <unknown>
#9 0x55818870e09e <unknown>
#10 0x5581889c3acb <unknown>
#11 0x5581889c7a81 <unknown>
#12 0x5581889af695 <unknown>
#13 0x5581889c85f2 <unknown>
#14 0x55818899486f <unknown>
#15 0x5581889eb668 <unknown>
#16 0x5581889eb832 <unknown>
#17 0x5581889fb65c <unknown>
#18 0x7fe29313cac3 <unknown>
all values are hidden
2024-09-02 16:53:22 [WARNING] [root] [utils.py:55] config-private.yaml doesn't exist
2024-09-02 16:53:22 [INFO] [root] [main.py:65] [POINTS] Data saved for the next day.

Screenshots

Screenshot 2024-09-02 at 4 49 39 PM

Value of dashboard variable

N/A

@ttraxxrepo ttraxxrepo added the bug Something isn't working label Sep 2, 2024
@cal4
Copy link
Collaborator

cal4 commented Sep 7, 2024

Try reproducing, #201 has changed this code a bit

Copy link

github-actions bot commented Jan 5, 2025

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants