instapy-gui icon indicating copy to clipboard operation
instapy-gui copied to clipboard

Unable to locate element - A/B test crashes

Open h13dev opened this issue 4 years ago • 0 comments

When the bot tries to pass the A/B test on login it crashes because it can't find the HTML button / div / a element 'Log In'.

oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2021-09-25 01:41:41] [h13Dev]  -- Connection Checklist [1/2] (Internet Connection Status)
INFO [2021-09-25 01:41:42] [h13Dev]  - Internet Connection Status: ok
INFO [2021-09-25 01:41:42] [h13Dev]  - Current IP is "157.90.127.76" and it's from "United States/US"
INFO [2021-09-25 01:41:42] [h13Dev]  -- Connection Checklist [2/2] (Hide Selenium Extension)
INFO [2021-09-25 01:41:42] [h13Dev]  - window.navigator.webdriver response: True
WARNING [2021-09-25 01:41:42] [h13Dev]  - Hide Selenium Extension: error
INFO [2021-09-25 01:41:45] [h13Dev]  - Cookie file not found, creating cookie...
WARNING [2021-09-25 01:41:51] [h13Dev]  Login A/B test detected! Trying another string...
WARNING [2021-09-25 01:41:57] [h13Dev]  Could not pass the login A/B test. Trying last string...
ERROR [2021-09-25 01:42:02] [h13Dev]  Login A/B test failed!
        b"Message: Unable to locate element: //div[text()='Log In']\n"
Traceback (most recent call last):
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/instapy/login_util.py", line 321, in login_user
    login_elem = browser.find_element_by_xpath(
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //button[text()='Log In']


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/instapy/login_util.py", line 327, in login_user
    login_elem = browser.find_element_by_xpath(
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //a[text()='Log in']


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/instapy/login_util.py", line 333, in login_user
    login_elem = browser.find_element_by_xpath(
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/root/repos/InstaPy/instapy-gui/services/instapy/env/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //div[text()='Log In']

....................................................................................................................
CRITICAL [2021-09-25 01:42:02] [h13Dev]  Unable to login to Instagram! You will find more information in the logs above.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ERROR [2021-09-25 01:42:02] [h13Dev]  You have too few comments, please set at least 10 distinct comments to avoid looking suspicious.

INFO [2021-09-25 01:42:03] [h13Dev]  Sessional Live Report:
        |> No any statistics to show


[Session lasted 25.16 seconds]
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2021-09-25 01:42:03] [h13Dev]  Session ended!
ooooooooooooooooooooooooooooooooooooooooooooooooooo```

h13dev avatar Sep 24 '21 23:09 h13dev