Cobrowse Troubleshooting Guide

Session Issues

Could not parse domain

If you see “could not parse domain from…” or ERR_DOMAINPARSE in the javascript console, then you may be accessing the website with a hostname from which Glance cannot parse a domain. Use a hostname like something.com or http://www.something.com/ or abc.def.something.edu, or if you can’t change the hostname, then set the cookiedomain as explained in the Cobrowse Getting Started section.

Warning

Local file:// urls and localhost:// won’t work. You need to add an entry to your lmhosts file.

Session ends right after starting it

Often, this is a problem writing the Glance session cookie. For example, it is not possible for Glance to write a Cobrowse session cookie for a website accessed on a public suffix domain such as “azurewebsites.net.” In this scenario, a session will appear to start, but will immediately end. If you are just testing a staging site, you can add an entry to your lmhosts file and access the site via some other name. If you run your production site on such a domain, you can configure Glance to write the session cookie using a full hostname instead of the domain. See the “data-cookiedomain” attribute of the Cobrowse script tag as documented in Cobrowse Getting Started.

Quote characters

Verify that the quote characters in your script tag are correct. Some editors change plain quotes to curved (or “smart”) quotes when copying and pasting.

If you have a data-inputevents attribute on the script tag, verify that you are using double quotes inside the attribute value, and single quotes as outer quotes around the value. The value of data-inputevents must be valid JSON.

Script tag ID

If using a script tag only, the id must be glance-cobrowse. If using a meta tag and a script tag, the meta tag id should be glance-cobrowse and the script tag id should be cobrowsescript.

Plugin

If you have been using the Glance Cobrowse Plugin for demos or testing, make sure it is disabled. The plugin is not compatible with instrumented websites.

Only one script tag at the top-level and in each iframe

Verify that there is a script tag in the top level page. A script tag in an iframe is not sufficient.

Verify that you do not have multiple Cobrowse script tags in a single document (except for script tags in different iframes). This can cause SCRIPT_NOT_LOADED errors when attempting to start sessions from a chat window.

Content Security Policy

If the website has CSP headers, then they must be configured to allow cross domain ajax and websocket requests to Glance.

Ad Blockers

Ad blockers may interfere with Cobrowse functionality. If you have completed all of the required set up and Cobrowse is still not working, trying disabling any ad blockers that you have installed in your browser.

Load Time Delays

Customers may experience load time delays during the first session run on a newly deployed cserver without a primed cache. Delay times can vary based on session volume, the number of CSS files on a page, and the responsiveness of the customer’s website.

Built-in properties overridden

WebSocket, XMLHttpRequest

Some javascript libraries override the standard WebSocket or XMLHttpRequest implementations and can prevent Glance from connecting. Type window.WebSocket and window.XMLHttpRequest into the javascript console. “Native code” indicates that these objects have not been clobbered.

Third party libraries like prototype

Are you using a library like Prototype or mootools which might be modifying built in functionality such as adding Array.prototype.toJSON? As a test, enter the following in the js console: JSON.stringify([1,2,3])

You should get: "[1,2,3]" (with only one set of quotes)

Window.self

A common and perfectly legitimate coding construct is: var self = this;

This can be problematic if var is mistakenly omitted: self = this; // may overwrite Window.self Any code with this error will cause problems starting a Cobrowse session.

Using JSLint to detect inadvertent overrides

Running JSLint on your JavaScript can help detect inadvertent global variable declarations. One convenient way to do this is via the Notepad++ JSLint plugin. Look for errors such as Undeclared 'some variable name.

Visitor tries to start a session and gets an error “Unable to connect to Glance,” how can I fix this?

Did it work before? If so, did you just add a new CSS Selector to mask some page elements? Delete it and try again. If the Visitor can now start a session, the problem may be the syntax of that CSS Selector that is not supported by Glance today.

For example: #orderPayment\.cardNumber

This is a valid CSS selector. It includes the " \ " character to escape the “.” period, since the period should not be in an ID name. But this masking selector will cause the “unable to connect” error.

Each time the Visitor starts a session, the latest list of masking CSS Selectors are downloaded. Programmatically that “Start Cobrowse” process today is written in (old) ASP code, so it can share all of our existing load balancing and color selection logic. But ASP lacks built-in functions to generate JSON. The selectors are sent using JSON and JSON needs to escape CSS’s escape character. So double escaping might work: #orderPayment\\.cardNumber

This is not recommended, as this problem should be fixed in the future. In the meantime, try a different selector without the period, such as one of these (less precise) selectors:
input[id*=cardNumber]
input[id$=cardNumber]

Trouble Setting up Cross Domain Cobrowse?

Cross Domain Error: Untrusted Origin

If you are setting up cross domain Cobrowse, you must remember to enter the primary domain in the Glance backend in addition to the secondary domain that the visitor may be navigating to. If you don’t, you will see an error that says UNTRUSTED_ORIGIN.

Console Errors

404 error Getting the CustomSkin CSS file

Custom skin not yet created - this is harmless.

404 errors with CAM turned on

It is normal to get 404 errors on the visitor side when CAM (Cobrowse Asset Management) is turned on.

The cobrowse script works by creating a copy of the browser DOM and sending it to the agent. To support CAM, resource URLs in the DOM copy are converted to relative urls. On the agent side, these relative urls combine with a tag pointing to the Glance Cobrowse server. The resulting combined urls are used by the agent’s browser to access resources via the CServer.

The DOM copy created by the cobrowse script is not rendered on the visitor side, and is never added into the main DOM that is visible to the user. However most browsers (in anticipation that the DOM copy may be rendered at some point) prefetch the resources that are referenced in it. The visitor browser prefetches those relative urls, which when combined with the visitor’s page url or base tag, result in urls for non-existent pages.

UI issues

The stop button doesn’t work, what should I do?

Check to see if you have the injector enabled.

I am having visitor UI issues, what can I do?

If the button, border, agent cursor, or gestures do not appear correctly, there may be CSS on the website that conflicts with Glance’s button UI. Often this can be fixed by adding “Custom CSS” in the button customization tool. You can also build your own Cobrowse UI using Glance’s API that is compatible with your website.

How can I move the button to the left?

If you require the button to be on the left, follow these steps:

  1. Go to the Glance Client Admin Portal.
  2. Choose Settings.
  3. Select Manage your Cobrowse settings.
  4. Go to Button Customization.
  5. Click on Custom CSS.
  6. Copy and paste the following code:
#glance_cobrowse_btn {
  bottom: 0px;
  left : 12px;
  right : auto
}

7.Publish to production after confirming that it behaves as expected.

Trouble on the Agent Side?

Agent freezes on first view, how can I fix this?

If the agent freezes viewing the first screen, there are several possible causes. In all cases, the first step is to look at the agent side JavaScript console.

Some common scenarios include:

The viewer side javascript was not retrieved

The Network tab will show errors attempting to get the viewer side JS such as CobrowseViewer…M.js. Look at the http status code to see why the script can’t be accessed.

The browser can’t open a websocket connection

The console may show errors related to failure to open a websocket connection. There may be a proxy configuration that is blocking websockets. A good diagnostic is to test whether the same browser can connect from outside the corporate network.

There are console errors similar to Blocked a frame with origin "https://s1006.glance.net" from accessing a cross-origin frame.

  1. Navigate to chrome://flags or edge://flags.
    • Origin-keyed Agent Clusters must be set to Default.
  2. Navigate to chrome://policy or edge://policy.
    • Search for OriginAgentClusterDefaultEnabled within the Browser Policies. If it is enabled, remove it.
  3. On Edge, navigate to edge://settings/?search=security to check if the browser has Enhanced Security Mode enabled.
    • Disable Enhanced Security Mode if it is enabled.

I am seeing mixed content warnings in console, what should I do?

Console shows a message like this:

This content should also be served over HTTPS.

This happens when the Cobrowse viewer is in a secure (https) iframe (e.g. Salesforce integration, moxie…) and the visitor is on an insecure (http) page. The fix is to uncheck “Agent follows visitor protocol” on the backend Cobrowse settings page. Then the agent side stays https always, avoiding the mixed content. The downside is that sometimes CSS/images/fonts cannot be accessed by the agent over https.

A portion of the page is blank on the agent side, how can I fix this?

If iframe contents are not appearing on the agent side, verify that any iframes on different subdomains or protocols have their own script tag.

Hover states

If hover states do not show up on the agent side, contact Glance for custom tuning.

Dropdown boxes look funny or do not show up on the agent side

Native dropdown boxes on the visitor side can’t be rendered exactly on the agent side, because the agent may be using a different browser, and JavaScript on the agent side can’t control the opening and closing of dropdowns.

The agent side tries to copy any CSS that is applied on the visitor side for dropdown boxes to get them to look as similar as possible, but this is imperfect.

You may have to add CSS on the agent side to force the dropdowns to look a certain way. Contact Glance for custom tuning.

Fonts/icons are not rendering, what can I do?

If your site hosts fonts that are not accessible cross-origin, those fonts will not render on the agent side. To work around this, Glance can host the fonts. Send us the font files (.svg, .woff) and the corresponding font-family names used in the website CSS.

CSS/Styling is missing on the agent side, how can I fix this?

If the agent can join the session, but the page format, fonts, or colors are not correct, then CSS files may be missing on the agent side. The agent side console will usually show an error in this case.

CSS may be missing because:

  • The visitor side website is behind a firewall which the agent cannot access. The agent needs access to the website for CSS and other resources.
  • The website will only serve CSS if there is a login cookie. Usually if the agent logs into the visitor website before joining the Cobrowse session, the agent can access CSS and other resources.
  • The visitor page is http and the CSS is not available on the agent side over https. The fix is to uncheck Agent follows visitor protocol on the back end Cobrowse Settings page.
  • The website does not have a valid cert (e.g. a test site) and the visitor is viewing an https page. The agent browser may not want to retrieve the CSS from a server with an invalid cert.

How can I stop CSS animations replaying multiple times?

If a website includes CSS animations, those animations will replay on the agent side whenever there is a DOM change which involves re-adding the animated elements to the page. This can be annoying. It can be best to turn off certain animations by adding Agent CSS in the backend settings page.

Video is not showing properly for agent or visitor, what can I do?

If the video is not showing up properly for an agent or visitor, it may be caused from the video object not being made relative to the Glance button.

Follow these steps to make sure that it stays on top of the button so it will be visible:

  1. Go to Glance.net

  2. Log in with your Glance address and password.

  3. Choose Settings.

  4. Select Manage your Cobrowse settings.

  5. Under Button Customization, go to the Custom CSS section.

  6. Add the following Custom CSS in the group:

.video {
    position: relative !important;
}
#glance_ssnkey_box {
    position: relative;
}

The page scrolls on start session, how can I fix this?

If your start session link is at the bottom of a page, clicking the link to start a session may cause the page to scroll up to the top. To avoid this, follow one of these examples for your start session link:
<a href="javascript:;" data-glancebutton="startSession">Start Cobrowse</a>
<a href="#" onclick="javascript:return false;" data-glancebutton="startSession">Start Cobrowse</a>

Cobrowse fails for IE, what should I do?

Info

As of Jan 1, 2021 IE 11 will no longer be a supported browser for agents connecting to any type of Glance session, including Cobrowse, Screen Share, Agent Video, etc. A website visitor using IE 11 and attempting to start a cobrowse session on a web property configured to use a version above 4.15 will default to 4.15.

Cobrowse fails multiple times with zero session time, what should I do?

This is a fairly common problem with new deployments, whereby Cobrowse sessions are launched, the session tab pops up and immediately goes away. When you review the session logs, they are listed, but the duration is 0.

This is likely the result of the web site being hosted on a Public suffix domain, that does not allow JavaScript to launch. You will have to relocate your website to a private domain to get Cobrowse to work properly. https://publicsuffix.org/

JavaScript Console Errors

Blocked script execution

On the agent side it is normal to see “Blocked script execution” errors. The agent viewer sandboxes all “third party” iFrames because the agent side should never run JavaScript other than the Glance viewer scripts which apply updates that are sent by the visitor side.

Trouble Configuring for Salesforce?

You can find information on configuring for Salesforce in the Glance for Salesforce section. If you have further questions, contact Glance Support.

Button and Record Errors

The connect button does nothing when I click it, how can I fix this?

If the JavaScript was successfully added to all the necessary pages on the website and a session was started on Chrome for a visitor in the Salesforce Community on a Mozilla browser in Stage by entering the Glance code into the G4SF add-on in Salesforce. But, when the Connect button is selected, nothing happens even though pop-ups are enabled, go through the following steps to resolve the issue.

To resolve the issue, set up the Profile to have the appropriate permissions:

  1. Navigate to the console and enter Profiles in the Quick Find / Search text box.

  2. Select Manage Users.

  3. Go to Profiles and locate the profiles that are assigned to the users of the Glance for Salesforce application.

  4. Select the Profile Name and scroll down to the Apps section.

  5. Click on the Custom Permissions to open the Glance permissions.

  6. At the top of the Custom Permissions page, select the Edit button.

  7. Ensure that there is only one G4S.Glance for Salesforce _Enabled Custom Permissions_- either G4S.Glance for Salesforce or G4S.Glance for Salesforce - Panorama. Make sure that it coordinates with the appropriate configuration for the client.

Glance Cobrowse activity record fails to be created?

To make sure that the activity record does not fail to be created, configure IE to trust the https://*.glance.net domain.