ibeam: Unable to enter 2FA into ibeam - change in login page html?

Describe the bug Since around 2 PM Sunday UK time I got into a fail loop authenticating with these error messages

2022-02-13 14:07:17,356|I| Gateway session found but not authenticated, authenticating...
2022-02-13 14:07:25,115|I| Credentials correct, but Gateway requires two-factor authentication.
2022-02-13 14:07:25,116|I| Attempting to acquire 2FA code from: GoogleMessagesTwoFaHandler(driver_path=/usr/bin/chromedriver)
2022-02-13 14:07:30,731|I| Your requested authentication code: 464625
2022-02-13 14:07:31,752|E| Error encountered while acquiring 2FA code.
Traceback (most recent call last):
  File "/srv/ibeam/src/authenticate.py", line 304, in handle_two_fa
    two_fa_code = two_fa_handler.get_two_fa_code()
  File "/srv/ibeam/src/two_fa_handlers/google_msg_handler.py", line 73, in get_two_fa_code
    sms_list_el[0].click()  # mark message as read
  File "/opt/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/opt/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "/opt/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/opt/venv/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <div _ngcontent-iwo-c103="" dir="auto" class="snippet-text ng-star-inserted">...</div> is not clickable at point (163, 194). Other element would receive the click: <div id="loader" aria-hidden="true" dir="ltr" style="display: flex;">...</div>
  (Session info: headless chrome=90.0.4430.212)


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/ibeam/src/authenticate.py", line 309, in handle_two_fa
    raise RuntimeError('Error encountered while acquiring 2FA code.') from two_fa_exception
RuntimeError: Error encountered while acquiring 2FA code.
2022-02-13 14:07:31,752|W| No 2FA code returned. Aborting authentication.

To Reproduce Steps to reproduce the behavior: Authenticate using 2FA with Google Messages.

Environment Docker image or standalone: voyz/ibeam 0.4.0-rc6 e3d3b268f7cc

Suggest a Fix I did try to debug the problem.

The element id hasn’t changed.

However it appears that maybe they have changed things so that you need to click into the 2FA field first before typing into it. Am only guessing, but the fact that JavaScript is run on focus suggests that focusing the element is important.

<input type="text" maxlength="8" id="chlginput" autocomplete="off" name="chlginput" class="form-control" onfocus="enableSubmit()" placeholder="Security Code">

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (10 by maintainers)

Most upvoted comments

@Voyz this was fixed in one of the release candidates, thank you!

I just installed 0.4.0 from docker hub, seems to be working great so far with 2FA, thanks Voyz!

Thanks very much @Voyz , it looks great, I’ll install the new docker image this evening and will run it over the weekend 😃

Hi,

A previously working ibeam docker container is no longer working, and it seems likely that it could be related to this issue. I was on rc6 when this issue started, moving to rc8 did not fix it.

I get these logs repeating:

Mar 10 08:50:23 Debian-109-buster-64-minimal docker[362]: 2022-03-10 08:50:23,464|E| Timeout reached when waiting for authentication. Consider increasing IBEAM_PAGE_LOAD_TIMEOUT. Er
Mar 10 08:50:23 Debian-109-buster-64-minimal docker[362]: 2022-03-10 08:50:23,544|I| Authentication process failed

Setting IBEAM_PAGE_LOAD_TIMEOUT to 180 didn’t fix it. I’m happy to help fix / test things, thanks for your work!

Thanks @Voyz , ok I’m up and running again 😄 The fail safe code appears to be working, it was used right away, I’ll keep an eye on it over the weekend

2022-02-19 10:20:35,611|I| Authentication process succeeded
2022-02-19 10:20:38,689|E| Gateway session active but not authenticated
2022-02-19 10:20:38,689|I| Logging out and restarting the Gateway
2022-02-19 10:20:38,767|I| Gateway logout successful
2022-02-19 10:20:38,836|I| Gateway session found but not authenticated, authenticating...
2022-02-19 10:20:47,285|I| Credentials correct, but Gateway requires two-factor authentication.
2022-02-19 10:20:47,285|I| Attempting to acquire 2FA code from: GoogleMessagesTwoFaHandler(driver_path=/usr/bin/chromedriver)
2022-02-19 10:20:51,046|I| Your requested authentication code: 345801
2022-02-19 10:20:52,133|W| Failed marking SMS message as read due to obstructing elements
2022-02-19 10:20:58,965|I| Authentication process succeeded
2022-02-19 10:21:02,052|I| Gateway running and authenticated.
2022-02-19 10:21:02,074|I| Starting maintenance with interval 60 seconds