Gravatar for adoprog@gmail.com

Question by adoprog, Feb 2, 2017 10:51 AM

Error "Assertion failed" on clean installation

I'm getting the error below on clean install of Sitecore 8.2 and the latest 4.0 Coveo for Sitecore. I've just installed everything and created a new search page (tried both Forms and MVC, same error).

The same config works on another server, and there are no server-side errors in logs, so I'm a bit lost.

Logger.ts:94Array[4]0: "ERROR"1: "Assert"2: "Assertion Failed!"3: "Value should not be null or undefined"length: 4__proto__: Array[0]
Assert.ts:11console.trace
t.failureHandler @ Assert.ts:11
t.fail @ Assert.ts:22
t.check @ Assert.ts:27
t.exists @ Assert.ts:48
t @ Dom.ts:28
i @ Dom.ts:740
t @ CoveoForSitecoreBase.ts:19
i @ CoveoForSitecore.ts:25
Coveo.initCoveoForSitecore @ CoveoForSitecore.JQuery.ts:7
undefined.Coveo.$.undefined.Coveo.$.fn.Coveo.$.fn.coveoForSitecore @ CoveoForSitecore.JQuery.ts:23
(anonymous) @ search:222
f @ CoveoJsSearch.Dependencies.js:1037
fireWith @ CoveoJsSearch.Dependencies.js:1148
ready @ CoveoJsSearch.Dependencies.js:433
wt @ CoveoJsSearch.Dependencies.js:103
Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Feb 2, 2017 11:46 AM

Could you provide us your code that throws this error?

Gravatar for adoprog@gmail.com

Comment by adoprog, Feb 2, 2017 12:11 PM

There is no my / custom code, it's a standard Coveo page created from "Coveo Search Page" template.

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Feb 2, 2017 1:31 PM

I have tried out an OOTB search page with the January package, and it is working as expected. Is there anything else included in the page? Any custom server-side code that adds scripts?

You could also try to unpack the package and replace the Coveo/js folder with the ones from the package, just in case it was not installed properly.

Gravatar for adoprog@gmail.com

Comment by adoprog, Feb 2, 2017 1:41 PM

Nope, it's a standard search page from the freshly installed module.

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Feb 2, 2017 1:48 PM

Could you compare files on one server that is working and the other that is not working?

There is most certainly a difference between the two, and finding that difference is key to solving your problem :)

Some files to check for: CoveoJsSearch.WithDependencies.min.js, CoveoForSitecore.min.js.

Since both MVC and WebForms have the same problem, it should be in the JavaScript files.

Gravatar for adoprog@gmail.com

Comment by adoprog, Feb 2, 2017 1:50 PM

I've tried reinstalling the module. Maybe it's a configuration error? But then why it is client-side only? Diagnostics page shows all is good.

1 Reply
Gravatar for flguillemette@coveo.com

Answer by François Lachance-Guillemette, Feb 2, 2017 1:56 PM

I have the exact same error when I remove the "Unique identifier" field from the properties of the Coveo Search component. Could you check if it was removed for some reason? The default template has "search" defined there.

Ask a question