We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ejsInterop error

Thread ID:





148831 Nov 5,2019 11:12 PM UTC Mar 19,2020 12:45 PM UTC Blazor 5
Tags: Dropdown List
Daniel Goodbody
Asked On November 5, 2019 11:12 PM UTC

Getting the following error when trying to use the Dropdown list example below:

Microsoft.JSInterop.JSException: Could not find 'ejsInterop' in 'window'.

Error: Could not find 'ejsInterop' in 'window'.
    at https://localhost:44363/_framework/blazor.server.js:8:30886
    at Array.forEach (<anonymous>)
    at p (https://localhost:44363/_framework/blazor.server.js:8:30847)
    at https://localhost:44363/_framework/blazor.server.js:8:31554
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:44363/_framework/blazor.server.js:8:31528)
    at https://localhost:44363/_framework/blazor.server.js:1:19202
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:44363/_framework/blazor.server.js:1:19173)
    at e.processIncomingData (https://localhost:44363/_framework/blazor.server.js:1:17165)
   at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
   at Syncfusion.EJ2.Blazor.BaseComponent.OnAfterRenderAsync(Boolean firstRender)
   at Syncfusion.EJ2.Blazor.DropDowns.EjsDropDownList`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

@using Syncfusion.EJ2.Blazor.DropDowns
<div class="col-lg-12 control-section">
    <div class="control_wrapper">
        <EjsDropDownList TValue="string" PopupHeight="230px" Index=2 Placeholder="Select a game" DataSource="@Games">
            <DropDownListFieldSettings Text="Text" Value="ID"></DropDownListFieldSettings>
    .control_wrapper {
        width: 350px;
        margin: 0 auto;
        padding-top: 70px;

Narayanasamy Panneer Selvam [Syncfusion]
Replied On November 6, 2019 06:06 AM UTC

Greetings from Syncfusion support.

We have validated your issue. This error may arise, if your application not having required resources. The reported error will get resolve, once after you referred ejs.interop.js file in ~/Pages/_Host.html.
Make sure that you have included the necessary resources to render Syncfusion Blazor component.

Getting started: 

However, we will refresh the getting started UG documentation with this information. Documentation changes will get refresh in upcoming weekly patch release, which is scheduled on first mid of November 2019. We appreciate your patience until then.

Narayanasamy P. 

Ashwani Gusain
Replied On January 8, 2020 05:17 PM UTC

and how to refer ejs.interop.js Host file?

Sureshkumar P [Syncfusion]
Replied On January 9, 2020 12:54 PM UTC

Hi Daniel, 
As per our previous update. Please follow the getting started documentation link to render the Syncfusion component. 
We have created a sample based on your requirement. please refer the sample here: https://www.syncfusion.com/downloads/support/forum/148831/ze/DropDownlist-290734837  
Sureshkumar P 

Kevin Dahl
Replied On March 19, 2020 12:24 AM UTC

I'm trying syncfusion out with the autocomplete control in a Blazor server application.

I had to include ejs.interop-ie.min.js (which is what is in the DatePicker example) to get rid of the "Could not find 'ejsInterop' in 'window'".

Now I get the the following error:

SourceMaps.getMapForGeneratedPath: exception while processing path: https://cdn.syncfusion.com/ej2/17.4.55/dist/ej2.min.js, sourcemap: ej2.min.js.map
SyntaxError: Unexpected token  in JSON at position 0
    at JSON.parse (<anonymous>)
    at new SourceMap (C:\ProgramData\Microsoft\VisualStudio\ChromeAdapter\63fcb39b\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMap.js:19:25)
    at sourceMapContentsP.then.contents (C:\ProgramData\Microsoft\VisualStudio\ChromeAdapter\63fcb39b\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapFactory.js:58:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I also downloaded and tried out the datepicker sample application. Loaded it and got the following errors:
Verbose logs are written to:

Microsoft.Hosting.Lifetime: Information: Content root path: K:\Research\Blazor\DropDownList\DatePicker\DatePicker
A cookie associated with a cross-site resource at https://github.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032. [https://localhost:44324/]
SourceMaps.getMapForGeneratedPath: exception while processing path: https://cdn.syncfusion.com/ej2/17.4.42/dist/ej2.min.js, sourcemap: ej2.min.js.map
SyntaxError: Unexpected token  in JSON at position 0
    at JSON.parse (<anonymous>)
    at new SourceMap (C:\ProgramData\Microsoft\VisualStudio\ChromeAdapter\63fcb39b\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMap.js:19:25)
    at sourceMapContentsP.then.contents (C:\ProgramData\Microsoft\VisualStudio\ChromeAdapter\63fcb39b\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapFactory.js:58:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[2020-03-19T00:20:55.532Z] Information: Normalizing '_blazor' to 'https://localhost:44324/_blazor'.
[2020-03-19T00:20:55.783Z] Information: WebSocket connected to wss://localhost:44324/_blazor?id=joU2G2p7mycc9CFFguvTmQ.

It appears to me, there is still a problem with this stuff or it's a permissions issue someplace.

Sureshkumar P [Syncfusion]
Replied On March 19, 2020 12:45 PM UTC

Hi Kevin, 
Greetings from Syncfusion support. 
Based on your shared information with error details, we suspect that you have referred the ejs.interop file before the  ej2.min.js file. That is the reason for this issue. So, we suggest you to refer the ejs.interop file after referred the ej2.min.js file to resolve your issue. 
Sureshkumar P 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon