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

'Promise' is undefined in Internet Explorer (IE 11)

Hi!

Trying to run a .NET Core 2.0 Web App with Syncfusion J2 Controls (Grid/Schedule etc.) and keep getting the following error only in Internet Explorer (IE 11):

"Unhandled exception at line 1, column 437301 in https://cdn.syncfusion.com/ej2/dist/ej2.min.js
0x800a1391 - JavaScript runtime error: 'Promise' is undefined"

The same app runs fine in Chrome and Edge.

Thanks

Sarosh

16 Replies

SU Sridurgha Uthayakumaran Syncfusion Team April 3, 2018 05:07 AM UTC

Hi Sarosh, 

We suspect that you haven’t referred the ES6 Promise polyfill script in your html page which cause this issue in IE11 browser. We suggest you to use ES6 Promise polyfill to overcome the error stated [‘'Promise' is undefined’] in IE11 browser.  
Kindly follow the below link for further details on IE11 Browser compatibility.  
Please let us know if you have any concerns.  
 
Regards, 
Sridurgha U 



SW Sarosh Wadia April 3, 2018 01:42 PM UTC

Hi!

The link simply tells you that you need "ES6 Promise" for IE11 but does not show how to do it!

Here is some code that I added into "_Layout.cshtml" near the bottom which seems to fix the issue.

....
 <script asp-fallback-test="window.Promise"
            asp-fallback-src="https://unpkg.com/promise-polyfill@6.0.2">
    </script>
    <script asp-fallback-test="window.fetch"
            asp-fallback-src="https://unpkg.com/whatwg-fetch@2.0.2">
    </script>

    <ejs-scripts></ejs-scripts>
    @RenderSection("Scripts", required: false)

.......

This may help someone with the same issues.




SU Sridurgha Uthayakumaran Syncfusion Team April 4, 2018 06:54 AM UTC

Hi Sarosh, 

Thanks for your update. 

We have already logged a Knowledge base documentation for IE 11 promise support and this will be refreshed within our Essential Studio Volume 2, 2018 release. 

Please let us know if you have any concerns. 

Regards, 
Sridurgha U 



WM William Miller July 11, 2018 09:00 PM UTC

I am receiving the same error due to using IE 11.

I am using Syncfusion.EJ2.MVC5.16.2.0.41 and Syncfusion.EJ2.JavaScript.16.2.0.41.  Do you have a fix for this yet?  I am not able to use other JavaScript libraries besides JQuery and what you put out, so the fix by Sarosh will not work for me.


Thanks!


SU Sridurgha Uthayakumaran Syncfusion Team July 12, 2018 11:31 AM UTC

Hi William, 

We suggest you to add ES6 Promise polyfill script in your Layout.cshtml page. Please find the below code snippet for further reference. 

<body> 
  <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> 
    @Scripts.Render("~/bundles/jquery") 
    @Scripts.Render("~/bundles/bootstrap") 
    @RenderSection("scripts", required: false) 
    @Html.EJS().ScriptManager() 
</body> 

For your convenience we have created a sample to render Grid component and also we have added ES6 Promise polyfill script in _Layout.cshtml page and the same can be referred from the below link. 

 
Moreover, we have separated our documentation site for ASP.NET Core and ASP.NET MVC. Please find the below documentation sites for further details. 


Please let us know if you require any further assistance on this. 

Regards, 
Sridurgha U  
 



KT Kenneth Tang March 26, 2019 02:39 PM UTC

Dear Sridurgha,

We are facing the same problem and thank for the info.

But our client's environment is a internal network and can't be access internet. we have try to download https://cdn.polyfill.io/v2/polyfill.min.js file from internet and paste it into the local path as below, but same error has been occur. we are using Syncfusion.EJ2.MVC5.16.4.054 please advance, thx.

<body>
   <script src="~/Scripts/polyfill.min.js"></script>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
    @Html.EJS().ScriptManager()
</body>

polyfill.min.js

/* Disable minification (remove `.min` from URL path) for more info */

(function (undefined) { }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});


KennethT


JD Jayakumar Duraisamy Syncfusion Team March 27, 2019 09:55 AM UTC

Hi Kenneth, 
 
We have analyzed your reported issue, but it is not reproduced from our end. 
 
We have created a sample, using syncfusion.EJ2.MVC5 16.4.0.54 NuGet package. Please revert us with this sample to replicate the reported issues 
 
 
Also, our Syncfusion components support IE11. Please refer our browser compatibility details as below, 
 
 
Please let us know, if you need further clarification on this. 
 
Regards, 
Jayakumar D 



PL Paolo Levati December 5, 2019 02:45 PM UTC

Hi Jayakumar ,
the error occur with Grid component. If you add a Grid in your sample the error "Promise is undefined" appear.
I have a ASP.Net Mvc project with last EJ 2 (17.3500.0.30) download from nuget .

thanks

Paolo


VR Vairamuthu Ramamoorthi Syncfusion Team December 6, 2019 09:57 AM UTC

Hi Paolo, 

A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it. It was a very common issue and it was not related to Syncfusion. IE 11 does not having support to handle promise function. If you add the following tag the JavaScript will execute without any errors.  


<head>   
     . . . . .   
    <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>   
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>   
</head>  




Regards, 
Vairamuthu R 



CB Chris Bentley December 9, 2019 09:58 PM UTC

Hi, I'm also have this problem with Ej2 Nuget version 17.3.  I have added the polyfill.min.js script, but am getting the following when using IE.  Chrome is working. This is in a new empty MVC5 application.  Thanks.

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

    <!-- Syncfusion Essential JS 2 Styles -->
    <link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/ej2/bootstrap.css" />

    <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

    <!-- Syncfusion Essential JS 2 Scripts -->
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
</head>



Uncaught (in promise) TypeError: Unable to get property 'querySelector' of undefined or null reference
   at e.prototype.emptyRow (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5881393)
   at e.prototype.renderEmptyRow (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5881321)
   at e.prototype.dataManagerFailure (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5885703)
   at Anonymous function (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5880140)
   at g (https://cdn.polyfill.io/v2/polyfill.min.js:3:33224)
   at s (https://cdn.polyfill.io/v2/polyfill.min.js:3:31742)
   at Anonymous function (https://cdn.polyfill.io/v2/polyfill.min.js:3:35486)
   at r (https://cdn.polyfill.io/v2/polyfill.min.js:3:31876)



VR Vairamuthu Ramamoorthi Syncfusion Team December 10, 2019 10:49 AM UTC

Hi Chris,  
  
We have analyzed your reported issue, but it is not reproduced from our end.  
  
We have created a sample, using syncfusion.EJ2.MVC5 17.3.30 NuGet package. Please revert us with this sample to replicate the reported issues  
  
 
Please let us know, if you need further clarification on this.  
  
Regards,  
Vairamuthu R 



CB Chris Bentley December 10, 2019 01:36 PM UTC

I've tried to find any difference in your application and mine, but mine will not show the grid in IE.  I'm attached the source code, along with this error message.

Uncaught (in promise) TypeError: Unable to get property 'querySelector' of undefined or null reference
   at e.prototype.emptyRow (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5881393)
   at e.prototype.renderEmptyRow (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5881321)
   at e.prototype.dataManagerFailure (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5885703)
   at Anonymous function (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:5880140)
   at g (https://cdn.polyfill.io/v2/polyfill.min.js:3:33224)
   at s (https://cdn.polyfill.io/v2/polyfill.min.js:3:31742)
   at Anonymous function (https://cdn.polyfill.io/v2/polyfill.min.js:3:35486)
   at r (https://cdn.polyfill.io/v2/polyfill.min.js:3:31876)


Attachment: Servicers.Web_20da040d.zip


VR Vairamuthu Ramamoorthi Syncfusion Team December 12, 2019 11:45 AM UTC

Hi Chris, 

Thanks for your patience. 

We have logged a bug report for the reported issue as “Script error throws in IE 11 while using auto generated columns”. Thank you for taking  time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our First Patch Release After Volume 4 Release which will be rolled by first week of  January 2020. 

Until then we appreciate your patience. 

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
  

Regards, 

Vairamuthu R 



CB Chris Bentley December 12, 2019 01:17 PM UTC

I am not able to access the bug in the feedback portal.  I get an access denied message.   




CB Chris Bentley December 12, 2019 10:00 PM UTC

Hello.  You can reproduce this problem by removing the column definitions from the grid. 

For example, this will cause the error:

@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.DataSource).Render()

This will work fine:

@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.DataSource).Columns(col =>
        {
            col.Field("Col1").HeaderText("Col1").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
            col.Field("Col2").HeaderText("Col2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
            col.Field("Col3").HeaderText("Col3").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
        }).Render()


TS Thavasianand Sankaranarayanan Syncfusion Team December 13, 2019 09:25 AM UTC

Hi Chris, 

Thanks for sharing the issue replication steps. 

We have already logged this as a bug at our end .It will be covered in the below bug task and  included as promised. 

Regarding the feedback we have changed this as public,  now you can track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 


Regards, 
Thavasianand S. 


Loader.
Up arrow icon