maybe-finance / maybe

The OS for your personal finances
https://maybe.co
GNU Affero General Public License v3.0
33.4k stars 2.42k forks source link

Account charts always several days behind #1403

Open JustinGeorgi opened 4 days ago

JustinGeorgi commented 4 days ago

Describe the bug All charts of account values or net work cover a range that does not include today. The most recent date is always 4 days in the past, even when there are transactions from the current day. This is true no matter what chart range is selected. The chart ranges are correct (7D shows 7 days worth of data) but the entire range is always shifted 4 days.

To Reproduce Steps to reproduce the behavior: It's true for every single one of the charts. There are no specific steps for me. Create any account...add any transactions...the chart ends on the wrong day. Sync the account just to be safe...the chart still ends on the wrong day.

Expected behavior The chart range should go all the way to the current day.

What version of Maybe are you using? Self hosting v0.2 alpha. Docker installation.

services:

  app:
    image: ghcr.io/maybe-finance/maybe:latest
    volumes:
      - ./storage:/rails/storage
    network_mode: host
    restart: unless-stopped
    env_file:
      - stack.env
    environment:
      SELF_HOSTING_ENABLED: true
      DB_HOST: localhost
      RAILS_FORCE_SSL: false
      RAILS_ASSUME_SSL: false
      POSTGRES_USER: postgres
      GOOD_JOB_EXECUTION_MODE: async
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16
    restart: unless-stopped
    network_mode: host
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-postgres}
      POSTGRES_DB: ${POSTGRES_DB:-maybe_production}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER" ]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  postgres-data:

What operating system and browser are you using? It's true on Chromium based browsers and Firefox on both windows machines and linux.

Screenshots / Recordings image

Additional context Been self-hosting since docker images have been available. Update nearly every release by downloading the new image and spinning up the container again. I believe this error has been true from the very beginning, but I don't exactly recall.

New transactions auto-populate with the correct date and logs show the correct UTC so the system has the correct date-time information.

zachgoll commented 20 hours ago

@JustinGeorgi this should be fixed in the latest version.

If you find otherwise, please share some logs from your running instance so we can figure out what's going on.

followingell commented 19 hours ago

@zachgoll I'm seeing this on v0.1.0. If you share how to get the logs potentially I can help 👍

zachgoll commented 19 hours ago

@followingell what type of account are you seeing this on? All types? Or just investment types?

You should be able to run docker compose logs or in Docker Desktop, you can click on the image that is running: CleanShot 2024-11-05 at 12 21 00

followingell commented 19 hours ago

@followingell what type of account are you seeing this on? All types? Or just investment types?

I'm seeing this on all types. These only update after I run:

docker stop
docker compose up -d

Can't provide logs right now sorry!

zachgoll commented 19 hours ago

@followingell and what happens when you hit the "sync" button? Does it still not show all the balances?

followingell commented 16 hours ago

@followingell and what happens when you hit the "sync" button? Does it still not show all the balances?

@zachgoll It shows the correct account balances but the line charts do not update.

JustinGeorgi commented 9 hours ago

Thanks @zachgoll. I just pulled the latest image right now and the charts are no longer behind. They are, however, 1 day ahead. I assume that it's using UTC which is already the 6th instead of still the 5th where I am (UTC-7).

Is there supposed to be a localization setting or should I just bind /etc/timezone to the container?