function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maxime LabergeMaxime Laberge 

Getting this error: "Lightning out App error in callback function" when launching a screen flow from a URL button

When launching a flow using an URL button from a list view, I get the following error at the bottom of the screen flow
"Lightning out App error in callback function". Also, when the flow finishes (the flow runs without errors and records a created), the user is not re-directed to the defined retURL (or the home page if not retURL is specified). This only happens in LEX and work fine in Classic. Also the error is intermitent (Sometime the error disapears and the user is sent to the retURL)
Has anybody received this error before?
Deepali KulshresthaDeepali Kulshrestha
Hi Maxime,

No specific discovery other than it was definitely happening more often on long latency, 
low bandwidth connections, and that is why I suspected a timing issue. 
IE is a much slower browser generally, so that could help suggest a mistiming 
the issue in the way that Lightning-Out has been implemented by Salesforce.


I suggest users do a browser hard refresh if they see this issue 
(such a hard refresh seems to resolve things generally speaking).

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
Priscilla PestoffPriscilla Pestoff
I know this is an older question, but I'll put my resolution here for future reference. I had the same use case and it was actually the Behavior defined on the button causing the error; not anything to do with retURL. When I changed the Behavior to "Display in existing window without sidebar or header", the error went away and the retURL worked as expected. 
Chema RochaChema Rocha
Thanks a lot Priscilia, after many hours, documentation, blogs and different pages, you had the answer.
Gary LordGary Lord
Thank you Priscilla! I too was saved by your solution after at least an hour of trying different solutions.
Admin 2831Admin 2831
Same here, thanks for sharing Priscilla.
J BengelJ Bengel
Didn't solve it for my use case. Nothing has. I've tried all of the variations on Behavior and I don't get an error, the redirect just stubbornly refuses to work. It returns me to the top of the flow like the redirect never happened. I get the same results trying to use a local action inside the flow itself. The closest I have come to a solution so far is to deliver the flow in a VF Page, but that causes the browser to throw a snit over cross site cookies (which I know will be resolved by enhanced domains, but I have an SSO issue with that feature that I have ot get someone in our infrastructure group to assist on because I do'nt have access to Azure to configure that side of it. "Job security", right?)