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
DIMNA SUNNYDIMNA SUNNY 

Error rendering Force.com Canvas application

Hi,

I had developed an app using Canvas. While loading Canvas, it shows an error like,

‘“Oops, there was an error rendering Force.com Canvas application [Hello World].Your browsing session has ended or is invalid. Please re-login to Salesforce.com again.”
User-added image



The app was working fine before. But now it is frequently showing this error. But once I clear the browser cache and then try again, it works well for a while.  After some time it shows the same error.
The Access Method in the Canvas App Settings is Signed Request (POST)

The visual force page looks like,
<apex:page controller="CanvasController">
	..
	..
	<apex:canvasApp id="canvasFrame" applicationName="HelloWorld" parameters="{!parameters}" width="100%"/>
	..
	..
</apex:page>

And the Controller looks like
public class CanvasController{
	public string parameters{get;set;}
	public Contact contactRecord;
	...
	…
	public void someMethod(){
		..
		contactRecord = [SELECT Id, Name FROM Contact LIMIT 1];
		parameters = JSON.serialize(contactRecord);
	}
}
Please help me if you have any idea. Thanks in advance. 
Sonam_SFDCSonam_SFDC
The following seems like a similar issue faced by a user - please check the post to see the solution:
http://salesforce.stackexchange.com/questions/22626/error-rendering-force-com-canvas-application

Share if that fixes the problem..
abhik dey 1abhik dey 1
Hi Sunny,

Did you get any solution for the above said issue ?
I am also facing the same issue wanted to check with you for any solution u have for this canvas issue.
 
Olivier SaierOlivier Saier
It definitely used to work for me but now I get the same error.
In Chrome inspector:
VM102 CanvasProxy.js:22 PUT https://another-dev-ed.my.salesforce.com/services/data/v44.0/platformconnect/signedrequest?referenceId=09H1o0000009GS0 401 (Unauthorized)
Midles SmithMidles Smith
for me, this thread solution worked  https://salesforce.stackexchange.com/questions/164931/is-there-a-way-to-call-javascript-after-action-on-visualforce-page
https://vidmate.onl/ https://messenger.red/ https://showbox.run/