Skip to content

"Select Second Factor Device" dialog is not processed #271

@streamsend-io

Description

@streamsend-io

Describe the bug
Login attempts timeout repeatedly

To Reproduce
Steps to reproduce the behavior:

  1. Docker-compose up (using the README provided example and all defaults)
  2. observe docker logs for repeated timeout error
  3. In the generated screenshot
  • the username field contains the provided username
  • the passworkd field contains the (obfuscated) password
  • the "Select Second Factor Device" dialog contains "Select Type"

Expected behavior
Login should succeed.
If I open localhost:5000 on a browser (this is on a Raspberry pi and fill manually then login succeeds

Environment
IBeam version:
Docker image or standalone:
Python version (standalone users only):
OS:

Additional context
Add any other context about the problem here.

Suggest a Fix

Container output:
2026-01-21 09:18:49,731|I| Authentication strategy: "B"
2026-01-21 09:18:49,731|I| No active sessions, logging in...
2026-01-21 09:18:49,732|I| Loading auth webpage at https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on
2026-01-21 09:18:57,900|I| Gateway auth webpage loaded
2026-01-21 09:18:57,900|I| Login attempt number 1
2026-01-21 09:19:08,347|I| Submitting the form
Execution of job "GatewayClient._maintenance (trigger: interval[0:01:00], next run at: 2026-01-21 09:19:48 UTC)" skipped: maximum number of running instances reached (1)
2026-01-21 09:19:53,923|E| Timeout reached when waiting for authentication. The website seems to not be loaded correctly. Consider increasing IBEAM_PAGE_LOAD_TIMEOUT.
Website URL: https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on

Exception:
File "/usr/local/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
work_item.run()
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/venv/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/srv/ibeam/src/gateway_client.py", line 115, in _maintenance
success, shutdown, status = self.start_and_authenticate(request_retries=self.request_retries)
File "/srv/ibeam/src/gateway_client.py", line 62, in start_and_authenticate
success, shutdown, status = self.strategy_handler.try_authenticating(request_retries=request_retries)
File "/srv/ibeam/src/handlers/strategy_handler.py", line 85, in try_authenticating
return self._authentication_strategy_B(status, request_retries)
File "/srv/ibeam/src/handlers/strategy_handler.py", line 140, in _authentication_strategy_B
return self._log_in(status)
File "/srv/ibeam/src/handlers/strategy_handler.py", line 151, in _log_in
success, shutdown = self.login_handler.login()
File "/srv/ibeam/src/handlers/login_handler.py", line 504, in login
self.handle_timeout_exception(e, targets, driver, website_version, self.route_auth, self.base_url, self.outputs_dir)
File "/srv/ibeam/src/handlers/login_handler.py", line 485, in login
self.attempt(targets, wait_and_identify_trigger, driver)
File "/srv/ibeam/src/handlers/login_handler.py", line 406, in attempt
trigger, target = self.step_login(targets, wait_and_identify_trigger, driver, self.secrets_handler.account, self.secrets_handler.password, self.secrets_handler.key, self.presubmit_buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/ibeam/src/handlers/login_handler.py", line 196, in step_login
trigger, target = wait_and_identify_trigger(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/ibeam/src/handlers/login_handler.py", line 67, in _wait_and_identify_trigger
trigger = WebDriverWait(driver, timeout).until(any_of(*expected_conditions))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py", line 95, in until
raise TimeoutException(message, screen, stacktrace)

<class 'selenium.common.exceptions.TimeoutException'> Message:

2026-01-21 09:19:54,072|I| Saving screenshot to /srv/outputs/ibeam__0.5.9__2026-01-21_09-19-53__timeout-exception.png. Make sure to cover your credentials if you share it with others.
2026-01-21 09:19:54,147|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7fff01dc6a90> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="419fbe925cecffdb7c5b3abae6544b6b")>
2026-01-21 09:19:54,197|I| Logging in failed
2026-01-21 09:20:48,526|I| Maintenance
2026-01-21 09:20:49,145|I| Attempt number 2
2026-01-21 09:20:49,699|I| Max request retries reached after 2 attempts. Consider increasing the retries by setting IBEAM_REQUEST_RETRIES environment variable
2026-01-21 09:20:49,699|I| NO SESSION Status(running=True, session=False, connected=False, authenticated=False, competing=False, collision=False, session_id=None, server_name=None, server_version=None, expires=None)
2026-01-21 09:20:49,700|I| Authentication strategy: "B"
2026-01-21 09:20:49,700|I| No active sessions, logging in...
2026-01-21 09:20:49,700|I| Loading auth webpage at https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on
2026-01-21 09:20:57,685|I| Gateway auth webpage loaded
2026-01-21 09:20:57,685|I| Login attempt number 1
2026-01-21 09:21:08,178|I| Submitting the form

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions