agstrike / silverstrike

Finance Management Made Easy
https://silverstrike.org
MIT License
424 stars 100 forks source link

Error 500 on recurrences #147

Closed bc1bb closed 1 year ago

bc1bb commented 1 year ago

Hi, I just setup an instance using docker compose, and after putting all data in, I've got recurrences/recurring payment registered, if I click on them, it tells me "Server Error (500)".

Logs on container side says: (unable to catch anything better ?) silverstrike-ags-1 | [pid: 10|app: 0|req: 39/61] 172.22.0.1 () {66 vars in 1380 bytes} [Thu Dec 22 21:44:17 2022] GET /recurrences/3/ => generated 145 bytes in 20 msecs (HTTP/1.1 500) 8 headers in 287 bytes (1 switches on core 7)

Seems to be the same for any kind of recurrences, first two to be registered had "System Account" as Source or Destination, maybe it could be linked to this ? One has foreign account (non-System) to Personal account transaction, still can't access it.

Am I not supposed to edit recurring transactions ?

On Demo: it looks like clicking on a recurring crashed the instance (if you can check logs it was around today 22:00 UTC)

(Setup detail: Linux server, Silverstrike runs in Docker on latest git commit, behind a Nginx reverse proxy, MySQL database hosted out of Docker but accessible)

simhnna commented 1 year ago

Yeah, looks like recurrences that don't have any linked transactions cause issues. Should be an easy fix

bc1bb commented 1 year ago

I cannot confirm it changed anything for me, even after pulling git and rebuilding image

simhnna commented 1 year ago

did you actually rebuild the image? Can you try running docker-compose --build

Also you could enable DEBUG mode by creating a file deploy/local_settings.py with DEBUG=True as it's content. That should show the actual errors in the browser

bc1bb commented 1 year ago

While rebuilding I get this error: (that I didn't get when I tried a little earlier ...)


#0 83.69 Searching for idna<4,>=2.5
#0 83.69 Reading https://pypi.org/simple/idna/
#0 83.84 Downloading https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl#sha256=90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
#0 83.93 error: sha256 validation failed for idna-3.4-py3-none-any.whl; possible download problem?
------
failed to solve: executor failed running [/bin/sh -c apt-get update -y && apt-get install -y gcc libmariadb-dev python3-dev libffi-dev &&     pip install --no-cache-dir -r requirements.txt && python setup.py install && apt-get remove -y gcc && apt-get autoremove -y]: exit code: 1

Retried a few times, very stable internet knowing server is hosted @ Hetzner

bc1bb commented 1 year ago

Update: I simply deleted everything i had about silverstrike except database, and got everything back on again and it works this time,

Can confirm original issue is solved on my side now, thanks for such a fast patch