locked
Unhandled Promise rejection error RRS feed

  • Question

  • Hi,

    Our SharePoint 2013 project makes use of Angular 2 framework to develop several modules which are all bundled using webpack.

    The files – polyfills.js and vendor.js are loaded in the master page of our site and the modules are loaded using the Content Editor Web Parts.

    The application is live since 2017 but recently there is an intermittent issue which we are facing. The error is highlighted below. Unhandled Promise rejection: Zone.js has detected that ZoneAwarePromise `(window. global).Promise` has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loadingzone.js.)

    Also, this issue is not observed in lower environments. It occurs only in the Prod. Here are some of my findings on browsing for the resolution - 1. Updating the zone.js module 2. Loading the zone.js module after core.js in polyfills.ts I have tried the above solutions but none of them seem to work in our case.

    Please post your inputs with the resolution if anyone has faced the same issue.

    Regards,

    Sudheer


    Thanks & Regards, Sudheer

    Monday, July 29, 2019 5:51 AM

Answers

  • Hi,

    Try to move import 'zone.js/dist/zone' from polyfills.ts to main.ts

    If you need further help, I would suggest you post in stackoverflow as this is angular related question.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by Dennis Guo Monday, August 5, 2019 8:25 AM
    • Marked as answer by Sudheer Madduru Tuesday, August 6, 2019 4:20 AM
    Tuesday, July 30, 2019 2:57 AM

All replies

  • Hi,

    Try to move import 'zone.js/dist/zone' from polyfills.ts to main.ts

    If you need further help, I would suggest you post in stackoverflow as this is angular related question.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by Dennis Guo Monday, August 5, 2019 8:25 AM
    • Marked as answer by Sudheer Madduru Tuesday, August 6, 2019 4:20 AM
    Tuesday, July 30, 2019 2:57 AM
  • Hi,

    I am checking to see how things are going there on this issue. Please let us know if you would like further assistance.

    You can mark the helpful post as answer to help other community members find the helpful information quickly.

    You can also share your own solution here and mark it as answer, so it may help others who has similar requirement.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, August 6, 2019 2:23 AM