[SalesForce] “Visualforce Remoting: Javascript proxies were not generated for controller xyz: may not use public remoted methods inside an iframe.”

"Visualforce Remoting: Javascript proxies were not generated for controller xyz: may not use public remoted methods inside an iframe."
Getting this error when I am using my pages in Lightning. I am getting this wherever I have used remote actions.
If I make remote actions global this error is gone. But I don't want this as solution because, to make all remote actions global I need to make classes as global also.
Works fine in Salesforce Classic

Best Answer

This issue is not because of remote actions basically. Wherever we were calling remote actions using html tags in vf page, we were getting this error. We replaced html tags with apex tags (commandlink) and didn't change the remote actions. It works fine now. Html tags are not supported in lightning and error is bit misleading.

Related Topic