Gravatar for bberriz@lifeextension.com

Question by Ben, Sep 9, 2015 10:15 AM

Oops! Error in IE9

We are unable to do any searches in IE9…

{lib: "0.9.1146.25", product: "0.0.0.0", supportedApiVersion: 2}

SCRIPT5007: Unable to get value of the property 'apiVersion': object is null or undefined
CoveoJsSearch.WithDependencies.min.js, line 37 character 18326

This happens on list[3] in the for loop for the fire function.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Sep 9, 2015 10:39 AM

Are you using the Coveo Search API REST endpoint or the old Coveo .Net Front-End 12 REST endpoint?

Gravatar for bberriz@lifeextension.com

Comment by Ben, Sep 9, 2015 10:42 AM

Search API Version 8.0.720 CES Version 7.0.7711

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Sep 9, 2015 10:57 AM

Can you inspect the search network request response in the IE9 developer tools or Fiddler? I suspect that the Search API returns an error that is not handled correctly by the Coveo JavaScript Search Framework.

Gravatar for bberriz@lifeextension.com

Comment by Ben, Sep 9, 2015 11:38 AM

I noticed an issue with Access-Control-Allow-Origin header and enabling CORS fixes the issue. The problem is, the origin is an exact match of the current domain and this issue only happens in IE9. (Haven't tested 8 since we aren't supporting it.) We would like to find a way around this without enabling CORS.

Gravatar for bberriz@lifeextension.com

Comment by Ben, Sep 10, 2015 10:43 AM

I've opened a case with support for this issue.

1 Reply
Gravatar for bberriz@lifeextension.com

Answer by Ben, Sep 14, 2015 10:25 AM

The only way we were able to get around the issue we experienced in IE9 was to add the following to our web.config:

<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="http://ourdomain.com" />
  </customHeaders>
</httpProtocol>
Ask a question