1

While integrating Chatbot to mobile application, getting below error

[chromium] [INFO:CONSOLE(2)] "Uncaught Error: getSessionData requires two non-null arguments (domain, keys).", source: https://Rcm--univcrm.my.salesforce.com/embeddedservice/5.0/frame/session.esw.min.js (2)

also

[chromium] [INFO:CONSOLE(2)] "Uncaught Error: getSessionData requires two non-null arguments (domain, keys).", source: https://service.force.com/embeddedservice/5.0/frame/session.esw.min.js (2)

I am using Webview. Below is my script file code.

<!DOCTYPE html>
<html>
<head>
    <style type='text/css'>
        .embeddedServiceHelpButton .helpButton .uiButton {
            background-color: #005290;
            font-family: "Arial", sans-serif;
        }

            .embeddedServiceHelpButton .helpButton .uiButton:focus {
                outline: 1px solid #005290;
            }
    </style>
</head>
<body>
    <script type='text/javascript'>
        var initESW = function (gslbBaseURL) {
            embedded_svc.settings.displayHelpButton = true; //Or false
            embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US'
            embedded_svc.settings.enabledFeatures = ['LiveAgent'];
            embedded_svc.settings.entryFeature = 'LiveAgent';
            embedded_svc.init(
                'https://url.my.salesforce.com',
                'https://ulr_chatbot.cs189.force.com/visualforce',
                gslbBaseURL,
                '00D7a00000055uj',
                'UK_Stores',
                {
                    'baseLiveAgentContentURL': 'https://ulr.salesforceliveagent.com/content',
                    'deploymentId': '20Q0008Oqg',
                    'buttonId': '0Q00',
                    'baseLiveAgentURL': 'https://ulr.salesforceliveagent.com/chat',
                    'eswLiveAgentDevName': 'EmbeddedServiceLiveAgent_Parent0LUAQ_17d9ae8e',
                    'isOfflineSupportEnabled': false
                }
            );
        };
        if (!window.embedded_svc) {
            var s = document.createElement('script');

            s.setAttribute('src', 'url/embeddedservice/5.0/esw.min.js');

            s.onload = function () {
                initESW(null);

            }
            document.body.appendChild(s);
        }
        else {
            initESW('https://service.force.com');
        }
    </script>
</body>
</html>

Can you please help me ?

2
  • Does this happen in all the browsers? Mar 14, 2022 at 11:38
  • @Swetha - I am trying this in android mobile application. If script has url, that is throwing an error like at s.setAttribute. You can check this for more information stackoverflow.com/questions/71478674/…
    – R15
    Mar 15, 2022 at 8:03

0

You must log in to answer this question.

Browse other questions tagged .