<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Greetings,<div><br></div><div>Running tests on a gen_statem application they all fail. Directly after callback init/1. I see</div><div><div>** Reason for termination = error:{bad_action_from_state_function,</div><div>                                      {next_events,internal,reconnect}}</div></div><div>This is init, BTW:</div><div>init() -> {ok, connect, #{}, {next_event, internal, reconnect}}.</div><div><br></div><div>Looking in gen_statem.erl the calls after init() are (simplified):</div><div>enter(), where we add a new variable TransOpts (map, is empty) </div><div>loop_event_actions()<br></div><div>loop_event_actions_list()<br></div><div>parse_actions(), where if TransOpts is a map, we add a new variable StateCall (boolean, is false)</div><div>parse_actions()</div><div>parse_actions_next_event(), where StateCall must be true to actually do this.<br></div><div><br></div><div>Is there a way to persuade gen_statem to do parse_actions_next_event(), even if TransOpts is a map?</div><div><br></div><div>Erlang OTP 20.3</div><div>Ubuntu 18.04.1 LTS</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>