mattwebbio / orbital-sync

Synchronize multiple Pi-hole instances
http://orbitalsync.com
MIT License
549 stars 21 forks source link

Failure: No token could be found while logging in to "http://10.0.40.5/admin" - are you able to log in with the configured password? #185

Open jhoward321 opened 1 year ago

jhoward321 commented 1 year ago

What happened?

I have used the docker compose file from the examples - and I can confirm that the passwords work correctly when logging in through the browser. I get the same error every time I try to run - any ideas on what might be wrong?

version: '3'
services:
  orbital-sync:
    image: mattwebbio/orbital-sync:1
    environment:
      PRIMARY_HOST_BASE_URL: 'http://10.0.40.5'
      PRIMARY_HOST_PASSWORD: 'redacted'
      SECONDARY_HOST_1_BASE_URL: 'http://10.0.40.4'
      SECONDARY_HOST_1_PASSWORD: 'redacted'
      INTERVAL_MINUTES: 1440
      VERBOSE: true

Version

The latest

Log output

jake@rpi4  ~/orbital-sync  docker compose up
WARN[0000] The "f" variable is not set. Defaulting to a blank string.
WARN[0000] The "f" variable is not set. Defaulting to a blank string.
[+] Running 1/1
 ✔ Container orbital-sync-orbital-sync-1  Recreated                                                                                                                                                                                                                                                                    0.2s
Attaching to orbital-sync-orbital-sync-1
orbital-sync-orbital-sync-1  | 7/13/2023, 3:55:47 PM: ➡️ Signing in to http://10.0.40.5/admin...
orbital-sync-orbital-sync-1  | 7/13/2023, 3:55:48 PM: ⚠ Failure: No token could be found while logging in to "http://10.0.40.5/admin" - are you able to log in with the configured password?
orbital-sync-orbital-sync-1  | 7/13/2023, 3:55:48 PM: {"host":"http://10.0.40.5","path":"/admin","innerHtml":"<!DOCTYPE html>\n\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    \n    <meta http-equiv=\"x-dns-prefetch-control\" content=\"off\">\n    <meta http-equiv=\"cache-control\" content=\"max-age=60,private\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n    <title>Pi-hole - pihole</title>\n\n    <link rel=\"apple-touch-icon\" href=\"img/favicons/apple-touch-icon.png\" sizes=\"180x180\">\n    <link rel=\"icon\" href=\"img/favicons/favicon-32x32.png\" sizes=\"32x32\" type=\"image/png\">\n    <link rel=\"icon\" href=\"img/favicons/favicon-16x16.png\" sizes=\"16x16\" type=\"image/png\">\n    <link rel=\"manifest\" href=\"img/favicons/manifest.json\">\n    <link rel=\"mask-icon\" href=\"img/favicons/safari-pinned-tab.svg\" color=\"#272c30\">\n    <link rel=\"shortcut icon\" href=\"img/favicons/favicon.ico\">\n    <meta name=\"msapplication-TileColor\" content=\"#272c30\">\n    <meta name=\"msapplication-TileImage\" content=\"img/favicons/mstile-150x150.png\">\n\n    \n    <meta name=\"theme-color\" content=\"#272c30\">\n\n    <style>\n        html { background-color: #000; }\n    </style>\n\n    \n    <link rel=\"stylesheet\" href=\"style/vendor/SourceSansPro/SourceSansPro.css?v=1685460723\">\n\n    \n    <link rel=\"stylesheet\" href=\"style/vendor/bootstrap/css/bootstrap.min.css?v=1685460723\">\n    <link rel=\"stylesheet\" href=\"style/vendor/AdminLTE.min.css?v=1685460723\">\n    <link rel=\"stylesheet\" href=\"style/vendor/select2.min.css?v=1685460723\">\n\n\n    \n    <link rel=\"stylesheet\" href=\"style/pi-hole.css?v=1685460723\">\n    <link rel=\"stylesheet\" href=\"style/themes/default-dark.css?v=1685460723\">\n\n    <noscript><link rel=\"stylesheet\" href=\"style/vendor/js-warn.css?v=1685460723\"></noscript>\n\n    \n    <script src=\"scripts/vendor/jquery.min.js?v=1685460723\"></script>\n    <script src=\"style/vendor/bootstrap/js/bootstrap.min.js?v=1685460723\"></script>\n    <script src=\"scripts/vendor/adminlte.min.js?v=1685460723\"></script>\n    <script src=\"scripts/vendor/bootstrap-notify.min.js?v=1685460723\"></script>\n    <script src=\"style/vendor/font-awesome/js/all.min.js?v=1685460723\"></script>\n    <script src=\"scripts/pi-hole/js/utils.js?v=1685460723\"></script>\n</head>\n<body class=\"hold-transition layout-boxed login-page\">\n<div class=\"box login-box\">\n    <section style=\"padding: 15px;\">\n        <div class=\"login-logo\">\n            <div class=\"text-center\">\n                <img src=\"img/logo.svg\" alt=\"Pi-hole logo\" class=\"loginpage-logo\">\n            </div>\n            <div class=\"panel-title text-center\"><span class=\"logo-lg\" style=\"font-size: 25px;\">Pi-<b>hole</b></span></div>\n        </div>\n        \n\n        <div class=\"card\">\n            <div class=\"card-body login-card-body\">\n                <div id=\"cookieInfo\" class=\"panel-title text-center text-red\" style=\"font-size: 150%\" hidden>Verify that cookies are allowed for <code>10.0.40.5</code></div>\n                \n                <form action=\"\" id=\"loginform\" method=\"post\">\n                    <div class=\"form-group login-options has-feedback\">\n                        <div class=\"pwd-field\">\n                            \n                            <input type=\"text\" id=\"username\" value=\"pi.hole\" autocomplete=\"username\" hidden>\n                            <input type=\"password\" id=\"loginpw\" name=\"pw\" class=\"form-control\" placeholder=\"Password\" spellcheck=\"false\" autocomplete=\"current-password\" autofocus>\n                            <span class=\"fa fa-key form-control-feedback\"></span>\n                        </div>\n                        <div>\n                            <input type=\"checkbox\" id=\"logincookie\" name=\"persistentlogin\">\n                            <label for=\"logincookie\">Remember me for 7 days</label>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <button type=\"submit\" class=\"btn btn-primary form-control\"><i class=\"fas fa-sign-in-alt\"></i>&nbsp;&nbsp;&nbsp;Log in</button>\n                    </div>\n                </form>\n                <br>\n                <div class=\"row\">\n                    <div class=\"col-xs-12\">\n                        <div class=\"box box-info collapsed-box\">\n                            <div class=\"box-header with-border pointer no-user-select\" data-widget=\"collapse\">\n                                <h3 class=\"box-title\">Forgot password?</h3>\n                                <div class=\"box-tools pull-right\">\n                                    <button type=\"button\" class=\"btn btn-box-tool\">\n                                        <i class=\"fa fa-plus\"></i>\n                                    </button>\n                                </div>\n                            </div>\n                            <div class=\"box-body\">\n                                <p>After installing Pi-hole for the first time, a password is generated and displayed\n                                    to the user. The password cannot be retrieved later on, but it is possible to set\n                                    a new password (or explicitly disable the password by setting an empty password)\n                                    using the command\n                                </p>\n                                <pre>sudo pihole -a -p</pre>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            \n            <div class=\"login-footer\" style=\"margin-top: 15px; display: flex; justify-content: space-between;\">\n                <a class=\"btn btn-default btn-sm\" role=\"button\" href=\"https://docs.pi-hole.net/\" target=\"_blank\"><i class=\"fas fa-question-circle\"></i> Documentation</a>\n                <a class=\"btn btn-default btn-sm\" role=\"button\" href=\"https://github.com/pi-hole/\" target=\"_blank\"><i class=\"fab fa-github\"></i> Github</a>\n                <a class=\"btn btn-default btn-sm\" role=\"button\" href=\"https://discourse.pi-hole.net/\" target=\"_blank\"><i class=\"fab fa-discourse\"></i> Pi-hole Discourse</a>\n            </div>\n        </div>\n    </section>\n</div>\n\n<div class=\"login-donate\">\n    <div class=\"text-center\" style=\"font-size:125%\">\n        <strong><a href=\"https://pi-hole.net/donate/\" rel=\"noopener\" target=\"_blank\"><i class=\"fa fa-heart text-red\"></i> Donate</a></strong> if you found this useful.\n    </div>\n</div>\n<script src=\"scripts/pi-hole/js/footer.js?v=1685460723\"></script>\n</body>\n</html>\n"}
orbital-sync-orbital-sync-1  | 7/13/2023, 3:55:48 PM: Waiting 1440 minutes...
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...
[+] Stopping 1/1
 ✔ Container orbital-sync-orbital-sync-1  Stopped
Badn1nja commented 8 months ago

I also have this with behavior with my stack version: '3' services: orbital-sync: image: mattwebbio/orbital-sync:1 network_mode: "host"
environment: PRIMARY_HOST_BASE_URL: 'http://192.168.1.3' PRIMARY_HOST_PASSWORD: '' #$urx>&Nk)h8BbER/ SECONDARY_HOST_1_BASE_URL: 'http://192.168.1.4' SECONDARY_HOST_1_PASSWORD: 'ZfoV8U6e%Hs@BJ' INTERVAL_MINUTES: 30 pihole: container_name: pihole network_mode: "host"
image: pihole/pihole:latest

Using pw as blank here works without the issue

LucasJanin commented 6 months ago

I have the same issue. After some tests, I found that Orbital Sync has trouble with some special characters. It works perfectly after changing my password to only letters and numbers.

jacobslusser commented 2 months ago

@LucasJanin for the win! Had to change my password to only letters and numbers.