bachya/simplisafe-python

Name does not resolve during auth attempt while installing integration in HA

Closed this issue · 34 comments

Describe the bug
Username/password verification times out. Logs contain:

  File "/usr/src/homeassistant/homeassistant/components/simplisafe/config_flow.py", line 69, in _async_authenticate
    self._simplisafe = await API.async_from_credentials(
  File "/usr/local/lib/python3.9/site-packages/simplipy/api.py", line 156, in async_from_credentials
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host auth.simplisafe.comhttps:443 ssl:default [Name does not resolve]

To Reproduce
Steps to reproduce the behavior:

  1. In Home Assistant, add the Simplisafe integration
  2. Enter username and password
  3. Receive auth email from Simplisafe and click on Verify Device in email
  4. Return to Home Assistant and wait
  5. Auth dialog times out
  6. Traceback appears in /config/home-assistant.log on HA server

Expected behavior
Auth completes and integration installation completes

Additional context
HA 2022.5.1

Thanks for reaching out. You are the second user to report this particular error. auth.simplisafe.comhttps isn't going to resolve as a valid hostname (hence the error); unfortunately, that value isn't anywhere that I can see in the code (and plenty of instances are working as expected). I'll do some digging to see what I can find.

Could you please set DEBUG-level logs in Home Assistant and post SimpliSafe-related entries here?

logger:
  default: info
  logs:
    homeassistant.components.simplisafe: debug
    simplipy: debug

I don't see any suspicious entries in the debug output.

However, I wonder whether there should be a delimiter (slash or colon, etc.) after the URL in these lines of code:

f"{AUTH_URL_BASE}{auth0_resp.headers['Location']}",

f"{AUTH_URL_BASE}{login_verification_resp.headers['Location']}",

However, I wonder whether there should be a delimiter (slash or colon, etc.) after the URL in these lines of code:

f"{AUTH_URL_BASE}{auth0_resp.headers['Location']}",

f"{AUTH_URL_BASE}{login_verification_resp.headers['Location']}",

Not necessarily. In most requests that I've seen, the Location header (where simplipy determines its next go-to during authentication) includes the opening /:

CleanShot 2022-05-07 at 12 00 50

Of course, since this is an unofficial API, there's no guarantee that it always happens... so it's worth some investigation. Let me produce a test script for this library to find out and get back to you.

Okay, let's give this test script a show.

  1. From a command line, clone this library:
$ git clone https://github.com/bachya/simplisafe-python.git
  1. cd into the directory, then checkout our test branch:
$ cd simplisafe-python/
$ git checkout fix-337
  1. Set up the dev environment per steps 3-5 of the "Contributing" section of the README.

  2. Open the test script (examples/pr_test.py) in an editor of your choice and update lines 14-15 with your SimpliSafe username and password:

SIMPLISAFE_USERNAME = "<USERNAME>"
SIMPLISAFE_PASSWORD = "<PASSWORD>"
  1. Save and close your editor.

  2. Run the script:

$ python3 ./examples/pr_test.py
  1. Paste the output here.

You didn't say, but I ran this on my local machine as my HA server doesn't have Python, etc.

19,431 lines of "still pending" HTML blocks out of a total of 19,738 lines of output.

This is the last several lines of output with over-cautious redactions:

DEBUG:simplipy:Login Verification Response Headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Sun, 08 May 2022 00:32:37 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '78', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=100', 'X-Auth0-RequestId': 'BLAHBLAH', 'Location': '/authorize/resume?state=BLAHBLAH', 'Vary': 'Accept', 'Set-Cookie': 'auth0=BLAHBLAH; Path=/; Expires=Sun, 08 May 2022 08:32:37 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'auth0_compat=BLAHBLAH; Path=/; Expires=Sun, 08 May 2022 08:32:37 GMT; HttpOnly; Secure', 'Cache-Control': 'private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform', 'X-Robots-Tag': 'noindex, nofollow, nosnippet, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
DEBUG:simplipy:Auth Code URL: com.simplisafe.mobile://auth.simplisafe.com/ios/com.simplisafe.mobile/callback?code=BLAHBLAH
DEBUG:simplipy:Data received from /api/authCheck: {'userId': BLAH, 'isAdmin': False}

some of which appeared after I clicked the Verify Device button in the email from Simplisafe.

We're looking for DEBUG-level log statements that begin with Auth0 response headers.

We can confirm from your first line:

DEBUG:simplipy:Login Verification Response Headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Sun, 08 May 2022 00:32:37 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '78', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=100', 'X-Auth0-RequestId': 'BLAHBLAH', 'Location': '/authorize/resume?state=BLAHBLAH', 'Vary': 'Accept', 'Set-Cookie': 'auth0=BLAHBLAH; Path=/; Expires=Sun, 08 May 2022 08:32:37 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'auth0_compat=BLAHBLAH; Path=/; Expires=Sun, 08 May 2022 08:32:37 GMT; HttpOnly; Secure', 'Cache-Control': 'private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform', 'X-Robots-Tag': 'noindex, nofollow, nosnippet, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>

...that the Location header does, indeed, begin with a / in the case of a login verification response, so that's off the table.

DEBUG:simplipy:Auth0 response headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Sun, 08 May 2022 00:26:00 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '424', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Set-Cookie': 'did=BLAHBLAH; Max-Age=31557600; Path=/; Expires=Mon, 08 May 2023 06:26:00 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'auth0=BLAHBLAH; Path=/; Expires=Wed, 11 May 2022 00:26:00 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'did_compat=BLAHBLAH; Max-Age=31557600; Path=/; Expires=Mon, 08 May 2023 06:26:00 GMT; HttpOnly; Secure', 'Set-Cookie': 'auth0_compat=BLAHBLAH; Path=/; Expires=Wed, 11 May 2022 00:26:00 GMT; HttpOnly; Secure', 'Cache-Control': 'no-store, max-age=0, no-transform', 'Pragma': 'no-cache', 'Location': '/u/login?state=BLAHBLAH', 'Vary': 'Accept', 'X-Robots-Tag': 'noindex, nofollow, nosnippet, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
DEBUG:simplipy:Login Verification Response Headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Sun, 08 May 2022 00:32:37 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '78', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Location': '/authorize/resume?state=BLAH', 'Vary': 'Accept', 'Set-Cookie': 'auth0=BLAHBLAH; Path=/; Expires=Sun, 08 May 2022 08:32:37 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'auth0_compat=BLAHBLAH; Path=/; Expires=Sun, 08 May 2022 08:32:37 GMT; HttpOnly; Secure', 'Cache-Control': 'private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform', 'X-Robots-Tag': 'noindex, nofollow, nosnippet, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
DEBUG:simplipy:Auth Code URL: com.simplisafe.mobile://auth.simplisafe.com/ios/com.simplisafe.mobile/callback?code=BLAHBLAH
DEBUG:simplipy:Data received from /api/authCheck: {'userId': BLAH, 'isAdmin': False}

That Location header starts with a /, too, so we can rule that out as the issue. Thanks for checking!

Since you are experiencing a raw aiohttp.client_exceptions.ClientConnectorError, the only place that could happen during login is here:

login_resp = await session.request(
"post",
f"{AUTH_URL_BASE}{auth0_resp.headers['Location']}",
data={
"password": password,
"username": username,
},
)

(All other usages of the auth URL would, upon error, return an exception from this library.)

I'm still puzzled as to why, though, since your latest tests shows a Location header that starts with a /...

Now that I think about it, your logs above look like the authentication succeeded (and you didn't receive an error) – is that accurate?

Using the test script, the auth appears to have succeeded. I meant to say that in my first message with test script output.

The Home Assistant integration uses the same logic. Unfortunately, at a bit of a dead end. Anything else you can tell me about the time(s) it failed? Were you attempting to authenticate on a different browser/OS?

The process that failed was initiated in the Simplisafe integration in HA on a Raspberry Pi and verification made on a Macbook in Chrome. The verification succeeded in the browser, but the auth on the Pi in HA timed out, logging the traceback in my initial bug report.

The test script was run on that same Macbook and the verification that succeeded was in the same instance of Chrome, the test script recognized that the verification was successful and completed, outputting the Data received from /api/authCheck message and exiting.

I should note that I had previously successfully installed, configured and used the Simplisafe integration, but when I updated HA to 2022.5 the integration wanted to be reconfigured. When I tried that I got the timeouts and failures. After that and before I opened this issue, I had also removed and re-added the integration with the same result.

Thanks for the info.

My hunch is that once HASS initially (and successfully) authenticates with SimpliSafe, a session cookie is stored; any subsequent authentication gets to skip a step because login has already been done. This would be consistent with your error: I'm guessing that the https that is mysteriously appended to the Location header is the full URL to SimpliSafe's email-based 2FA platform.

So, although it's something of a shot in the dark (I use SMS-based 2FA, so unforuntaely, I can't test this directly), I think I can look to see if a URL beings with https and if so, skip the section of code that is now throwing an exception. I'll get this into the next HASS patch release and would appreciate your test.

@dtwilliamson FYI, the attempted fix I merged in #338 will be included in HASS 2022.5.4 (home-assistant/core#71545).

Thank you very much for helping me. I'll be watching for the update and will let you know here what the results are.

@dtwilliamson FYI, this was released in HASS 2022.5.4. Let me know how your testing goes!

I'm still getting failures. Is it possible to increase the timeout? It takes up to about 10 minutes for me to receive the email from Simplisafe and click the verification. The integration times out well before that.

@dtwilliamson Sorry to hear. Yes, I can increase the timeout. That's all in Home Assistant (not this library), so I'll post back with a link you can follow.

Thanks! I see it's already merged into dev! I'll watch for the next release.

I installed HA 2202.6.0 and tried to install the Simplisafe integration again. The longer timeout allowed enough time for the verification to be performed, but the integration's "Check your email for a verification link from Simplisafe" dialog never exited and the installation never completed. This traceback was in the log:

2022-06-01 23:06:29 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 260, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/simplisafe/config_flow.py", line 144, in async_step_email_2fa
    await self._email_2fa_task
  File "/usr/src/homeassistant/homeassistant/components/simplisafe/config_flow.py", line 120, in _async_get_email_2fa
    await self._simplisafe.async_verify_2fa_email()
  File "/usr/local/lib/python3.9/site-packages/simplipy/api.py", line 486, in async_verify_2fa_email
    "state": self._login_verification_url.query["state"],
AttributeError: 'str' object has no attribute 'query'

Please send debug-level logs

2022 03:57:59 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '1386', 'Connection': 'keep-alive', 'Keep-Alive': 
'timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Cache-Control': 'no-store, max-age=0, no-transform', 'Pragma': 'no-cach
e', 'Location': 'https://tsv.prd.platform.simplisafe.com/v1/tsv/check?token=BLAHBLAH, 'Vary': 'Accept', 'X-Robots-Tag': 'noindex, nofollow, nosnippet, noarchive', 'Strict-Transport-Security':
 'max-age=31536000')>
2022-06-01 22:57:59 DEBUG (MainThread) [simplipy] API Verification URL: https://tsv.prd.platform.simplisafe.com/v1/tsv/check?token=BLAHBLAH
2022-06-01 22:58:00 DEBUG (MainThread) [simplipy] Email-based 2FA attempt response body: <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="robots" content="noindex, nofollow" />
    <link rel="stylesheet" href="/static/css/main.min.css" />
    <link rel="shortcut icon" type='image/x-icon' href="https://simplisafe.com/favicon.ico" />
    <style id="custom-styles-container">
        body {
            background: #F6F6F5;
            font-family: ulp-font, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif;
        }

        .main-wrapper {
            background: #F6F6F5;
        }

        .ulp-alert.danger {
            background: #D00E17;
        }

        .ulp-alert.success {
            background: #0A8852;
        }

        .ulp-button-default {
            background-color: #0081ad;
            color: #ffffff;
        }
        .ulp-button-success {
            background-color: #0A8852;
        }

        .ulp-button-error {
            background-color: #D00E17;
        }

        .ss-link-btn {
            display: block;
            line-height: 52px;
            line-height: var(--button-height);
        }

        .ulp-button:disabled {
            background: #d5d8d9;
            color: #fff;
        }
    </style>
    <style>
        /* By default, hide features for javascript-disabled browsing */
        /* We use !important to override any css with higher specificity */
        /* It is also overriden by the styles in <noscript> in the header file */
        .no-js {
            display: none !important;
        }
    </style>
    <noscript>
        <style>
            /* We use !important to override the default for js enabled */
            /* If the display should be other than block, it should be defined specifically here */
            .js-required {
                display: none !important;
            }

            .no-js {
                display: block !important;
            }
        </style>
    </noscript>

    <title>SimpliSafe Two-Step Verification</title>
</head>

<body>
    <div class="main-wrapper _page-background">
<script type="text/javascript">
    var autoRefresh = true;
    
    window.onload = function () {
        try {
            history.pushState({}, '', window.location);
            window.addEventListener('popstate', function(event) {
                autoRefresh = false;
                window.location.href = 'https://auth.simplisafe.com/v2/logout?client_id=BLAH&amp;returnT
o=com.simplisafe.mobile%3A%2F%2Fauth.simplisafe.com%2Fios%2Fcom.simplisafe.mobile%2Fcallback%3Ferror%3Dlogin_required%26error_descri
ption%3Duser_cancelled';
            });
        }
        catch(e) {
            console.log(err);
        }
    }
    
</script>

<main class="ulp-outer login">
    <section class="ulp-box   no-badge">
        <div class="ulp-box-inner _prompt-box">
            <div class="ulp-main">
                <header class="ulp-header _prompt-header">
                    <img class="header-logo _header-logo" id="prompt-logo-center"
                        src="https://webapp.simplisafe.com/res/img/1/ss-logo.svg" alt="Welcome" />

                    <h1 class="header-title _header-title">Verification Pending</h1>

                    <div class="header-description _header-description">
                        
                        <p class="text-simple _text  ">Please check your email for your verification link. This page will automatica
lly redirect when verification is completed.</p>
                    </div>
                </header>

                <div class="ulp-container _prompt-body">
                    
                    <div class="button-bar">
                        <a href=""
                            class="ulp-button ulp-button-default _button _button-default _button-login ss-link-btn">Refresh</a>
                    </div>
                    
                    
                    <form method="get" action="/v1/tsv/resend" id="form">
                        <input type="hidden" name="token" value="BLAHBLAH" />
                        <input type="hidden" name="state" value="BLAHBLAH" />
                        <div class="button-bar">
                            <button type="submit"
                                class="ulp-button ulp-button-default _button _button-default _button-login">Re-send Email</button>
                        </div>
                    </form>
                    
                    
                    <div class="button-bar">
                        <a href="https://auth.simplisafe.com/v2/logout?client_id=BLAH&amp;returnTo=com.s
implisafe.mobile%3A%2F%2Fauth.simplisafe.com%2Fios%2Fcom.simplisafe.mobile%2Fcallback%3Ferror%3Dlogin_required%26error_description%3
Duser_cancelled"
                            class="ulp-button ulp-button-default _button _button-default _button-login ss-link-btn">Cancel Login</a>

                    </div>
                    
                    
                    <script type="text/javascript">
                        setTimeout(() => autoRefresh && window.location.reload(), 3000);
                    </script>
                    
                </div>
            </div>
        </div>
    </section>
</main>

    </div>
</body>

</html>
2022-06-01 22:58:00 INFO (MainThread) [homeassistant.components.simplisafe] Email-based 2FA pending; trying again
2022-06-01 22:58:03 DEBUG (MainThread) [simplipy] Email-based 2FA attempt response body: <!DOCTYPE html>

* * * * The above repeated many times (maybe 165) * * * *

* * * * Then * * * *

2022-06-01 22:57:59 DEBUG (MainThread) [simplipy] Auth0 response headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Thu, 02 Jun 2022 03:57:59 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '1386', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Cache-Control': 'no-store, max-age=0, no-transform', 'Pragma': 'no-cache', 'Location': 'https://tsv.prd.platform.simplisafe.com/v1/tsv/check?token=BLAHBLAH', 'Vary': 'Accept', 'X-Robots-Tag': 'noindex, nofollow, nosnippet, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
2022-06-01 22:57:59 DEBUG (MainThread) [simplipy] API Verification URL: https://tsv.prd.platform.simplisafe.com/v1/tsv/check?token=BLAHBLAH

@dtwilliamson I've added a fix for your exception; we'll have to see if it fixes the issue fully. Look for this to land in the 2022.6.3 release of HASS.

Still "hanging".

2022-06-06 23:07:32 DEBUG (MainThread) [simplipy] Auth0 response headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Tue, 07 Jun 
2022 04:07:32 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '424', 'Connection': 'keep-alive', 'Keep-Alive': '
timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Set-Cookie': 'did=BLAH; Max-Age=31557600; Path=/; Expires=Wed, 07 Jun 2023 10:07:32 GMT; HttpOnly; Secure; SameSi
te=None', 'Set-Cookie': 'auth0=BLAH; Path=/; Expires=F
ri, 10 Jun 2022 04:07:32 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'did_compat=BLAH; Max-Age=31557600; Path=/; Expires=Wed, 07 Jun 2023 10:07:32 GMT; HttpOnly; Se
cure', 'Set-Cookie': 'auth0_compat=BLAH; Path=/; Expir
es=Fri, 10 Jun 2022 04:07:32 GMT; HttpOnly; Secure', 'Cache-Control': 'no-store, max-age=0, no-transform', 'Pragma': 'no-cache', 'Lo
cation': '/u/login?state=BLAH', 'Vary': 'Accept', 'X-Robots-Tag': 'noindex, nofollow, nosnipp
et, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
2022-06-06 23:07:34 DEBUG (MainThread) [simplipy] Login attempt response body: <!DOCTYPE html>

- - - - HTML omitted - - - -

2022-06-06 23:07:32 DEBUG (MainThread) [simplipy] Auth0 response headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Tue, 07 Jun 
2022 04:07:32 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '424', 'Connection': 'keep-alive', 'Keep-Alive': '
timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Set-Cookie': 'did=BLAH; Max-Age=31557600; Path=/; Expires=Wed, 07 Jun 2023 10:07:32 GMT; HttpOnly; Secure; SameSi
te=None', 'Set-Cookie': 'auth0=BLAH; Path=/; Expires=F
ri, 10 Jun 2022 04:07:32 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'did_compat=BLAH; Max-Age=31557600; Path=/; Expires=Wed, 07 Jun 2023 10:07:32 GMT; HttpOnly; Se
cure', 'Set-Cookie': 'auth0_compat=BLAH; Path=/; Expir
es=Fri, 10 Jun 2022 04:07:32 GMT; HttpOnly; Secure', 'Cache-Control': 'no-store, max-age=0, no-transform', 'Pragma': 'no-cache', 'Lo
cation': '/u/login?state=BLAH', 'Vary': 'Accept', 'X-Robots-Tag': 'noindex, nofollow, nosnipp
et, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
2022-06-06 23:07:34 DEBUG (MainThread) [simplipy] Login attempt response body: <!DOCTYPE html>

- - - - many HTML blocks - - - -

2022-06-06 23:14:29 DEBUG (MainThread) [simplipy] Login Verification Response Headers: <CIMultiDictProxy('Server': 'nginx', 'Date': 
'Tue, 07 Jun 2022 04:14:29 GMT', 'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '78', 'Connection': 'keep-alive', 'K
eep-Alive': 'timeout=100', 'X-Auth0-RequestId': 'BLAH', 'Location': '/authorize/resume?state=BLAH', 'Vary': 'Accept', 'Set-Cookie': 'auth0=BLAH; Path=/; Expires=Tue, 07 Jun 2022 12:14:29 GMT; HttpOnly; Secure; SameSite=None', 'Set-Cookie': 'auth0_compat=BLAH; Path=/; Expires=Tue, 07 Jun 2022 12:14:29 GMT; HttpOnly; Secure', 'C
ache-Control': 'private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform', 'X-Robots-Tag': 'noindex, no
follow, nosnippet, noarchive', 'Strict-Transport-Security': 'max-age=31536000')>
2022-06-06 23:14:29 DEBUG (MainThread) [simplipy] Auth Code URL: com.simplisafe.mobile://auth.simplisafe.com/ios/com.simplisafe.mobi
le/callback?code=BLAH
2022-06-06 23:14:30 DEBUG (MainThread) [simplipy] Data received from /api/authCheck: {'userId': xxxxxx, 'isAdmin': False}

I don't seem any error in those logs. So you mean that after clicking the link in the email, HASS doesn't complete authorization?

There was no error traceback this time but the "Check your email for a verification link from Simplisafe" dialog never exited.

Please include the HTML you omitted – that's really our only way to debug what's going on (since other email-based 2FA installs seem to be working fine).

Please include the HTML you omitted – that's really our only way to debug what's going on (since other email-based 2FA installs seem to be working fine).

Here's the first one from the log:

<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="robots" content="noindex, nofollow" />
    <link rel="stylesheet" href="/static/css/main.min.css" />
    <link rel="shortcut icon" type='image/x-icon' href="https://simplisafe.com/favicon.ico" />
    <style id="custom-styles-container">
        body {
            background: #F6F6F5;
            font-family: ulp-font, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif;
        }

        .main-wrapper {
            background: #F6F6F5;
        }

        .ulp-alert.danger {
            background: #D00E17;
        }

        .ulp-alert.success {
            background: #0A8852;
        }

        .ulp-button-default {
            background-color: #0081ad;
            color: #ffffff;
        }

        .ulp-button-success {
            background-color: #0A8852;
        }

        .ulp-button-error {
            background-color: #D00E17;
        }

        .ss-link-btn {
            display: block;
            line-height: 52px;
            line-height: var(--button-height);
        }

        .ulp-button:disabled {
            background: #d5d8d9;
            color: #fff;
        }
    </style>
    <style>
        /* By default, hide features for javascript-disabled browsing */
        /* We use !important to override any css with higher specificity */
        /* It is also overriden by the styles in <noscript> in the header file */
        .no-js {
            display: none !important;
        }
    </style>
    <noscript>
        <style>
            /* We use !important to override the default for js enabled */
            /* If the display should be other than block, it should be defined specifically here */
            .js-required {
                display: none !important;
            }

            .no-js {
                display: block !important;
            }
        </style>
    </noscript>

    <title>SimpliSafe Two-Step Verification</title>
</head>

<body>
    <div class="main-wrapper _page-background">

<script type="text/javascript">
    var autoRefresh = true;
    
    window.onload = function () {
        try {
            history.pushState({}, '', window.location);
            window.addEventListener('popstate', function(event) {
                autoRefresh = false;
                window.location.href = 'https://auth.simplisafe.com/v2/logout?client_id=BLAH&amp;returnT
o=com.simplisafe.mobile%3A%2F%2Fauth.simplisafe.com%2Fios%2Fcom.simplisafe.mobile%2Fcallback%3Ferror%3Dlogin_required%26error_descri
ption%3Duser_cancelled';
            });
        }
        catch(e) {
            console.log(err);
        }
    }
</script>

<main class="ulp-outer login">
    <section class="ulp-box   no-badge">
        <div class="ulp-box-inner _prompt-box">
            <div class="ulp-main">
                <header class="ulp-header _prompt-header">
                    <img class="header-logo _header-logo" id="prompt-logo-center"
                        src="https://webapp.simplisafe.com/res/img/1/ss-logo.svg" alt="Welcome" />

                    <h1 class="header-title _header-title">Verification Pending</h1>

                    <div class="header-description _header-description">
                        
                        <p class="text-simple _text  ">Please check your email for your verification link. This page will automatica
lly redirect when verification is completed.</p>
                    </div>
                </header>

                <div class="ulp-container _prompt-body">
                    
                    <div class="button-bar">
                        <a href=""
                            class="ulp-button ulp-button-default _button _button-default _button-login ss-link-btn">Refresh</a>
                    </div>
                    
                    
                    <form method="get" action="/v1/tsv/resend" id="form">
                        <input type="hidden" name="token" value="BLAHBLAH" />
                        <input type="hidden" name="state" value="BLAH" />
                        <div class="button-bar">
                            <button type="submit"
                                class="ulp-button ulp-button-default _button _button-default _button-login">Re-send Email</button>
                        </div>
                    </form>
                    
                    
                    <div class="button-bar">
                        <a href="https://auth.simplisafe.com/v2/logout?client_id=BLAH&amp;returnTo=com.s
implisafe.mobile%3A%2F%2Fauth.simplisafe.com%2Fios%2Fcom.simplisafe.mobile%2Fcallback%3Ferror%3Dlogin_required%26error_description%3
Duser_cancelled"
                            class="ulp-button ulp-button-default _button _button-default _button-login ss-link-btn">Cancel Login</a>
                    </div>
                    
                    
                    <script type="text/javascript">
                        setTimeout(() => autoRefresh && window.location.reload(), 3000);
                    </script>
                    
                </div>
            </div>
        </div>
    </section>
</main>

    </div>
</body>

</html>

and the last one:

<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="robots" content="noindex, nofollow" />
    <link rel="stylesheet" href="/static/css/main.min.css" />
    <link rel="shortcut icon" type='image/x-icon' href="https://simplisafe.com/favicon.ico" />
    <style id="custom-styles-container">
        body {
            background: #F6F6F5;
            font-family: ulp-font, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif;
        }

        .main-wrapper {
            background: #F6F6F5;
        }

        .ulp-alert.danger {
            background: #D00E17;
        }

        .ulp-alert.success {
            background: #0A8852;
        }

        .ulp-button-default {
            background-color: #0081ad;
            color: #ffffff;
        }

        .ulp-button-success {
            background-color: #0A8852;
        }

        .ulp-button-error {
            background-color: #D00E17;
        }

        .ss-link-btn {
            display: block;
            line-height: 52px;
            line-height: var(--button-height);
        }

        .ulp-button:disabled {
            background: #d5d8d9;
            color: #fff;
        }
    </style>
    <style>
        /* By default, hide features for javascript-disabled browsing */
        /* We use !important to override any css with higher specificity */
        /* It is also overriden by the styles in <noscript> in the header file */
        .no-js {
            display: none !important;
        }
    </style>
    <noscript>
        <style>
            /* We use !important to override the default for js enabled */
            /* If the display should be other than block, it should be defined specifically here */
            .js-required {
                display: none !important;
            }

            .no-js {
                display: block !important;
            }
        </style>
    </noscript>

    <title>SimpliSafe Two-Step Verification</title>
</head>

<body>
    <div class="main-wrapper _page-background">

<main class="ulp-outer login">
    <section class="ulp-box   no-badge">
        <div class="ulp-box-inner _prompt-box">
            <div class="ulp-main">
                <header class="ulp-header _prompt-header">
                    <img class="header-logo _header-logo" id="prompt-logo-center"
                        src="https://webapp.simplisafe.com/res/img/1/ss-logo.svg" alt="Welcome" />

                    <h1 class="header-title _header-title">Verification Successful</h1>

                    <div class="header-description _header-description">
                        
                        <p class="text-simple _text  ">You will be redirected momentarily...</p>
                    </div>
                </header>

                <div class="ulp-container _prompt-body">
                    
                    <script type="text/javascript">
                        var formEnabled = true;

                        function submitForm() {
                            formEnabled = false;
                            document.getElementById('continue-btn').disabled = true;
                            document.getElementById('success-form').submit();
                        }
                    </script>
                    
                    <script type="text/javascript">
                        function autoSubmitForm() {
                            if(!formEnabled) return;

                            if(!document.hidden) {
                                submitForm();
                            }
                            else {
                                setTimeout(autoSubmitForm, 2000);
                            }
                        }

                        setTimeout(autoSubmitForm, 2000);
                    </script>
                    
                    <form method="post" action="https://auth.simplisafe.com/continue?state=BLAHBLAH" id="s
uccess-form">
                        <input type="hidden" name="token" value="BLAHBLAH" />
                        <div class="button-bar">
                            <button 
                                type="submit"
                                class="ulp-button ulp-button-default _button _button-default _button-login"
                                id="continue-btn"
                                onclick="submitForm()"
                            >
                            Continue
                            </button>
                        </div>
                    </form>
                    
                    
                    
                    
                        <input type="hidden" name="token" value="BLAHBLAH" />
                        <div class="button-bar">
                            <button 
                                type="submit"
                                class="ulp-button ulp-button-default _button _button-default _button-login"
                                id="continue-btn"
                                onclick="submitForm()"
                            >
                            Continue
                            </button>
                        </div>
                    </form>
                    
                    
                    
                    
                </div>
            </div>
        </div>
    </section>
</main>

    </div>
</body>

</html>

Everything looks correct there. Additionally, the last line of your prior log shows that you are, indeed, authenticating fine:

2022-06-06 23:14:30 DEBUG (MainThread) [simplipy] Data received from /api/authCheck: {'userId': xxxxxx, 'isAdmin': False}

Not sure what else may be going on... Perhaps some other Home Assistant process is halting the integration's final loading in your case.

I don't know enough about how the components of the system interact to know where to start. All I know is that prior to HA 2022.5.1 the Simplisafe integration was working (I believe the authentication method was different when I first enabled Simplisafe). I also checked the HA troubleshooting page and didn't see anything that seemed helpful for this issue.

Because of a SimpliSafe change, as of #371, this library no longer supports authentication via username/password/2FA; therefore, this issue is no longer valid. Closing.