Restart menu when ussd session expires #201

Open
opened 2024-12-04 16:49:22 +01:00 by lash · 4 comments
Owner

User should be restarted from main menu when the AT session expires.

On new session, request id will change and input string will reset.

Most likely, the appropriate solution involves flushing the state bytecode in the _first handler, and replace it with MOVE ^ if simply an empty bytecode will not be sufficient.

User should be restarted from main menu when the AT session expires. On new session, request id will change and input string will reset. Most likely, the appropriate solution involves _flushing_ the state bytecode in the `_first` handler, and replace it with `MOVE ^` _if_ simply an empty bytecode will not be sufficient.
lash added the
Kind/Feature
Runner
AT
ux
labels 2024-12-04 16:49:36 +01:00
lash added the
Priority
Medium
label 2024-12-04 16:52:58 +01:00
Member

image

@lash I have tried resetting the state for the failed account sample (my number) but the engine kept bailing before running any of the handler code. This was a bit problematic trying to flush the state from the USSD code.

However, I noted that the cause of the engine bailing was the FLAG_TERMINATE flag, under vm>runner.go line 84

Resetting the flag before it returns enabled me to access the menu.

Can this be a solution outside the USSD (changing go-vise)?

![image](/attachments/3558d550-aa59-4398-8a7f-38e678833b98) @lash I have tried resetting the state for the failed account sample (my number) but the engine kept bailing before running any of the handler code. This was a bit problematic trying to flush the state from the USSD code. However, I noted that the cause of the engine bailing was the FLAG_TERMINATE flag, under vm>runner.go line 84 Resetting the flag before it returns enabled me to access the menu. Can this be a solution outside the USSD (changing go-vise)?
Author
Owner

@Alfred-mk is the FLAG_TERMINATE set in your stored state?

@Alfred-mk is the `FLAG_TERMINATE` set in your stored state?
Member

Yes it is set. Resetting it allows the menu to go back to the main node

Yes it is set. Resetting it allows the menu to go back to the main node
Author
Owner

@Alfred-mk so this is an abnormal sitation. Probably it came about because of an unclean exit, and for this kind of case we are going to need a manual tool to force restart from top as a last resort, i.e. #202

As for your account, the safe way to recover it would be to call vise.state.State.Restart() (which would be the same the tool should do)

@Alfred-mk so this is an abnormal sitation. Probably it came about because of an unclean exit, and for this kind of case we are going to need a manual tool to force restart from top as a last resort, i.e. https://git.grassecon.net/urdt/ussd/issues/202 As for your account, the safe way to recover it would be to call `vise.state.State.Restart()` (which would be the same the tool should do)
lash added this to the 2024.12.12 milestone 2024-12-10 11:21:01 +01:00
lash changed title from Force restart of state on different request id to Restart menu when ussd session expires 2024-12-10 11:22:08 +01:00
lash added the
Activity
Doing
label 2024-12-10 11:22:19 +01:00
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: urdt/ussd#201
No description provided.