Coder Social home page Coder Social logo

simao-silva / noip-renewer Goto Github PK

View Code? Open in Web Editor NEW
73.0 9.0 22.0 12.3 MB

Renewing No-IP hosts by browser automation

Home Page: https://hub.docker.com/r/simaofsilva/noip-renewer

License: MIT License

Dockerfile 15.58% Makefile 5.53% Python 78.89%
docker noip selenium selenium-python

noip-renewer's Introduction

noip-renewer

GitHub last commit GitHub issues GitHub Workflow Status GitHub Workflow Status Docker Pulls Docker Image Size (tag) Docker Image Size (tag) renovate

🇬🇧: Renewing No-IP hosts by browser automation. Renews all hosts available for confirmation, without any user interaction with a browser.
🇵🇹: Renovação de hosts No-IP recorrendo a automatização do navegador. Renova todos os hosts disponíveis para confirmação sem ser necessário interação do utilizador com um navegador.

Requirements

Obtaining image

Pulling image from Docker Hub

# Debian
docker pull simaofsilva/noip-renewer:debian

# Alpine
docker pull simaofsilva/noip-renewer:alpine
# or
docker pull simaofsilva/noip-renewer:latest

Building image locally

docker build -t simaofsilva/noip-renewer -f Dockerfile.dev .

Using image

docker run --rm -it simaofsilva/noip-renewer:<TAG>

or

docker run --rm -it simaofsilva/noip-renewer:<TAG> <EMAIL> <PASSWORD>

or

docker run --rm --env NO_IP_USERNAME=<EMAIL> --env NO_IP_PASSWORD=<PASSWORD> simaofsilva/noip-renewer:<TAG> 

or with 2FA

docker run --rm --env NO_IP_USERNAME=<EMAIL> --env NO_IP_PASSWORD=<PASSWORD> --env NO_IP_TOTP_KEY=<NOIP TOTP KEY> simaofsilva/noip-renewer:<TAG> 

or with translation disabled

docker run --rm --env NO_IP_USERNAME=<EMAIL> --env NO_IP_PASSWORD=<PASSWORD> --env TRANSLATE_ENABLED=false simaofsilva/noip-renewer:<TAG> 

Known issues / limitations

  • The script assumes that the No-IP account language is set to English. For other languages it depends on the translation provided by googletrans so it might not work in other languages (#11). In any case, translation can be disabled by setting TRANSLATE_ENABLED to false;

  • In fresh accounts an extra pop up might appear that unable the script to proceed (#14). It appears to not show on following renovations.

noip-renewer's People

Contributors

heindrichpaul avatar renovate-bot avatar renovate[bot] avatar simao-silva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

noip-renewer's Issues

'Login button has changed. Please contact support.'

Hi Simao Silva,
What a great solution you've created! worked like a charm until recently, but now when I run it I get this:


Opening browser
Login button has changed. Please contact support.


Any idea why? Let me know if any additional info is needed.
Rgrd.

Could not login. Check if account is blocked.

Using user agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Opening browser
Could not login. Check if account is blocked.

I've been using it for renewals for several years now, thanks to this program! But in the last couple of days, I suddenly realized that I can't renew. I tried to log in to my account and found that I had to enter the verification code that was sent to my email address to log in to my account, and I couldn't close it. Can this program be improved please? I think there are two ways to successfully log in to the account, one is to turn on two-step verification and calculate the two-step verification code via the parameter Key to log in to the account, and the other is to set up mail forwarding to get the two-step verification code via a service like mailparser to log in to the account.

element is not attached to the page document

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

How to configure the frequency?

docker run --rm will auto delete the when container run at once so i use option - --restart always and i found that it auto-starts in every about 10 mins,the log below could prove it. Where could i set the start time? Thanks.

2024-03-07T05:12:57.089953096Z Opening browser
2024-03-07T05:12:57.090009305Z Login button not found within the specified timeout.
2024-03-07T05:26:05.956276357Z Opening browser
2024-03-07T05:26:05.956447733Z Login successful
2024-03-07T05:26:05.956459704Z Confirming hosts phase
2024-03-07T05:26:05.956469172Z Checking if host "example.ddns.net" needs confirmation
2024-03-07T05:26:05.956477900Z Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fee11a92120>, 'Connection to translate.google.com timed out. (connect timeout=None)'))
2024-03-07T05:26:05.956487824Z Logging off
2024-03-07T05:26:05.956493958Z
2024-03-07T05:26:05.956502363Z
2024-03-07T05:39:13.500413678Z Opening browser
2024-03-07T05:39:13.500470773Z Login successful
2024-03-07T05:39:13.500478550Z Confirming hosts phase
2024-03-07T05:39:13.500484982Z Checking if host "example.ddns.net" needs confirmation
2024-03-07T05:39:13.500492201Z Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fb0a67789e0>, 'Connection to translate.google.com timed out. (connect timeout=None)'))
2024-03-07T05:39:13.500528672Z Logging off
2024-03-07T05:39:13.500538845Z
2024-03-07T05:39:13.500545339Z
2024-03-07T05:49:22.211397608Z Opening browser
2024-03-07T05:49:22.211464766Z Login successful
2024-03-07T05:49:22.211404763Z Traceback (most recent call last):
2024-03-07T05:49:22.211483100Z File "/app/renew.py", line 120, in
2024-03-07T05:49:22.211640428Z browser.get(HOST_URL)
2024-03-07T05:49:22.211655793Z File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 356, in get
2024-03-07T05:49:22.211995529Z self.execute(Command.GET, {"url": url})
2024-03-07T05:49:22.212091484Z File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
2024-03-07T05:49:22.212332712Z self.error_handler.check_response(response)
2024-03-07T05:49:22.212404707Z File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
2024-03-07T05:49:22.212653510Z raise exception_class(message, screen, stacktrace)
2024-03-07T05:49:22.212780102Z selenium.common.exceptions.TimeoutException: Message: Navigation timed out after 300000 ms
2024-03-07T05:49:22.212792311Z Stacktrace:
2024-03-07T05:49:22.212801459Z RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
2024-03-07T05:49:22.212833063Z WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:191:5
2024-03-07T05:49:22.212840943Z TimeoutError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:723:5
2024-03-07T05:49:22.212847501Z bail@chrome://remote/content/marionette/sync.sys.mjs:211:19
2024-03-07T05:49:22.212856173Z
2024-03-07T05:59:55.481543346Z Opening browser
2024-03-07T05:59:55.481602386Z Login successful
2024-03-07T05:59:55.481609925Z Confirming hosts phase
2024-03-07T05:59:55.481616040Z Checking if host "example.ddns.net" needs confirmation
2024-03-07T05:59:55.481622681Z Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f7aa369de20>, 'Connection to translate.google.com timed out. (connect timeout=None)'))
2024-03-07T05:59:55.481631822Z Logging off
2024-03-07T05:59:55.481640443Z
2024-03-07T05:59:55.481648866Z
2024-03-07T06:13:03.226728165Z Opening browser
2024-03-07T06:13:03.226790201Z Login successful
2024-03-07T06:13:03.226797650Z Confirming hosts phase
2024-03-07T06:13:03.226803589Z Checking if host "example.ddns.net" needs confirmation
2024-03-07T06:13:03.226811461Z Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f5246195e50>, 'Connection to translate.google.com timed out. (connect timeout=None)'))
2024-03-07T06:13:03.226821161Z Logging off
2024-03-07T06:13:03.226829461Z
2024-03-07T06:13:03.226837799Z
2024-03-07T06:26:13.553158492Z Opening browser
2024-03-07T06:26:13.553270682Z Login successful
2024-03-07T06:26:13.553280768Z Confirming hosts phase
2024-03-07T06:26:13.553287438Z Checking if host "example.ddns.net" needs confirmation
2024-03-07T06:26:13.553298411Z Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f1ef0b3e1b0>, 'Connection to translate.google.com timed out. (connect timeout=None)'))
2024-03-07T06:26:13.553310785Z Logging off
2024-03-07T06:26:13.553317011Z
2024-03-07T06:26:13.553322505Z
2024-03-07T06:32:51.338735834Z Opening browser
2024-03-07T06:32:51.338895543Z Login button not found within the specified timeout.
2024-03-07T06:42:53.795968823Z Opening browser
2024-03-07T06:42:53.796024562Z Login successful
2024-03-07T06:42:53.795969580Z Traceback (most recent call last):
2024-03-07T06:42:53.796040574Z File "/app/renew.py", line 120, in
2024-03-07T06:42:53.796190314Z browser.get(HOST_URL)
2024-03-07T06:42:53.796272143Z File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 356, in get
2024-03-07T06:42:53.796505640Z self.execute(Command.GET, {"url": url})
2024-03-07T06:42:53.796617774Z File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
2024-03-07T06:42:53.796853781Z self.error_handler.check_response(response)
2024-03-07T06:42:53.796949837Z File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
2024-03-07T06:42:53.797193864Z raise exception_class(message, screen, stacktrace)
2024-03-07T06:42:53.797311410Z selenium.common.exceptions.TimeoutException: Message: Navigation timed out after 300000 ms
2024-03-07T06:42:53.797323238Z Stacktrace:
2024-03-07T06:42:53.797332145Z RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
2024-03-07T06:42:53.797338906Z WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:191:5
2024-03-07T06:42:53.797345033Z TimeoutError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:723:5
2024-03-07T06:42:53.797350884Z bail@chrome://remote/content/marionette/sync.sys.mjs:211:19
2024-03-07T06:42:53.797356768Z
2024-03-07T06:49:34.479709188Z Opening browser
2024-03-07T06:49:34.479861099Z Login button not found within the specified timeout.
2024-03-07T07:02:46.750639080Z Opening browser
2024-03-07T07:02:46.750695153Z Login successful
2024-03-07T07:02:46.750705257Z Confirming hosts phase
2024-03-07T07:02:46.750714358Z Checking if host "example.ddns.net" needs confirmation
2024-03-07T07:02:46.750722846Z Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fb954b56120>, 'Connection to translate.google.com timed out. (connect timeout=None)'))
2024-03-07T07:02:46.750732623Z Logging off
2024-03-07T07:02:46.750738853Z
2024-03-07T07:02:46.750747248Z
2024-03-07T07:09:23.645054581Z Opening browser
2024-03-07T07:09:23.645111955Z Login button not found within the specified timeout.
2024-03-07T07:13:08.662976240Z Opening browser
2024-03-07T07:13:08.663071707Z Could not login. Check if account is blocked.
2024-03-07T07:19:49.043996711Z Opening browser
2024-03-07T07:19:49.044058597Z Login button not found within the specified timeout.

Can't run 'docker build' script on Windows

Hi,

I get the following error when I try to execute the 'docker build ' script:

C:\prj>docker build -t simaofsilva/noip-renewer .
[+] Building 0.4s (2/2) FINISHED
=> [internal] load build definition from Dockerfile
=> transferring dockerfile: 2B
=> [internal] load .dockerignore
=> transferring context: 2B
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount2174070297/Dockerfile: no such file or directory

What should I do to have it fixed?

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)

When I tried to execute

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

I get the following error:

Details of log

Opening browser
Traceback (most recent call last):
File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1042, in validate_conn
conn.connect()
File "/root/.local/lib/python3.11/site-packages/urllib3/connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/ssl.py", line 1075, in _create
self.do_handshake()
File "/usr/local/lib/python3.11/ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/.local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='jnrbsn.github.io', port=443): Max retries exceeded with url: /user-agents/user-agents.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "//renew.py", line 58, in
browserOptions.add_argument("user-agent=" + str(get_user_agent()))
^^^^^^^^^^^^^^^^
File "//renew.py", line 31, in get_user_agent
r = requests.get(url="https://jnrbsn.github.io/user-agents/user-agents.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='jnrbsn.github.io', port=443): Max retries exceeded with url: /user-agents/user-agents.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))

The file https://jnrbsn.github.io/user-agents/user-agents.json is available and can be downloaded from my IP via either curl or wget, however.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: config
Error type: Invalid allowedVersions
Message: The following allowedVersions does not parse as a valid version or range: "=3.1.0a0"

Set credentials

Hi and thanks in advance.

Where I have to set the noip account credentials?

noip-renewer weird container size

I've noticed today that my docker didn't allow me to create new containers because it was "full". I prune the system, gained nothing (all unused volumes and images where already removed) then proceed to check the image size of each container, noip-renewer was taking 15GB (wtf) in just 3 days. What's going on? I was using :debian
image

Login successful, but couldn't renew

ran docker command, it showed Opening browser and Login successful,
but couldn't renew, they probably changed the button position again,
thanks very much, buddy.

No-IP language need to be set to English in order for the renewer to work

Hi Simao Silva,

during an unsuccessful attempt to get your renewer working, I noticed that the renew.py is searching for a button with the exact test "confirm" in the hosts list. This only is the case if the language is set to English in the No-IP settings.

After I changed to English language in my personal settings on No-IP homepage, your renewer worked like a charm.

As there might be more people running into the same issue, it might be worth mentioning this in the readme.

BTW: Excellent tool!

BR
Ralf

geckodriver- raspi2

hi,
can you verif your docker. since 2 weeks i have this bug. i look on my rp2 but i think its the docker who crash.

Digest: sha256:55ab8d7ea92042670feab6d2923589b733d666cdef635801d56cd614645ccb16
Status: Downloaded newer image for simaofsilva/noip-renewer:debian
docker.io/simaofsilva/noip-renewer:debian
Status: Image is up to date for simaofsilva/noip-renewer:debian

Opening browser
Traceback (most recent call last):
File "//renew.py", line 60, in
browser = webdriver.Firefox(options=browserOptions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/firefox/webdriver.py", line 192, in init
self.service.start()
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/common/service.py", line 90, in start
self._start_process(self.path)
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/common/service.py", line 199, in _start_process
self.process = subprocess.Popen(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'geckodriver'

thx if you can check

Message: unknown error: session deleted because of page crash

Often there is an error with simaofsilva/noip-renewer:alpine image

Traceback (most recent call last):
File "//renew.py", line 75, in
i.click()
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 93, in click
self._execute(Command.CLICK_ELEMENT)
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 410, in _execute
Opening browser
return self._parent.execute(command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
self.error_handler.check_response(response)
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=102.0.5005.182)

Is I guess might be worth adding some sleep() L72-L76 as I assume it takes more time to load the page

noip renewer not working, hanging at "opening browser"

I've been using this on my synology NAS in a docker for several months and its been running fine. However as of few days ago i notice it doesnt seem be working.. If i run this via terminal, i provide the credentials but then it hangs at saying "opening browser".
I normally run this via the docker command :docker run --rm -it simaofsilva/noip-renewer:

That also seems to be hang with no output about whats going on

session deleted because of page crash

Hi there,

I'm trying to run the docker. my setup is an headless Debian 11.5.
when I run the docker, I get the following error :

>> sudo docker run --rm simaofsilva/noip-renewer:latest $EMAIL $PASSWORD
Opening browser
Traceback (most recent call last):
File "//renew.py", line 75, in
i.click()
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 93, in click
self._execute(Command.CLICK_ELEMENT)
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 410, in _execute
return self._parent.execute(command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 444, in execute
self.error_handler.check_response(response)
File "/root/.local/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 249, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=102.0.5005.182)

user agent not passed correctly

hi! just wanted to point out that you are missing 2 leading '-' for the user agent to work properly

that line should look like

browser_options.add_argument("--user-agent=" + get_user_agent())

browser_options.add_argument("user-agent=" + get_user_agent())

appreciate your work!

Can I set the renew check frequency?

Currently it's around 15 minutes, it's too often because the host confirmation will appear around 1 week ahead of the host expiration, so I think the frequency set to every 3 days will be better.
Is there any environment setting can configure it?

new user -- cron error from synology nas

hello, i just installed this docker container in my synology nas,

when i launch the execution command from the task scheduler i got an error.

i follow your instruction in a previous issue to remove '-t' and i tried:

docker run --rm -i simaofsilva/noip-renewer 'user' 'password'
and
docker run --rm simaofsilva/noip-renewer 'user' 'password'

i also tried
docker run --rm -i simaofsilva/noip-renewer:latest 'user' 'password'
and
docker run --rm simaofsilva/noip-renewer:latest 'user' 'password'

the response:
Le planificateur de tâches a terminé une tâche planifiée.

Tâche : No-Ip Renewal
Heure de début : Thu, 13 Apr 2023 20:54:22 GMT
Heure d'arrêt : Thu, 13 Apr 2023 20:54:52 GMT
État actuel : 0 (Normal)
Sortie/erreur standard :
Opening browser
Login successful
Confirming hosts phase
Error: Message: The element reference of is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5
StaleElementReferenceError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:461:5
element.resolveElement@chrome://remote/content/marionette/element.sys.mjs:674:11
evaluate.fromJSON@chrome://remote/content/marionette/evaluate.sys.mjs:255:31
evaluate.fromJSON@chrome://remote/content/marionette/evaluate.sys.mjs:263:29
evaluate.fromJSON@chrome://remote/content/marionette/evaluate.sys.mjs:263:29
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:74:34

Logging off

thanks for your help

Error: Message: stale element reference: element is not attached to the page document

Hi,

As of this month im now getting the following errors why trying to confirm 3 hosts with NOIP:

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.182)
Logging off
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.182)
Logging off
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.182)
Logging off

image: simaofsilva/noip-renewer:latest

Multiple accounts

Is it possible to add support for multiple accounts? I wouldn't want to run 10 containers to handle 10 accounts.

command wont work as a script for some reason. Error 'the input device is not a TTY"

im trying to run this command as a schduled task in the synology nas. I've tried running it as a regular user and also as root. However i get an error back.
However if i run the belo command manualy while logged in via ssh, it works fine as teh regular user and also as root.

docker run --rm -it simaofsilva/noip-renewer 'nopip-login_email' 'password'

Would you know what this error means?

Task Scheduler has completed a scheduled task.

Task: No-ip-Renew
Start time: Sun, 29 Jan 2023 09:26:02 GMT
Stop time: Sun, 29 Jan 2023 09:26:03 GMT
Current status: 1 (Interrupted)
Standard output/error:
the input device is not a TTY

element not interactable

I try this image simaofsilva/noip-renewer:3.9.1-slim-buster on a buster raspbian and I have an error. Maybe the login page changed ?

Thank you for your help

Opening browser
Login page
Traceback (most recent call last):
File "//renew.py", line 48, in
browser.find_element_by_name("Login").click()
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: headless chrome=88.0.4324.182)

Error: cannot login. Check if account is not blocked.

Hi Simao Silva,
I started receiving this error message recently.

sudo docker run --rm -it simaofsilva/noip-renewer:latest [USER] [PASS]
Opening browser
Error: cannot login. Check if account is not blocked.
Logging off

I got the same error when I run this on two different computers with different network connection to the internet.
Manual login to noip site is fine with the same credentials.

If it helps, I also used the following image (from your previous assistance :-)) which also creates two PNG files (with my correct user credentials)

sudo docker run --rm -it -v "/home/user/test":/photos simaofsilva/noip-renewer:debug-v3 [USER] [PASS]
Opening browser
Error: cannot login. Check if account is not blocked.
Logging off

login1

login2

I will appreciate for any pointers to resolve this and please let me know if any additional info is needed.

Kind regards,
dkrjvi

Can't log in

Hi,

I have an error when i launch the docker run command. It cannot log in on noip website :

docker run --rm -it simaofsilva/noip-renewer "[email protected]" "here_is_my_password"
Opening browser
Login page
Error: cannot login. Check if account is not blocked.

I tried with ' " ' also and it's the same.
I don't have special character on my password too.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: config
Error type: Invalid allowedVersions
Message: The following allowedVersions does not parse as a valid version or range: "=3.1.0a0"

not working this month

It worked perfectly last month, nothing has changed.

Opening browser
Traceback (most recent call last):
File "//renew.py", line 47, in
browser.find_element_by_name("Login").click()
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: headless chrome=86.0.4240.111)

Passing credentials doesn't work

I didn't made it to pass the credentials.
Without <> it doesn't work rather with <> and with "" it as well don't excepts them.

not able to build image locally

Hi Sir,

I've tried to build image locally with the instruction in the README.md, there are many of error messages.
I am not sure if something was going wrong with it.

Error: Login button has changed. Please contact support.

Running this on my synology NAS and today i started getting this after running this:

Task: No-ip-Renew
Start time: Tue, 17 Oct 2023 13:00:01 -0400
Stop time: Tue, 17 Oct 2023 13:00:09 -0400
Current status: 1 (Interrupted)
Standard output/error:
Opening browser
Login button has changed. Please contact support.

Login button has changed. Please contact support.

Hi,

Just installed this and after what seems to be a successful login, im then presented with the following "Login button has changed. Please contact support." error:

Opening browser
Login successful
Confirming hosts phase
0 hosts confirmed
Finished
Logging off
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 
Opening browser
Login button has changed. Please contact support. 

Using: simaofsilva/noip-renewer:latest

'no such element' error since 2022-01-17

This is from my log entries:

`



Mon 17 Jan 2022 10:00:01 AM CST
Mon 17 Jan 2022 10:07:01 AM CST
Opening browser
Login successful
Confirming hosts phase
0 hosts confirmed
Finished
Logging off



Mon 17 Jan 2022 11:00:01 AM CST
Mon 17 Jan 2022 11:46:01 AM CST
Opening browser
Login successful
Confirming hosts phase
Error: Message: no such element: Unable to locate element: {"method":"css selector","selector":"button"}
(Session info: headless chrome=91.0.4472.164)
Logging off


`
Seems they changed the page layout again?

Still worked on 2022-01-17 at 10:07:01 AM CST

Failed the first time (for me) on 2022-01-17 at 11:46:01 AM CST

Option to turn off google translate

In somewhere, google translate was forbidden, to access it will cause error like attachment:
Error: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=en&sl=auto&q=Modify (Caused by ConnectTime...

error

Can you set an option to turn off it?

Error at login

docker run --rm -it simaofsilva/noip-renewer:latest [email protected] mypass

Opening browser
Login button has changed. Please contact support.

simaofsilva/noip-renewer latest c3d6614aef0f

timezone info

Perhaps this is a me issue..
Thanks muchly for this container! makes noip much more user friendly!

I only run this addon twice a week, so I usually go and check the logs when it around renew dates.
I run it around 3am, and I am about 10 hours ahead of UTC time.
So when I go and look the logs, the times are a bit confusing at first glance when they are in UTC timezone.

I have tried adding /etc/localtime:/etc/localtime as a bind or TZ mycountry/mycity as an environment. That fixes the date inside the container..
The logs still print as UTC after that though.
I was fiddling a bit with renew.py to no avail.

I tried
from datetime import tzinfo

Is there a simple fix to updating the output of the logs?
Quite happy to add either the bind or ENV variable.

Sorry I am not a very good programmer and even worse with python.

2022-10-14T12:25:25.628582000Z Opening browser
2022-10-14T12:25:37.890734000Z Error: cannot login. Check if account is not blocked.  ## I had fake details here
2022-10-14T12:25:37.892266000Z Logging off
2022-10-14T12:25:37.892598000Z
2022-10-14T12:25:37.893855000Z

Option: support for multiple no-ip account with multiple hosts

It would be nice if it could support multiple no-ip accounts with multiple hosts on each account.

Needs some altering of the current script and might need to destroy browser data every time or switch session cookies.

Providing the accounts can be either by filling in each account manually or by exposing a directory to host that contains a .csv with all the account info.

The new version has issues.

Digest: sha256:b1bc07efc69aa42ba526532ac56941826e5f6cb7bce571dab88f386ab73aafc0
Status: Downloaded newer image for simaofsilva/noip-renewer:debian
Traceback (most recent call last):
Opening browser
File "//renew.py", line 62, in
browser = webdriver.Firefox(options=browser_options, service=service)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/firefox/webdriver.py", line 67, in init
super().init(command_executor=executor, options=options)
File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 205, in init
self.start_session(capabilities)
File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
self.error_handler.check_response(response)
File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1

Build throwing python error

When launching docker it throws an error with python 3.11. Originally thought NO-IPs MFA would be an issue however it persists with MFA both enabled and disabled

Shell

docker pull simaofsilva/noip-renewer:debian
EMAIL='[snip]'
PASSWORD='[snip]'
docker run --rm -it simaofsilva/noip-renewer:debian $EMAIL $PASSWORD

Output:

Status: Image is up to date for simaofsilva/noip-renewer:debian
docker.io/simaofsilva/noip-renewer:debian
Opening browser

Throws:

Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/urllib3/connection.py", line 1                 74, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/urllib3/util/connection.py", l                 ine 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", li                 ne 703, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", li                 ne 386, in _make_request
    self._validate_conn(conn)
  File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", li                 ne 1042, in _validate_conn
    conn.connect()
  File "/root/.local/lib/python3.11/site-packages/urllib3/connection.py", line 3                 58, in connect
    self.sock = conn = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/urllib3/connection.py", line 1                 86, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection objec                 t at 0x7f6b786f9a90>: Failed to establish a new connection: [Errno -3] Temporary                  failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/requests/adapters.py", line 48                 9, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py", li                 ne 787, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/urllib3/util/retry.py", line 5                 92, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='jnrbsn.github.io', p                 ort=443): Max retries exceeded with url: /user-agents/user-agents.json (Caused b                 y NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6b786f9a                 90>: Failed to establish a new connection: [Errno -3] Temporary failure in name                  resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//renew.py", line 58, in <module>
    browserOptions.add_argument("user-agent=" + str(get_user_agent()))
                                                    ^^^^^^^^^^^^^^^^
  File "//renew.py", line 31, in get_user_agent
    r = requests.get(url="https://jnrbsn.github.io/user-agents/user-agents.json"                 )
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                 ^
  File "/root/.local/lib/python3.11/site-packages/requests/api.py", line 73, in                  get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/requests/api.py", line 59, in                  request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/requests/sessions.py", line 58                 7, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/requests/sessions.py", line 70                 1, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/requests/adapters.py", line 56                 5, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='jnrbsn.github.io'                 , port=443): Max retries exceeded with url: /user-agents/user-agents.json (Cause                 d by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6b786                 f9a90>: Failed to establish a new connection: [Errno -3] Temporary failure in na                 me resolution'))

Can it still work?

my docker image:

simaofsilva/noip-renewer   latest       f020469e6a85   3 days ago      472MB

log:

Opening browser
Login successful
Confirming hosts phase
Checking if host "***" needs confirmation
Host "***" confirmed
1 host confirmed
Finished
Logging off

It doesn't work for me, Still need to confirm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.