simao-silva/noip-renewer

element is not attached to the page document

NWCR opened this issue · 8 comments

NWCR commented

Hi, I have this problem, when I run:

docker run --rm -it simaofsilva/noip-renewer:latest

Opening browser
Login successful
Confirming hosts phase
Error:  Message: stale element reference: element is not attached to the page document
  (Session info: headless chrome=102.0.5005.61)

Logging off

docker run --rm -it simaofsilva/noip-renewer:debian

Opening browser
Login successful
Confirming hosts phase
Error:  Message: stale element reference: element is not attached to the page document
  (Session info: headless chrome=103.0.5060.53)
Stacktrace:
#0 0x00556992aff0 <unknown>
#1 0x00556976143c <unknown>
#2 0x00556976498c <unknown>
#3 0x0055697647c0 <unknown>
#4 0x005569764a88 <unknown>
#5 0x005569792060 <unknown>
#6 0x005569789d4c <unknown>
#7 0x0055697c1cdc <unknown>
#8 0x005569788244 <unknown>
#9 0x0055697896ac <unknown>
#10 0x005569967438 <unknown>
#11 0x005569969bd8 <unknown>
#12 0x00556996990c <unknown>
#13 0x005569958620 <unknown>
#14 0x00556996a340 <unknown>
#15 0x00556994dec0 <unknown>
#16 0x0055699815d0 <unknown>
#17 0x005569981790 <unknown>
#18 0x00556999ba14 <unknown>
#19 0x007fbebb2628 <unknown>
#20 0x007fbe3e301c <unknown>

Logging off

Hi,
Can you run the debug image? Please, make sure to create a local directory named photos.

docker run -i -t --rm -v "$(realpath photos)":/photos simaofsilva/noip-renewer:debug

On a regular run, it creates 4 browser prints. Image 2 must be a print of the login form filled with your credentials; image 3 prints the NoIP dashboard and image 4 must print the page with the domains. Can you try it and check where the errors are happening?

NWCR commented

ok, I have 4 pictures and I think this is the line that is causing the error:

confirmed_host = host.find_element(by=By.TAG_NAME, value="a").text
button.click() doesn't actually click the "Confirm" button.

4

NWCR commented

I think I have identified the source of this error. When button.click() is executed a new page opens with another button: No thanks, just renew my free hostname

56

That new page could certainly be an issue. Currently, I do not have any domains to be renewed so solving this will have to wait.

I recently renewed my hostnames but I did not get that new page. Maybe it was something temporary? Did you have experienced that behaviour another time?

NWCR commented

Did you have experienced that behaviour another time?

No but this is my first account on noip.com and I think this is the cause of the problem.
This window pops up only on fresh accounts and after clicking the button it doesn't appear again.

I have added a note in the README about this. I will close now.

This happens to OLD account, too
you need to click the No thanks button

if button.text == "No thanks, just renew my free hostname" or translate(button.text) == "No thanks, just renew my free hostname":
button.click()

The button element is:

<a class="button bordered grey small botmarg" href="" onclick="ga('send', 'event', 'host-confirm-upsell', 'no-thanks-just-renew', 'grey-button');">No thanks, just renew my free hostname</a>

and a bad news is they add a recaptcha page after this no thanks confirm page.
image