paisa icon indicating copy to clipboard operation
paisa copied to clipboard

Read properties undefined (reading 'scheduled')

Open devzspy opened this issue 1 year ago • 6 comments

OS: Windows 10 Professional App Variant: Desktop

Describe the bug The following error pops up upon opening Paisa and it automatically loading my "Dashboard"

TypeError: Cannot read properties of undefined (reading 'scheduled')
    at http://wails.localhost/_app/immutable/chunks/transaction_sequence.giWNlVyI.js:1:2373
    at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:22675
    at $e (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:7225)
    at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:22651
    at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:21630
    at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:28624
    at bf (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:21602)
    at xf (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:22624)
    at Function. (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:19:11094)
    at ft (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:6419)

and

TypeError: Cannot read properties of undefined (reading 'scheduled')
    at $s (http://wails.localhost/_app/immutable/nodes/3.f21ftaE2.js:1:4626)
    at Ct (http://wails.localhost/_app/immutable/chunks/index.0TyeUux6.js:4:2772)
    at new Es (http://wails.localhost/_app/immutable/nodes/3.f21ftaE2.js:1:4777)
    at Gt (http://wails.localhost/_app/immutable/nodes/3.f21ftaE2.js:5:10583)
    at jt (http://wails.localhost/_app/immutable/nodes/3.f21ftaE2.js:5:9263)
    at Object.p (http://wails.localhost/_app/immutable/nodes/3.f21ftaE2.js:5:19441)
    at lt (http://wails.localhost/_app/immutable/chunks/scheduler.rpkcuUjt.js:1:8650)
    at rt (http://wails.localhost/_app/immutable/chunks/scheduler.rpkcuUjt.js:1:8303)

To Reproduce Steps to reproduce the behavior:

  1. Close Paisa if open
  2. Open Paisa

Expected behavior Expecting the dashboard to open as it normally does and be able to use Paisa

Screenshots If applicable, add screenshots to help explain your problem.

image

devzspy avatar Jul 01 '24 07:07 devzspy

After removing a few entries within the editor/database I get my dashboard to load. However, if I attempt to insert any more transactions in the month of June I start to get the errors above. If I start to put transactions in July the program operates as expected.

devzspy avatar Jul 01 '24 23:07 devzspy

I also got a similar error.

OS: Windows 11 Home App Variant: Desktop

Describe the bug The following error pops up upon synching a new ledger. I am not able to close the error window as well. I tried to reopen the app. But the error appears again.

TypeError: Cannot read properties of undefined (reading 'scheduled') at http://wails.localhost/_app/immutable/chunks/transaction_sequence.giWNlVyI.js:1:2373 at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:22675 at $e (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:7225) at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:22651 at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:21630 at http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:28624 at bf (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:21602) at xf (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:22624) at Function. (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:19:11094) at ft (http://wails.localhost/_app/immutable/chunks/store.omAut747.js:17:6419)

Please report this issue at https://github.com/ananthakumaran/paisa/issues. Closing and reopening the app may help.

AgileSenthil avatar Jul 05 '24 09:07 AgileSenthil

Looks like a scheduled Recurring entry was conflicting with a configuration for a credit card under More -> Configuration -> Credit Cards

I had

= Liabilities:CreditCard:Chase
    ; Recurring: ChasePayment
    ; Period: 16W * ?

Which had an entry under configurations. My guess was the period of 16W ? * was conflicting with the entry in my configuration (paisa.yaml)

devzspy avatar Jul 07 '24 23:07 devzspy

After more tinkering it seems the conflict arises when I have the above in my ledger but then I am using that exact Account of Liabilities:CreditCard:Chase as I do have other transactions using that. It works just fine if you switch the above to something like

expr payee=~/Chase Payment/
    ; Recurring: ChasePayment
    ; Period: 16W * ?

At least if you want something to show up under the Recurring section. If not you don't need this.

devzspy avatar Jul 08 '24 16:07 devzspy

Thanks for the above findings. It did resolve the issue I faced. The common pattern between our cases is about the recurring tag. I had the following that caused the error.

= Assets:Debt:Deposits:PO SCSS ; Recurring: PO-SCSS1 ; Period: L 3,6,9,12 *

AgileSenthil avatar Jul 10 '24 04:07 AgileSenthil

Thanks for debugging, I would like to keep this open. I understand you found some workaround, but app shouldn't crash in any cases. I am a bit tight with no free time nowadays, but keeping this open would help me or someone else to fix this.

ananthakumaran avatar Jul 11 '24 02:07 ananthakumaran