I run into a very bizarre issue when I packaged a lightning flow in a Managed Beta Package and try to tested out on the installed package.
My lightning flow is linked to a quick action button and it loads fine and worked alright in a dev environment. But after packaged the component and launch it in a staging environment(Managed Beta installed) it fail to launch and give the following error:
Salesforce debug log shows only following:
48.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO 14:35:41.0 (121919)|USER_INFO|[EXTERNAL]|00521000004BnCMfirstname.lastname@example.org|(GMT-04:00) Eastern Daylight Time (America/New_York)|GMT-04:00
The flow I had has one thing different than the other flows that does not have problem loading. That is this flow started with an Apex Action. And the apex action was taking variables from flow as input variables to run.
When I remove the apex action as first element run by the flow, and made a beta package. I tested on the new beta package everything works ok.
This seems like an issue with salesforce. Anyone has any idea on why this is happening. Is it best practice to call "Apex Action" at the beginning of a lightning flow?