Cobrowse Troubleshooting Guide

Session issues

Session won't run and sessions drop on certain pages

If you've added the Cobrowse script tag to your pages and are still unable to run a session, please double check the following:

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.  

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

Additionally, if it only happens in IE and you are able to cobrowse through other browsers, check that the meta tag in the header referencing compatibility does not list IE10 or before: <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

To check this, right click in the Internet Explorer browser and select View Source. On the top of the web page code, you will find a number of different meta tags, one will reference the http-equiv and the content compatibility settings.

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

Verify that the script tag has id="cobrowsescript" or "glance-cobrowse."

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. See Content Security Policy for more details.

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.

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.

The browser can't create a websocket

In the js console, while the viewer is open, type window.WebSocket. If you get "undefined" then there is a problem with websocket support in the browser.

Possible causes in IE are:

NOTE: The feature control registry settings can also be set here: HKLM SOFTWARE\Policies\Microsoft\Internet Explorer\Main\FeatureControl. You can also search the registry for FEATURE_WEBSOCKET.

Some websocket features are controlled by group policy settings and updating both the Internet settings and the registry can still result in a dropped websocket connection. To isolate this as the culprit, edit both the Internet Settings (easiest way is to open Internet Explorer, click the cogwheel, and click on Internet Options) and the registry. Saving the registry edit will not stick. Restarting the machine will result in the registry setting flipping back to disallowing websockets. The client must work internally with the IT group to allow secure websockets to specified servers (.glance.net, .s3.amazonaws.com) in the content security policy of their web properties and allow secure websockets from their machines.

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.

The dropdown boxes look funny on the agent side, how can I change this?

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.  

To do this:

  1. Identify the hover states that are causing the issue:

    • This can be done by inspecting the element and invoking the hover state in the developer tools.
    • Request the page CSS from the client.
    • Download the .css resource from the source in developer tools.
  2. Navigate to Glance Admin and choose Cobrowse Settings. https://www.glance.net/admin/accountman/GroupCobrowseMasking.aspx?groupid=[GROUPID]

  3. Open the CSS parser tool: https://www.myglance.net/cobrowse/test/CSSParser.aspx Make sure you're going to myglance.net and not glance.net

  4. Copy the relevant CSS into the CSS parser field.

  5. Copy the Hoverables' code in the CSS parser tool over to the Hoverables sections in the Cobrowse Settings.

  6. Copy the Agent CSS over to a new document and save it. Upload that document as a resource in the Cobrowse Settings.

  7. In Cobrowse Settings (Glance Admin side), add the Agent CSS as a script.

    • Example: @import url("https://www.glancecdn.net/cobrowse/styles/19989/agent_css_hover.css");

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 {style="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?

NOTE: This does not apply to Edge, just IE.

If Cobrowse fails for IE, look at if the page sets the compatibility mode to a version older than IE9. Or if you have a policy to view the page in compatibility view, open the JavaScript console and type document.documentMode. If it returns a number less than 9, then Cobrowse won't work. If Cobrowse failures only happen in IE and you are able to Cobrowse through other browsers, check that the meta tag in the header referencing compatibility does not list IE10 or before:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

To check this:

  1. Right click in the Internet Explorer browser and select View Source.

  2. In the top of the web page code, you will find a number of different meta tags, one will reference the http-equiv and the content compatibility settings.

  3. If visitor side console shows Invalid range in character set, then the JavaScript when pulled from the IE cache may be getting parsed before the charset attribute on the script tag is set. If dynamically adding the Cobrowse script tag to the page, add the src= attribute last. IE seems to start parsing the script as soon as the src attribute is set.

A pop-up blocker is disallowing a Cobrowse session, how can I fix this?

There have been issues with a pop-up blocker disallowing the Cobrowse session from starting regardless of whether it is enabled or not within the browser. Below are some steps to take to solve the issues:

Reset Internet Explorer settings

To reset IE settings:

  1. Close all Internet Explorer windows.

  2. Select the Tools button.

  3. Go to Internet options.

  4. Select the Advanced tab, and choose Reset.

  5. In the Reset Internet Explorer Settings dialog box, choose Reset.

  6. When Internet Explorer finishes applying default settings, select Close, and then click OK.

  7. Restart your PC to apply changes.

Turn InPrivate filtering off

Turn InPrivate filtering off with the Icon to the LEFT of the + 100% in bottom right corner.

Configure the pop-up blocker by using the registry key

To configure the full pop-up blocker:

  1. Click Start, and select Run.

  2. Type regedit.

  3. Click OK.

  4. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBOC_POPUPMANAGEMENT

  5. Double-click Iexplore.exe.

  6. To turn off the full Pop-up Blocker, in the Value data box, type 0, and then click OK.

  7. Or to turn on the full Pop-up Blocker, in the Value data box, type 1, and then click OK.

Configure pop-up blocker per zone

To configure pop-up blocker per zone (each number under either of the following registry subkeys represents the different zone):

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
  • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zone
  • For 1809 under each zone, a data value of 3 means that Pop-up Blocker is disabled. A data value of 0 means Pop-up Blocker is enabled.

Configure the pop-up blocker by using group policy

To configure the full pop-up blocker:

  1. Click Start, and select Run.

  2. Type gpedit.msc.

  3. Click OK.

  4. Expand the:

    • User Configuration
    • Administrative Templates
    • Windows Components
    • Internet Explorer
  5. Set turn off popup management according to your desired settings. You have to update policies or restart the computer to apply changes.

To configure Pop-up Blocker per zone:

  1. Click Start and select Run.

  2. Type gpedit.msc.

  3. Click OK.

  4. Expand the:

    • User Configuration
    • Administrative Templates
    • Windows Components
    • Internet Explorer
    • Internet Control Panel
    • Security Page
  5. Select a desired zone.

  6. Set the User Pop-up Blocker according to your desired settings.

  7. Update policies or restart the computer to apply changes.

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.

By continuing to use the site, you agree to the use of cookies. Learn More