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
Sylvia Gise 7Sylvia Gise 7 

JavaScript remoting with continuation is not invoking the callback method

All development and test Salesforce instances are experiencing some form of the following, we have confirmed that functionality was impacted / problem not observed until 7/6:

Visualforce Remoting Exception: Error parsing json response:
'Unexpected token <'.  Logged in?
 
xhr.responseText=
"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body onload="document.forms['workerForm'].submit()">
<form  action="https://pmic--Dev12.cs41.my.salesforce.com/visualforce/session" id="workerForm" method="post" name="workerForm" ><input type="hidden" name="url" id="url" value="https://pmic--dev12--c.cs41.visual.force.com/apexremote" />
</form>
</body>
</html>"

This is happening when using the Continuation for both JavaScript remoting and action functions.

Issues are intermittent... appear to be permission related... perhaps... because if a user with admin or admin like access logs in "as" the test account that encounters the problem, the problem is not observed. However, when logging in directly using that test account the problem is encountered. In one instance there have not been any code changes implemented by our internal team since 6/30, the organization worked correctly on 6/30, 7/1 and then on 7/5 it has been confirmed that until at least 3:30pm (central) fuctionality was correct. However, on 7/6 the above error began to be received.

Any suggestions or insights would be greatly appreciated...
 
Gordon EngelGordon Engel
Might be related to this.  Patch to sandbox is underway now. 

https://success.salesforce.com/issues_view?id=a1p3A00000185IjQAI
TomSnyderTomSnyder
Sylivia,

I am now experencing this same issue in production for the last week.  any insight?
I get a few requests response sucessfully then eventially get the same response as you show above.  This happens prematurely to TTL on session.

 
Gordon EngelGordon Engel
This error is typically related to sessions timing out prematurely.  It's difficult to test this scenario, and even when we fix it in one use case it can pop up again in others.

Please monitor this Known Issue for the fix this time.  It should go out this week (schedules can change, though).

https://success.salesforce.com/issues_view?id=a1p3A0000001BctQAE
 
TomSnyderTomSnyder
Looks like the fix has been pushed out,  but  I am still having premature timeouts.  I submitted a case to 'enable feature' as stated in the issue workaround.