Local API asks again for language after newly registered account #51

Open
opened 2025-04-03 17:32:40 +02:00 by lash · 2 comments
Owner

Possibly a side-effect from clearing the root state?

[I] engine:db.go:400 runner finished with no remaining code     state=state @0xc00011fb80 moves: 9 idx: 0 flags: 0x1643100000000000000000000000000000 path: root/select_language/set_eng/terms/create_pin/confirm_create_pin/account_creation lang: eng (English)
Your account is being created...Thank you for using Sarafu. Goodbye!
[I] persist:persist.go:100 saving state and cache       self=persister @0xc000147600 state:0xc00011fb80 cache:0xc0003ea780, key=+35113241325, state=state @0xc00011fb80 moves: 16 idx: 0 flags: 0x0643100000000000000000000000000000 path:  lang: eng (English)
[lash@contralto sarafu-vise]$ ./main -c 123 --session-id=+35113241325 --resource services/registration/
[I] main:main.go:58 start command       conn=map[0:conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod TXT, typ FS 1:conn: /srv/git/grassrootseconomics/sarafu-vise/services/registration, mod TXT, typ FS 2:conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod BIN, typ FS], outputsize=160
[I] storage:storage_service.go:120 connecting to db     conn=conn: /srv/git/grassrootseconomics/sarafu-vise/services/registration, mod TXT, typ FS, typ=1
[I] storage:storage_service.go:120 connecting to db     conn=conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod TXT, typ FS, typ=0
[I] storage:storage_service.go:120 connecting to db     conn=conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod BIN, typ FS, typ=2
[I] storage:storage_service.go:83 using existing db     typ=2, db=fsdb: /srv/git/grassrootseconomics/sarafu-vise/123
[E] sarafu-api.devapi:api.go:208 loading transactions failed    error_load_txs=<nil>
[E] sarafu-api.devapi:api.go:208 loading transactions failed    error_load_txs=<nil>
[E] sarafu-api.devapi:api.go:205 loading saved account failed   error_load_account=<nil>
[E] sarafu-api.devapi:api.go:205 loading saved account failed   error_load_account=<nil>
[I] sarafu-api.devapi:api.go:288 added dev voucher      symbol=FOO, address=0xfeab40e1fca77c7360ccca1481bb8ba5f919ce3a
[I] sarafu-api.devapi:api.go:288 added dev voucher      symbol=BAR, address=0xa5d5c1bba91fdb6c669e1ae0413820885bbfc455
[I] persist:persist.go:126 loaded state and cache       self=persister @0xc000053680 state:0xc0000bbb00 cache:0xc0003e6fc0, key=+35113241325, state=state @0xc0000bbb00 moves: 0 idx: 0 flags: 0x0000000000000000000000000000000000 path:  lang: (default)
[I] vm:runner.go:63 vm created with state       state=state @0xc0000bbb00 moves: 0 idx: 0 flags: 0x0000000000000000000000000000000000 path:  lang: (default), renderer=
[I] vm:runner.go:63 vm created with state       state=state @0xc0000bbb00 moves: 1 idx: 0 flags: 0x0000000000000000000000000000000000 path: _first lang: (default), renderer=
[I] engine:db.go:524 new VM execution with input        input=
[I] vm:runner.go:276 catch!     flag=8, sym=select_language, target=select_language, mode=false
Welcome to Sarafu Network
Please select a language
1: English
2: Kiswahili
^C[I] main:main.go:145 stopping on signal       sig=interrupt
[I] persist:persist.go:100 saving state and cache       self=persister @0xc000053680 state:0xc0000bbb00 cache:0xc0003e6fc0, key=+35113241325, state=state @0xc0000bbb00 moves: 4 idx: 0 flags: 0x0402000000000000000000000000000000 path: root/select_language lang: (default)

If you go back, you get PIN confirmation again. AFter that menu shows up.

Possibly a side-effect from clearing the root state? ``` [I] engine:db.go:400 runner finished with no remaining code state=state @0xc00011fb80 moves: 9 idx: 0 flags: 0x1643100000000000000000000000000000 path: root/select_language/set_eng/terms/create_pin/confirm_create_pin/account_creation lang: eng (English) Your account is being created...Thank you for using Sarafu. Goodbye! [I] persist:persist.go:100 saving state and cache self=persister @0xc000147600 state:0xc00011fb80 cache:0xc0003ea780, key=+35113241325, state=state @0xc00011fb80 moves: 16 idx: 0 flags: 0x0643100000000000000000000000000000 path: lang: eng (English) [lash@contralto sarafu-vise]$ ./main -c 123 --session-id=+35113241325 --resource services/registration/ [I] main:main.go:58 start command conn=map[0:conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod TXT, typ FS 1:conn: /srv/git/grassrootseconomics/sarafu-vise/services/registration, mod TXT, typ FS 2:conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod BIN, typ FS], outputsize=160 [I] storage:storage_service.go:120 connecting to db conn=conn: /srv/git/grassrootseconomics/sarafu-vise/services/registration, mod TXT, typ FS, typ=1 [I] storage:storage_service.go:120 connecting to db conn=conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod TXT, typ FS, typ=0 [I] storage:storage_service.go:120 connecting to db conn=conn: /srv/git/grassrootseconomics/sarafu-vise/123, mod BIN, typ FS, typ=2 [I] storage:storage_service.go:83 using existing db typ=2, db=fsdb: /srv/git/grassrootseconomics/sarafu-vise/123 [E] sarafu-api.devapi:api.go:208 loading transactions failed error_load_txs=<nil> [E] sarafu-api.devapi:api.go:208 loading transactions failed error_load_txs=<nil> [E] sarafu-api.devapi:api.go:205 loading saved account failed error_load_account=<nil> [E] sarafu-api.devapi:api.go:205 loading saved account failed error_load_account=<nil> [I] sarafu-api.devapi:api.go:288 added dev voucher symbol=FOO, address=0xfeab40e1fca77c7360ccca1481bb8ba5f919ce3a [I] sarafu-api.devapi:api.go:288 added dev voucher symbol=BAR, address=0xa5d5c1bba91fdb6c669e1ae0413820885bbfc455 [I] persist:persist.go:126 loaded state and cache self=persister @0xc000053680 state:0xc0000bbb00 cache:0xc0003e6fc0, key=+35113241325, state=state @0xc0000bbb00 moves: 0 idx: 0 flags: 0x0000000000000000000000000000000000 path: lang: (default) [I] vm:runner.go:63 vm created with state state=state @0xc0000bbb00 moves: 0 idx: 0 flags: 0x0000000000000000000000000000000000 path: lang: (default), renderer= [I] vm:runner.go:63 vm created with state state=state @0xc0000bbb00 moves: 1 idx: 0 flags: 0x0000000000000000000000000000000000 path: _first lang: (default), renderer= [I] engine:db.go:524 new VM execution with input input= [I] vm:runner.go:276 catch! flag=8, sym=select_language, target=select_language, mode=false Welcome to Sarafu Network Please select a language 1: English 2: Kiswahili ^C[I] main:main.go:145 stopping on signal sig=interrupt [I] persist:persist.go:100 saving state and cache self=persister @0xc000053680 state:0xc0000bbb00 cache:0xc0003e6fc0, key=+35113241325, state=state @0xc0000bbb00 moves: 4 idx: 0 flags: 0x0402000000000000000000000000000000 path: root/select_language lang: (default) ``` If you go back, you get PIN confirmation again. AFter that menu shows up.
lash added the
Kind/Bug
Status
Need More Info
Priority
High
labels 2025-04-03 17:33:33 +02:00
lash changed title from Local API asks again for language after new registred account to Local API asks again for language after newly registered account 2025-04-03 17:39:43 +02:00
Member

@lash kindly confirm the tags used in running the build

Without the online tag, each registration starts afresh with the language selection

@lash kindly confirm the tags used in running the build Without the online tag, each registration starts afresh with the language selection
Author
Owner

@Alfred-mk i am not using the online tag.

The possiblity of using this system offline MUST be preserved. Please fix and make sure you don't break again going forward.

However, it does not reset fully. What happens after the initial registration is:

  • It asks for language again
  • It asks for PIN confirmation
  • It ends
  • Next time it shows the menu.
@Alfred-mk i am not using the online tag. The possiblity of using this system offline MUST be preserved. Please fix and make sure you don't break again going forward. However, it does not reset fully. What happens after the initial registration is: * It asks for language again * It asks for PIN confirmation * It ends * Next time it shows the menu.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: grassrootseconomics/sarafu-vise#51
No description provided.