actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
14.56k stars 1.16k forks source link

[Bug]: unclean handling of SimpleFIN downtime #3763

Open chrwei opened 3 hours ago

chrwei commented 3 hours ago

Verified issue does not already exist?

What happened?

Trying to sync banks and I get the error "This account is experiencing connection problems. Let’s fix it." Clicking that give the details "An internal error occurred. Try to login again, or get in touch for support." and the option to unlink the account. I didn't try it but i think this would also fail.

Using this test script https://gist.github.com/duplaja/4df7e47230566894b7ee2a7e45ac2f50 also errors, and the "pickle" file contains HTML with title tag "Temporary Maintenance - SimpleFIN Bridge" and a messages section stating "This website is undergoing temporary maintenance. Some functions are unavailable at this time."

Ideally, Actual would check the SimpleFIN return and show that message instead of offering to unlink.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome

Operating System

Windows 11

chrwei commented 3 hours ago

full html returned by SimpleFIN:

<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="Description" content="The SimpleFIN Bridge lets you securely share your financial transaction data with apps.">
    <title>Temporary Maintenance - SimpleFIN Bridge</title>
    <link rel="stylesheet" href="/static/wing.css" />
    <link rel="stylesheet" href="/static/style.css" />
    <link rel="icon" href="/static/favicon.png" type="image/png" /> 
  </head>
  <body>
    <section class="container main-wrapper">

      <section class="main-document">
      <header class="nav left">
        <div class="nav-item logo-holder">
          <img src="/static/logo.svg" class="logo" alt="SimpleFIN Logo"/>
          SimpleFIN Bridge
        </div>
        <div class="nav-item">
          <a href="/">Home</a>
        </div>
        <div class="nav-item">
          <a href="/auth/login">Sign in</a>
        </div>
      </header>

      <section class="messages" id="messages-section">
      <div class="message warning">
        <span>This website is undergoing temporary maintenance. Some functions are unavailable at this time.</span>
      </div>

      </section>
      <script>
        function isVisible(elem) {
          let bounds = elem.getBoundingClientRect();
          return bounds.top > 0 && bounds.bottom < window.innerHeight;
        }
        function flashMessage(message, cls) {
          let div = document.createElement('div');
          div.classList.add('message');
          if (cls) {
            div.classList.add(cls);
          }
          let span = document.createElement('span');
          span.innerText = message;
          div.appendChild(span);
          div.innerHTML += `<a href="javascript:void(0);" onclick="this.parentNode.parentNode.removeChild(this.parentNode); return false;">(dismiss)</a>`;
          document.getElementById('messages-section').appendChild(div);
          if (!isVisible(div)) {
            div.scrollIntoView && div.scrollIntoView({
              behavior: 'smooth',
            });
          }
        }
      </script>

      <section class="main">
        <h1>Temporary Maintenance</h1>
        <p>
  This site is currently undergoing temporary maintenance. Some functions will be unavailable until the maintenance is complete.
</p>
      </section>

    </section>

    <footer>
      <div class="footer-nav">
        <a href="/search-institutions">Supported institutions</a>
        <a href="/info/developers">Developer guide</a>
        <a href="/info/mission">Our mission</a>
        <a href="/info/terms">Terms of Use</a>
        <a href="/info/privacy">Privacy</a>
        <a href="/info/security">Security</a>
        <a href="/info/contact">Contact us</a>
      </div>
      <p class="copyright">Copyright &copy; SimpleFIN</p>
    </footer>
    </section>
  </body>
</html>