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

unable to use TOTP #221

Closed
daNutzzzzz opened this issue May 25, 2024 · 32 comments
Closed

unable to use TOTP #221

daNutzzzzz opened this issue May 25, 2024 · 32 comments

Comments

@daNutzzzzz
Copy link

Hi, linked to #200

im still getting account blocked...

docker run --rm --name=noip-renewer --network=bridge-net --env NO_IP_USERNAME=REDCATED --env NO_IP_PASSWORD=REDCATED --env NO_IP_TOTP_KEY=REDCATED simaofsilva/noip-renewer:latest
Using user agent "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:109.0) Gecko/20100101 Firefox/121.0"
Opening browser
Could not login. Check if account is blocked.
@simao-silva
Copy link
Owner

Hi,
Can you again using image simaofsilva/noip-renewer:c01467b-alpine?

@daNutzzzzz
Copy link
Author

daNutzzzzz commented May 27, 2024

Hi, Can you again using image simaofsilva/noip-renewer:c01467b-alpine?

Same results

Using user agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15" Opening browser Could not login. Check if account is blocked.

@simao-silva
Copy link
Owner

Can you login on a browser without issues? Are you redirected to the dashboard right after you enter the TOTP code?

@daNutzzzzz
Copy link
Author

Can you login on a browser without issues? Are you redirected to the dashboard right after you enter the TOTP code?

Yes i login fine after TOTP code and it takes me to dashboard.

@ray1025
Copy link
Contributor

ray1025 commented May 28, 2024

Please check your computer's clock accuracy using this website: https://time.is/. The TOTP key requires the correct time to function properly.

@daNutzzzzz
Copy link
Author

Please check your computer's clock accuracy using this website: https://time.is/. The TOTP key requires the correct time to function properly.

Hi, the clock is running correctly.

@ray1025
Copy link
Contributor

ray1025 commented May 29, 2024

You mentioned that you've pulled the latest image, your computer's clock is correct, and your account is fine. The last issue might be an incorrect TOTP_KEY. Please make sure to double-check your TOTP_KEY. The TOTP_KEY is displayed only once when you initially enable 2FA, right under the QR code. If you didn't save it, you can disable and then re-enable 2FA to generate a new one. For more details, please refer to this link.

@ray1025
Copy link
Contributor

ray1025 commented May 29, 2024

Here is the script I use for automated execution. It has been running successfully for over 10 days:

docker pull simaofsilva/noip-renewer
docker run --rm --env NO_IP_USERNAME="EMAIL" --env NO_IP_PASSWORD="PASSWORD" --env NO_IP_TOTP_KEY="KEY" simaofsilva/noip-renewer

@daNutzzzzz
Copy link
Author

You mentioned that you've pulled the latest image, your computer's clock is correct, and your account is fine. The last issue might be an incorrect TOTP_KEY. Please make sure to double-check your TOTP_KEY. The TOTP_KEY is displayed only once when you initially enable 2FA, right under the QR code. If you didn't save it, you can disable and then re-enable 2FA to generate a new one. For more details, please refer to this link.

Hi Ray, that is the key im using

@daNutzzzzz
Copy link
Author

Here is the script I use for automated execution. It has been running successfully for over 10 days:

docker pull simaofsilva/noip-renewer
docker run --rm --env NO_IP_USERNAME="EMAIL" --env NO_IP_PASSWORD="PASSWORD" --env NO_IP_TOTP_KEY="KEY" simaofsilva/noip-renewer

Pretty much the same as mine

@ray1025
Copy link
Contributor

ray1025 commented May 30, 2024

@daNutzzzzz
Please use this image for testing:
raymond1025/noip-renewer-dev
I've added a feature to detect errors with the two-factor authentication code.

@daNutzzzzz
Copy link
Author

daNutzzzzz commented May 30, 2024

@daNutzzzzz Please use this image for testing: raymond1025/noip-renewer-dev I've added a feature to detect errors with the two-factor authentication code.

thank you, it said invalid code albeit the one i took from the site so i will reset my 2FA and retry.

Ok i reset it and tried with the new code and get the same error "invalid code"

@ray1025
Copy link
Contributor

ray1025 commented May 30, 2024

If you've changed and double-checked your TOTP KEY and are still getting an "Invalid code..." error, it's likely an issue with your device's clock. Could you try using a different device?

@daNutzzzzz
Copy link
Author

daNutzzzzz commented May 30, 2024

If you've changed and double-checked your TOTP KEY and are still getting an "Invalid code..." error, it's likely an issue with your device's clock. Could you try using a different device?

Date is correct

image

Same error on another device

@ray1025
Copy link
Contributor

ray1025 commented May 30, 2024

Please use this image for testing:
raymond1025/noip-renewer-dev-v2
In this version, I’ve added a feature to sync the clock using Google's NTP server.

@daNutzzzzz
Copy link
Author

Please use this image for testing: raymond1025/noip-renewer-dev-v2 In this version, I’ve added a feature to sync the clock using Google's NTP server.

thanks, tired on both machines and still "invalid code" :(

@ray1025
Copy link
Contributor

ray1025 commented May 30, 2024

Sorry...I'm really out of ideas at this point...

@daNutzzzzz
Copy link
Author

Sorry...I'm really out of ideas at this point...

its ok, i truly appreciate the support you've given.

@Kucharskov
Copy link

Kucharskov commented Jun 2, 2024

Comment moved to #225

@Kucharskov
Copy link

Hi, Can you again using image simaofsilva/noip-renewer:c01467b-alpine?

When i used this specified image it works perfectly :)

@daNutzzzzz
Copy link
Author

Hi guys (mostly @simao-silva)! I have simmilar issue, but my output is a little bit bigger:

Using user agent "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:109.0) Gecko/20100101 Firefox/121.0"
Opening browser
Traceback (most recent call last):
  File "/app/renew.py", line 146, in <module>
    totp_input.send_keys(totp.now())
  File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webelement.py", line 231, in send_keys
    self._execute(
  File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webelement.py", line 395, in _execute
    return self._parent.execute(command, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 347, 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.ElementNotInteractableException: Message: Element <input id="challenge_code" name="challenge_code" type="hidden"> is not reachable by keyboard
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:353:5
webdriverSendKeysToElement@chrome://remote/content/marionette/interaction.sys.mjs:668:13
interaction.sendKeysToElement@chrome://remote/content/marionette/interaction.sys.mjs:642:11
sendKeysToElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:540:29
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:150:31

i think you need to open your own ticket as it doesnt look the same as mine.,

@simao-silva
Copy link
Owner

@daNutzzzzz are you still getting issues with TOTP?

@daNutzzzzz
Copy link
Author

@daNutzzzzz are you still getting issues with TOTP?

unfortunately yes and noip support is run by a bot :(

@simao-silva
Copy link
Owner

@daNutzzzzz can you try again using image simaofsilva/noip-renewer:debug? Check for line with message 2FA code: and see if the TOTP code this script is going to use matches the code generate by your TOTP generator app.

@daNutzzzzz
Copy link
Author

daNutzzzzz commented Jun 4, 2024

ok so ive tried again, the issue i have is that it takes so long to process that i run through multiple 2fa code on my auth app to be able to match the code the script outputs.

edit: ive re-reun the script and recorded all the codes generated in that time and the code the scrip outputs doesn't match any of them.

@simao-silva
Copy link
Owner

Try running with -e TZ=YOUR TIMEZONE , e.g. -e TZ=Europe/London, and see if the codes still do not match.

@daNutzzzzz
Copy link
Author

Try running with -e TZ=YOUR TIMEZONE , e.g. -e TZ=Europe/London, and see if the codes still do not match.

Hi, i did and no it still fails.

@daNutzzzzz
Copy link
Author

Using user agent "Mozilla/5.0 (X11; Linux i686; rv:115.0) Gecko/20100101 Firefox/115.0" Opening browser Login successful Confirming hosts phase Checking if host "xxxxxxxx.net" needs confirmation Host "xxxxxxxx.net" confirmed Error: Message: The element with the reference 2f1e69f5-af35-4f84-9da4-cc5de0a7de80 is stale; either its node document is not the active document, or it is no longer connected to the DOM; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception Stacktrace: RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5 StaleElementReferenceError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:725:5 getKnownElement@chrome://remote/content/marionette/json.sys.mjs:401:11 deserializeJSON@chrome://remote/content/marionette/json.sys.mjs:259:20 cloneObject@chrome://remote/content/marionette/json.sys.mjs:59:24 deserializeJSON@chrome://remote/content/marionette/json.sys.mjs:289:16 cloneObject@chrome://remote/content/marionette/json.sys.mjs:59:24 deserializeJSON@chrome://remote/content/marionette/json.sys.mjs:289:16 json.deserialize@chrome://remote/content/marionette/json.sys.mjs:293:10 receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:72:30

Logging off

This has nothing to do with the issue im experiencing, please create your own issue.

@ray1025
Copy link
Contributor

ray1025 commented Jun 5, 2024

@daNutzzzzz
Hello, I've used Synology NAS, Windows 11, VPS (Ubuntu Server), and GitHub Actions, but I couldn't reproduce the error.
Could you let me know what device you’re running Docker on?

@daNutzzzzz
Copy link
Author

@daNutzzzzz Hello, I've used Synology NAS, Windows 11, VPS (Ubuntu Server), and GitHub Actions, but I couldn't reproduce the error. Could you let me know what device you’re running Docker on?

  1. Ubuntu/Debian Docker Servers
  2. Can you share your github actions and i'll test..

@ray1025
Copy link
Contributor

ray1025 commented Jun 6, 2024

@daNutzzzzz
Here's the Workflow file I use. You can modify the "docker_image:" to run the image you prefer.
For instructions on how to set up secrets, please refer to this link.

name: noip-renewer-dev

on:
  workflow_dispatch:

jobs:
  checkin:
    runs-on: ubuntu-latest
    env:
      docker_image: simaofsilva/noip-renewer:debug

    steps:
      - name: Pull noip-renewer
        run: docker pull $docker_image

      - name: Run noip-renewer
        run: docker run --rm --env NO_IP_USERNAME="${{ secrets.NOIP_USERNAME }}" --env NO_IP_PASSWORD="${{ secrets.NOIP_PASSWORD }}" --env NO_IP_TOTP_KEY="${{ secrets.NOIP_OTP }}" $docker_image
        continue-on-error: true

Screenshot:
2024-06-06

@daNutzzzzz
Copy link
Author

@daNutzzzzz Here's the Workflow file I use. You can modify the "docker_image:" to run the image you prefer. For instructions on how to set up secrets, please refer to this link.

name: noip-renewer-dev

on:
  workflow_dispatch:

jobs:
  checkin:
    runs-on: ubuntu-latest
    env:
      docker_image: simaofsilva/noip-renewer:debug

    steps:
      - name: Pull noip-renewer
        run: docker pull $docker_image

      - name: Run noip-renewer
        run: docker run --rm --env NO_IP_USERNAME="${{ secrets.NOIP_USERNAME }}" --env NO_IP_PASSWORD="${{ secrets.NOIP_PASSWORD }}" --env NO_IP_TOTP_KEY="${{ secrets.NOIP_OTP }}" $docker_image
        continue-on-error: true

Screenshot: 2024-06-06

Thanks Ray,

Ive run this and it failed with the current code, so ive tried disabling and re-enabling 2FA on noip dashboard two more times and finally its now working! both in GH Actions and in my homelab.

Thank you @ray1025 @simao-silva for your continued support with this, it clearly is an issue with the NOIP TOTP keys being issued, that i have raised with them but they dont care.

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

4 participants