Xiphe / budgetbudget

🧮 make financial decisions with confidence
https://budgetbudget.app
GNU General Public License v3.0
93 stars 7 forks source link

Create New Budget - Unexpectedly got undefined as icon #61

Closed andre68723 closed 4 years ago

andre68723 commented 4 years ago

After importing some data and adding some accounts in MoneyMoney, unable to create a new budget. Error is

An Error Ocurred
Unexpectedly got undefined as icon

Retry

Version 1.0.0-beta.4 (1.0.0-beta.4) MoneyMoney Version 2.3.32 (just updated today)

Xiphe commented 4 years ago

Uh. that's an interesting one... Looking into it now

Xiphe commented 4 years ago

In MoneyMoney: do you have categories that don't have a ribbon? Or an account/account-group that has no icon?

image

andre68723 commented 4 years ago

all accounts and categories have icons. (Also have 2 accounts marked as closed but they have icons as well) Bildschirmfoto 2020-09-15 um 12 27 25

Xiphe commented 4 years ago

Strange... I'm currently creating a fix that does not require an icon to be present

Xiphe commented 4 years ago

Could you please check if the issue persists with the next release? (It's being build right now)

I changed the error to a warning that should now hint to the entity that has no icon.

If you have the time, could you look into ~/Library/Logs/BudgetBudget/main.log and see which of your categories/accounts does not come with an icon?

andre68723 commented 4 years ago

for Beta 3

[2020-09-15 12:03:48.156] [info] Update for version 1.0.0-beta.3 is not available (latest version: 1.0.0-beta.3, downgrade is allowed).
[2020-09-15 12:03:48.157] [debug] checkForUpdatesAndNotify called, downloadPromise is null
[2020-09-15 12:03:48.608] [error] Error occurred in handler for 'MM_EXPORT_ACCOUNTS': Error: Unexpectedly got undefined as icon
    at /Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:240627
    at Array.map (<anonymous>)
    at T (/Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:240472)
    at /Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:246679
    at /Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:239736
    at Object.next (/Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:239841)
    at o (/Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:238579)
[2020-09-15 12:03:52.018] [error] Error occurred in handler for 'MM_EXPORT_ACCOUNTS': Error: Unexpectedly got undefined as icon
    at /Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:240627
    at Array.map (<anonymous>)
    at T (/Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:240472)
    at /Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:246679
    at /Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:239736
    at Object.next (/Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:239841)
    at o (/Applications/BudgetBudget.app/Contents/Resources/app.asar/main/dist.js:38:238579)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)

will test with Beta 4 later

Xiphe commented 4 years ago

Cool! Thank you ❤️

andre68723 commented 4 years ago

Hm, it changed with Beta 5

An Error Ocurred
Invalid value undefined supplied to : (account & accountOptional)/0: account/balance: Array<[number, string]> Invalid value undefined supplied to : (account & accountOptional)/0: account/currency: string Invalid value undefined supplied to : (account & accountOptional)/0: account/group: boolean Invalid value undefined supplied to : (account & accountOptional)/0: account/indentation: number Invalid value undefined supplied to : (account & accountOptional)/0: account/portfolio: boolean

Log says

[2020-09-15 13:12:53.369] [warn] Unexpectedly got undefined as icon in  Account "EMA"

which makes it clear. EMA is not an Account, but an Account Group which has currently no subnodes/accounts. Waiting here for account access data, I did just create a empty Group which causes the issue

Xiphe commented 4 years ago

Nice! I'm able to reproduce the issue by adding an empty account group. Working on a fix now.

Xiphe commented 4 years ago

Technically i have it fixed (by ignoring the empty category).

Unfortunately the release did not went through and now im in a rabbit-hole of debugging the integration tests.

I doubt I'll manage to release this today but it will be part of the next release whenever it happens.