You need to sign in to do that
Don't have an account?

Encounter HTTP 500 Error after click Online-button of Live Agent visitor page on own web-server
Hi All,
We are implement Live Agent feature and configure skill and users, and tried to integrate with our own web-portal.
By Running sample script genereated by Salesforce from Local laptop, it's working well, can see online/offline of agents, also can do Live chat with agents.
When we deploy to our own Tomcat-Apache web-server, we are able to see the online/offline button, but after i click on the Online button the chat window pops up with an error as below:
HTTP ERROR: 500
Problem accessing /content/s/prechatVisitor. Reason:
This is not a JSON Array.
Powered by Jetty://
And URL call in browser looks like below strang url:
https://9t.la9cs.salesforceliveagent.com/content/s/prechatVisitor?endpoint=https%3A%2F%2F9t.la9cs.salesforceliveagent.com%2Fcontent%2Fs%2Fchat%3Flan......................
I already saw there are two similar discussions on the forum without answer.
Any one could give some help? Thanks!
The Sample HTML script are as below:
<html>
<head></head>
<body>
<img id="liveagent_button_online_573O0000000CaUz" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('573O0000000CaUz')" src="https://uat-libertyinsurancesg.cs5.force.com/survey/resource/1421128309000/Live_Agent_online_button" /><img id="liveagent_button_offline_573O0000000CaUz" style="display: none; border: 0px none; " src="https://uat-libertyinsurancesg.cs5.force.com/survey/resource/1421129020000/Live_Agent_offline_button" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('573O0000000CaUz', document.getElementById('liveagent_button_online_573O0000000CaUz'));
liveagent.showWhenOffline('573O0000000CaUz', document.getElementById('liveagent_button_offline_573O0000000CaUz'));
});</script>
<script type='text/javascript' src='https://c.la9cs.salesforceliveagent.com/content/g/js/32.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.addCustomDetail('Company Name', 'Company ABC');
liveagent.setName('John Doe');
liveagent.init('https://d.la9cs.salesforceliveagent.com/chat', '572O0000000CaT3', '00DO00000050jEO');
</script>
</body>
</html>
We are implement Live Agent feature and configure skill and users, and tried to integrate with our own web-portal.
By Running sample script genereated by Salesforce from Local laptop, it's working well, can see online/offline of agents, also can do Live chat with agents.
When we deploy to our own Tomcat-Apache web-server, we are able to see the online/offline button, but after i click on the Online button the chat window pops up with an error as below:
HTTP ERROR: 500
Problem accessing /content/s/prechatVisitor. Reason:
This is not a JSON Array.
Powered by Jetty://
And URL call in browser looks like below strang url:
https://9t.la9cs.salesforceliveagent.com/content/s/prechatVisitor?endpoint=https%3A%2F%2F9t.la9cs.salesforceliveagent.com%2Fcontent%2Fs%2Fchat%3Flan......................
I already saw there are two similar discussions on the forum without answer.
Any one could give some help? Thanks!
The Sample HTML script are as below:
<html>
<head></head>
<body>
<img id="liveagent_button_online_573O0000000CaUz" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('573O0000000CaUz')" src="https://uat-libertyinsurancesg.cs5.force.com/survey/resource/1421128309000/Live_Agent_online_button" /><img id="liveagent_button_offline_573O0000000CaUz" style="display: none; border: 0px none; " src="https://uat-libertyinsurancesg.cs5.force.com/survey/resource/1421129020000/Live_Agent_offline_button" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('573O0000000CaUz', document.getElementById('liveagent_button_online_573O0000000CaUz'));
liveagent.showWhenOffline('573O0000000CaUz', document.getElementById('liveagent_button_offline_573O0000000CaUz'));
});</script>
<script type='text/javascript' src='https://c.la9cs.salesforceliveagent.com/content/g/js/32.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.addCustomDetail('Company Name', 'Company ABC');
liveagent.setName('John Doe');
liveagent.init('https://d.la9cs.salesforceliveagent.com/chat', '572O0000000CaT3', '00DO00000050jEO');
</script>
</body>
</html>
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AdVQ
Below code can be placed somewhere above/before the liveagent.init call.
<script type="text/javascript>
if(window.Prototype) {
delete Object.prototype.toJSON;
delete Array.prototype.toJSON;
delete Hash.prototype.toJSON;
delete String.prototype.toJSON;
}
</script>
After added this code, the Live agent client page is working fine for most of browsers.
For IE9, it requires additional configuration in IE9 broswer:
1. Turn off the "compatibility mode" for all the sites
2. Add *.salesforceliveagent.com into Intranet Site
3. Enable "Running Script"
All Answers
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AdVQ
Below code can be placed somewhere above/before the liveagent.init call.
<script type="text/javascript>
if(window.Prototype) {
delete Object.prototype.toJSON;
delete Array.prototype.toJSON;
delete Hash.prototype.toJSON;
delete String.prototype.toJSON;
}
</script>
After added this code, the Live agent client page is working fine for most of browsers.
For IE9, it requires additional configuration in IE9 broswer:
1. Turn off the "compatibility mode" for all the sites
2. Add *.salesforceliveagent.com into Intranet Site
3. Enable "Running Script"
i have the same issue of you. I cannot understand how you use your code.
Is it possible you did something like: