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

Doesn't work with latest version of Chrome or Chromedriver #21

Closed
KyleBastien opened this issue Feb 9, 2020 · 8 comments
Closed

Doesn't work with latest version of Chrome or Chromedriver #21

KyleBastien opened this issue Feb 9, 2020 · 8 comments

Comments

@KyleBastien
Copy link
Contributor

Seems like the latest version of Chrome doesn't work with the version of Chromedriver this supports, it yells about only working with Chrome version 78.

Even if you do manually update the version of Chromedriver this is using to the latest version it seems to break because of not found element issues.

Possible that the not found element errors are related to (https://stackoverflow.com/questions/58589425/possible-issue-with-chromedriver-78-selenium-can-not-find-web-element-of-pdf-op) where Chrome no longer waits for iframe's to call the page "loaded".

My assumption being that Mint.com loads the initial login page inside of an iframe, which now this code goes through without finding any of the elements on the page.

@dhleong
Copy link
Owner

dhleong commented Feb 12, 2020

Thanks for the report! I've confirmed that pepper-mint barfs on new versions of chrome, but upgrading chromedriver seems to work for me.

In what way does it not work after you've upgraded chromedriver? Does it just hang at some point in the auth process?

@KyleBastien
Copy link
Contributor Author

@dhleong Sorry it's taken me so long to response to this!

When I update the chromedriver version by replacing it in node_modules I get the following error:

(node:8612) UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[id="ius-userid"]"}
  (Session info: chrome=80.0.3987.106)
    at Object.throwDecodedError (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/http.js:563:13)
    at Executor.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/http.js:489:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async thenableWebDriverProxy.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:699:17)
    at async toWireValue (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:138:15)
    at async /Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:189:16
    at async forEachKey (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:183:9)
    at async convertKeys (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:188:3)
    at async thenableWebDriverProxy.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:697:22)
(node:8612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:8612) UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[id="ius-password"]"}
  (Session info: chrome=80.0.3987.106)
    at Object.throwDecodedError (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/http.js:563:13)
    at Executor.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/http.js:489:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async thenableWebDriverProxy.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:699:17)
    at async toWireValue (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:138:15)
    at async /Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:189:16
    at async forEachKey (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:183:9)
    at async convertKeys (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:188:3)
    at async thenableWebDriverProxy.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:697:22)
(node:8612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:8612) UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[id="ius-sign-in-submit-btn"]"}
  (Session info: chrome=80.0.3987.106)
    at Object.throwDecodedError (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/http.js:563:13)
    at Executor.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/http.js:489:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async thenableWebDriverProxy.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:699:17)
    at async toWireValue (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:138:15)
    at async /Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:189:16
    at async forEachKey (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:183:9)
    at async convertKeys (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:188:3)
    at async thenableWebDriverProxy.execute (/Users/***/Documents/***/node_modules/selenium-webdriver/lib/webdriver.js:697:22)
(node:8612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Something went wrong!: NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":"*[id="javascript-user"]"}
  (Session info: chrome=80.0.3987.106)

And looking at the Chrome window, it just is stuck on the login page in Mint during the auth process:

image

@KyleBastien
Copy link
Contributor Author

@dhleong Any update on this?

@dhleong
Copy link
Owner

dhleong commented Mar 1, 2020

Sorry, I haven't had time to really look into this. I loaded mint in a normal browser just now, and that page doesn't seem to load into an iframe. Also, it's crazy that it can't find ius-sign-in-submit-btn, because there's a condition to wait until it can locate that element just above.

I had started rewriting in Typescript to make better use of promises and async/await, which might help. I'll see if I can find time to finish that.

@dhleong
Copy link
Owner

dhleong commented Mar 2, 2020

@KyleBastien I finished my Typescript rewrite (see #22). If you can, give that a shot and see if it improves anything for you!

@dhleong
Copy link
Owner

dhleong commented Mar 25, 2020

@KyleBastien I've just released v2.2.0 that includes the chromedriver update and typescript refactor. Please let me know if this improves the login stability for you!

@KyleBastien
Copy link
Contributor Author

@dhleong Thank you very much for this! I apologize for me taking a long time to try this and get back!

But this works fantastically! And I'm loving the new TypeScript types!

Thank you again!

@dhleong
Copy link
Owner

dhleong commented Mar 28, 2020

Glad to hear :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants