Exception "Can't find variable: FindApi at global code"

Fixed in

EPiServer.Find 13.4.2


Feb 08, 2021


Mar 23, 2021




Closed, Fixed and tested


Issue Description

The client is seeing the following exception.

Can't find variable: FindApi at global code

They also see this.

FindApi is not defined at <no_method>

See attached screenshots for more on these.

The first error appears to occur due to Safari browsers blocking the request.

There is a suggestion by Bealle in this post that the JS be adjusted.

"This is happening to us too, thousands of times per day.

if(FindApi) is not a safe way to check if FindApi exists in the global scope. A safe if(typeof FindApi === 'function') would have prevented all of these errors.

One reason this is happening is that several content blockers block https://dl.episerver.net/13.2.5/epi-util/find.js and similar URLs."

I have not been able to reproduce this.

Would this suggestion make sense here? I can convert to a story if that is best.

Customer Impact Statement

This fills up the logs and might prevent tracking from occurring. If a client is blocking the Find JS that would be expected and acceptable.

Environment Information
Steps to Reproduce

Not currently able to reproduce the issue.

Attachment List