Ghostfolio hard crashes on Portfolio -> Analysis page. Whole application has to be restarted.
To Reproduce
Open Portfolio -> Analysis page
Crash with exception:
[Nest] 122 - 06/04/2024, 1:07:59 PM ERROR [ExceptionsHandler] [big.js] Invalid number
Error: [big.js] Invalid number
at parse (/ghostfolio/apps/api/node_modules/big.js/big.js:142:13)
at new Big (/ghostfolio/apps/api/node_modules/big.js/big.js:109:9)
at P.times.P.mul (/ghostfolio/apps/api/node_modules/big.js/big.js:843:17)
at TWRPortfolioCalculator.computeSnapshot (/ghostfolio/apps/api/main.js:1:421105)
at async TWRPortfolioCalculator.initialize (/ghostfolio/apps/api/main.js:1:431685)
at async TWRPortfolioCalculator.getSnapshot (/ghostfolio/apps/api/main.js:1:429071)
at async PortfolioService.getDetails (/ghostfolio/apps/api/main.js:1:453313)
at async PortfolioController.getHoldings (/ghostfolio/apps/api/main.js:1:480128)
/ghostfolio/apps/api/node_modules/big.js/big.js:142
throw Error(INVALID + 'number');
^
Error: [big.js] Invalid number
at parse (/ghostfolio/apps/api/node_modules/big.js/big.js:142:13)
at new Big (/ghostfolio/apps/api/node_modules/big.js/big.js:109:9)
at P.times.P.mul (/ghostfolio/apps/api/node_modules/big.js/big.js:843:17)
at TWRPortfolioCalculator.computeSnapshot (/ghostfolio/apps/api/main.js:1:421105)
at async TWRPortfolioCalculator.initialize (/ghostfolio/apps/api/main.js:1:431311)
Node.js v18.20.3
**Expected behavior**
No crash
**Screenshots**
Not gui related.
**Logs**
More logs:
Error: [big.js] Invalid number
at parse (/ghostfolio/apps/api/node_modules/big.js/big.js:142:13)
at new Big (/ghostfolio/apps/api/node_modules/big.js/big.js:109:9)
at P.times.P.mul (/ghostfolio/apps/api/node_modules/big.js/big.js:843:17)
at TWRPortfolioCalculator.computeSnapshot (/ghostfolio/apps/api/main.js:1:421105)
at async TWRPortfolioCalculator.initialize (/ghostfolio/apps/api/main.js:1:431311)
Node.js v18.20.3
**Environment**
<!-- Please complete the following information -->
- Ghostfolio Version 2.84.0
- Self-hosted
- Experimental Features disabled
- Chrome
- Ubuntu
Bug Description
Ghostfolio hard crashes on Portfolio -> Analysis page. Whole application has to be restarted.
To Reproduce
Error: [big.js] Invalid number at parse (/ghostfolio/apps/api/node_modules/big.js/big.js:142:13) at new Big (/ghostfolio/apps/api/node_modules/big.js/big.js:109:9) at P.times.P.mul (/ghostfolio/apps/api/node_modules/big.js/big.js:843:17) at TWRPortfolioCalculator.computeSnapshot (/ghostfolio/apps/api/main.js:1:421105) at async TWRPortfolioCalculator.initialize (/ghostfolio/apps/api/main.js:1:431311)
Node.js v18.20.3
Please consider completing the survey at https://bit.ly/yahoo-finance-api-feedback if you haven't already; for more info see https://github.com/gadicc/node-yahoo-finance2/issues/764#issuecomment-2056623851. Fetching crumb and cookies from https://finance.yahoo.com/quote/AAPL... fetch https://guce.yahoo.com/consent?brandType=nonEu&gcrumb=RHd0rGI&done=https%3A%2F%2Ffinance.yahoo.com%2Fquote%2FAAPL fetch https://consent.yahoo.com/v2/collectConsent?sessionId=3_cc-session_4b4b7589-2ac0-4017-9b01-68ce0eb504c0 fetch https://consent.yahoo.com/v2/collectConsent?sessionId=3_cc-session_4b4b7589-2ac0-4017-9b01-68ce0eb504c0 fetch https://guce.yahoo.com/copyConsent?sessionId=3_cc-session_4b4b7589-2ac0-4017-9b01-68ce0eb504c0&lang=fr-FR Fetching crumb and cookies from https://finance.yahoo.com/quote/AAPL?guccounter=1... We expected a redirect to guce.yahoo.com, but got https://finance.yahoo.com/quote/AAPL/ We'll try to continue anyway - you can safely ignore this if the request succeeds Success. Cookie expires on Infinity fetch https://query1.finance.yahoo.com/v1/test/getcrumb New crumb: 8lNVrlFk10e [Nest] 122 - 06/04/2024, 1:07:59 PM ERROR [ExceptionsHandler] [big.js] Invalid number Error: [big.js] Invalid number at parse (/ghostfolio/apps/api/node_modules/big.js/big.js:142:13) at new Big (/ghostfolio/apps/api/node_modules/big.js/big.js:109:9) at P.times.P.mul (/ghostfolio/apps/api/node_modules/big.js/big.js:843:17) at TWRPortfolioCalculator.computeSnapshot (/ghostfolio/apps/api/main.js:1:421105) at async TWRPortfolioCalculator.initialize (/ghostfolio/apps/api/main.js:1:431685) at async TWRPortfolioCalculator.getSnapshot (/ghostfolio/apps/api/main.js:1:429071) at async PortfolioService.getDetails (/ghostfolio/apps/api/main.js:1:453313) at async PortfolioController.getHoldings (/ghostfolio/apps/api/main.js:1:480128) /ghostfolio/apps/api/node_modules/big.js/big.js:142 throw Error(INVALID + 'number'); ^
Error: [big.js] Invalid number at parse (/ghostfolio/apps/api/node_modules/big.js/big.js:142:13) at new Big (/ghostfolio/apps/api/node_modules/big.js/big.js:109:9) at P.times.P.mul (/ghostfolio/apps/api/node_modules/big.js/big.js:843:17) at TWRPortfolioCalculator.computeSnapshot (/ghostfolio/apps/api/main.js:1:421105) at async TWRPortfolioCalculator.initialize (/ghostfolio/apps/api/main.js:1:431311)
Node.js v18.20.3