cioraneanu / firefly-pico

A delightful Firefly III companion web app for effortless transaction tracking
GNU Affero General Public License v3.0
429 stars 19 forks source link

NaN appears on all the dashboard reports #89

Closed phuchoang2603 closed 2 months ago

phuchoang2603 commented 4 months ago

Hi, I would like to understand how to resolve this issue. Presently, the app displays the total money I have, and all interactions with the app function quite well, except the small reports on the dashboard below do not show the correct numbers.

I'm wondering if this issue is related to my use of Firefly MariaDB instead of the recommended PostgreSQL in your setup guide. Additionally, I am using the Cloudflare tunnel for both the Firefly and Pico instances.

Please let me know if you need any further information. Thank you very much.

image

cioraneanu commented 4 months ago

Hi, the database and cloudflare tunnels should not be a factor.

To debug it you could try cloning the repository locally and starting up the frontend only. Then inside the UI -> App settings -> Pico Backend URL set it to your actual docker installation just like the production app. Info

A good place to start investigating would be the Total income

avee87 commented 4 months ago

Do you use some non-standard currencies? I can imagine this issue happening if you use currency conversion on the dashboard but there are no conversion rates for your currency.

phuchoang2603 commented 4 months ago

Do you use some non-standard currencies? I can imagine this issue happening if you use currency conversion on the dashboard but there are no conversion rates for your currency.

I’m curious if the Vietnamese Dong (VND) is considered a non-standard currency. From what I can see, there are conversion rates between USD and VND available on the extras tab.

IMG_0623

phuchoang2603 commented 4 months ago

Hi, the database and cloudflare tunnels should not be a factor.

To debug it you could try cloning the repository locally and starting up the frontend only. Then inside the UI -> App settings -> Pico Backend URL set it to your actual docker installation just like the production app. Info

A good place to start investigating would be the Total income

Yes, I’ve cloned it and I’m still waiting for the npm install to finish. I’m not sure why it’s taking so long—my computer has been stuck for about 2 hours now.

cioraneanu commented 2 months ago

Closing as cant reproduce

kelvinchin12070811 commented 1 week ago

I have a similar issue on MYR, but however have solved it. This is due to a configuration error on Firefly III when creating the currency. The issue is when firefly-pico trying to convert the currency to another (at most case will convert back to the same currency), this configuration error will cause the convertion fall into NaN as it cannot find the proper exchange rate which returns undefined, eg the following screenshot of the debugger.

image

The solution is if the desire country's currency did not by default listed in firefly III, make sure to create it properly, or update it and delete all the site data (including session storage & local storage) and refresh it should work. Eg following is for MYR:

image