-
Notifications
You must be signed in to change notification settings - Fork 112
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
failure to authenticate #188
Comments
I may be wrong but to me it looks like the credentials you provided to iBeam are not yet registered with the IB key app. Have you used the same credentials in an interactive session and successfully got an auth request to your smart phone app and successfully login? |
but they never were and that account setup is unchanged for more than 4 months now. the only thing required is the "continue" button to be clicked. |
after trying for a while to figure out what is going on, it seems like there is a delay that they added for the "continue" button to be clickable. is there a way to make the element being clicked after a while (a sleep) ? |
i found the problem.. the fix is very hacky.. but the it is caused by a change in interactive broker's html content.
could you please @Voyz integrate this change into the master branch (maybe a new version) in a nice/proper way ? i attached the login_handler python script with my hacky update for reference. |
@fireinmyveins Thanks for doing some debugging on this and for reporting the issue 👍 Also thanks for sharing your solution. Now here's the interesting thing: It seems that the button is not clickable, yet in order for the trigger, target = wait_and_identify_trigger(
has_text(targets['SUCCESS']),
is_visible(targets['TWO_FA']),
is_visible(targets['TWO_FA_SELECT']),
is_visible(targets['TWO_FA_NOTIFICATION']),
is_visible(targets['ERROR']),
is_clickable(targets['IBKEY_PROMO']),
) Not quite sure why would an element be marked as clickable, but then raise In either case, I just released def step_handle_ib_key_promo(self,
driver: webdriver.Chrome,
targets: Targets,
wait_and_identify_trigger: callable,
ib_promo_key_trigger: WebElement,
):
_LOGGER.info('Handling IB-Key promo display...')
# ib_promo_key_trigger.click()
time.sleep(3)
driver.execute_script("arguments[0].click();", ib_promo_key_trigger)
trigger, target = wait_and_identify_trigger(
has_text(targets['SUCCESS']),
is_visible(targets['ERROR'])
)
return trigger, target Let me know if that works for you 👍 Also, @HaSiMiPa thanks for your comment. As far as I remember, this view appears only as an advert - you don't actually have to interact with it, only continue through it. Hence we simply click on 'Continue' and carry on normally. |
@Voyz thanks for the update, but can't you push the code into a branch ? 0.5.4-rc1 doesn't seem to be anywhere (tag/branch) to be honest, i have no idea why that error appears but i suspect it is one of the options mentioned in this post i know the fix is not the best approach but it works and it is not so intrusive since this only happens once (when you login) |
Hey @fireinmyveins it's on the master branch: 5f53310 Thanks for linking to that SO post, interesting! |
@Voyz I have stumbled upon the same issue as described in this issue, and I just wanted to let you know that |
Glad to hear @elderanakain thanks for reporting back 👏👏 |
I'm going to close this Issue as it is now fixed in |
after starting the container, during authentication process, it seems that if the login process encounters the screen from the attached picture, it cannot continue and auth fails
ibeam version : 0.5.1
stack trace & logs:
2024-05-24 06:33:59,187|I| Cannot ping Gateway. Retrying for another 18 seconds
2024-05-24 06:34:01,230|I| Gateway connection established
2024-05-24 06:34:01,335|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)
2024-05-24 06:34:01,336|I| Authentication strategy: "B"
2024-05-24 06:34:01,336|I| No active sessions, logging in...
2024-05-24 06:34:01,337|I| Loading auth webpage at https://localhost:5000/sso/Login?forwardTo=22&RL=1&ip2loc=on
2024-05-24 06:34:10,887|I| Gateway auth webpage loaded
2024-05-24 06:34:10,887|I| Login attempt number 1
2024-05-24 06:34:16,441|I| Submitting the form
2024-05-24 06:34:20,170|I| Handling IB-Key promo display...
2024-05-24 06:34:21,278|E| Error encountered during authentication
Exception:
File "/srv/ibeam/ibeam_starter.py", line 167, in
success, shutdown, status = client.start_and_authenticate()
File "/srv/ibeam/src/gateway_client.py", line 53, 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 435, in login
self.attempt(targets, wait_and_identify_trigger, driver)
File "/srv/ibeam/src/handlers/login_handler.py", line 371, in attempt
trigger, target = self.step_handle_ib_key_promo(targets, wait_and_identify_trigger, trigger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/ibeam/src/handlers/login_handler.py", line 278, in step_handle_ib_key_promo
ib_promo_key_trigger.click()
File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 93, in click
self._execute(Command.CLICK_ELEMENT)
File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 394, in _execute
return self._parent.execute(command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
self.error_handler.check_response(response)
File "/opt/venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
<class 'selenium.common.exceptions.ElementClickInterceptedException'> Message: element click intercepted: Element is not clickable at point (392, 852)
picture from attachment
The text was updated successfully, but these errors were encountered: