question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise

See original GitHub issue

I have imported FormBuilder in Angular 4 project and using as a wrapper. I’m able to generate the form template, but the having issue with trying to render the form. Adding https://formbuilder.online/assets/js/form-render.min.js to angular-cli throws following error.

VM405:6 Unhandled promise rejection Error: 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 loading zone.js.) at Function.Zone.assertZonePatched (zone.js:39) [<root>] at new NgZone (core.es5.js:3973) [<root>] at PlatformRef_._bootstrapModuleFactoryWithZone (core.es5.js:4767) [<root>] at :4200/vendor.bundle.js:5417:59 [<root>] at eval (eval at webpackJsonp.53.module.exports (scripts.bundle.js:1), <anonymous>:6:142326) [<root>] at eval (eval at webpackJsonp.53.module.exports (scripts.bundle.js:1), <anonymous>:6:142435) [<root>] at MutationObserver.s (eval at webpackJsonp.53.module.exports (scripts.bundle.js:1), <anonymous>:6:81210) [<root>] at Zone.runGuarded (zone.js:138) [<root> => <root>] at MutationObserver.<anonymous> (zone.js:116) [<root>]

Code ngAfterViewInit() { const formData = this.template; const formRenderOpts = { formData, dataType: 'json' }; const fbEditor = document.getElementById('emp-form'); this.form = $(fbEditor).formRender(formRenderOpts); }

Thanks in advance, Aniket

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
KhaledSMQcommented, Nov 4, 2018

by the way, in the website https://formbuilder.readthedocs.io/en/latest/getting-started/

please update the document

  <script src="http://formbuilder.online/assets/js/form-builder.min.js"></script>

to use https since chrome and other browsers didn’t allow mixed content if you are trying to load http and https

<!DOCTYPE html>
<html>
<head>
    <title>Example formBuilder</title>
</head>
<body>
  <div id="fb-editor"></div>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
  <script src="https://formbuilder.online/assets/js/form-builder.min.js"></script>
  <script>
  jQuery(function($) {
    $(document.getElementById('fb-editor')).formBuilder();
  });
  </script>
</body>
</html>
0reactions
kevinchappellcommented, Nov 4, 2018

oh good, thanks for letting me know. i’ll change it now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Zone.js has detected that ZoneAwarePromise `(window| ...
Unhandled Promise rejection : Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten. Most likely cause is that a Promise ...
Read more >
Unhandled promise rejection: Zone.js has detected that ...
It worked for me when I updated my zone.js package to the latest version by running npm install zone.js@latest --save .
Read more >
[ANGULAR] Error: Zone.js has detected that ...
Error : "Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten. Most likely cause is that a Promise ...
Read more >
Unhandled Promise rejection error - MSDN - Microsoft
Unhandled Promise rejection: Zone.js has detected that ZoneAwarePromise `(window. global).Promise` has been overwritten. Most likely cause is ...
Read more >
Error: Zone.js has detected that ZoneAwarePromise (window
Unhandled Promise rejection : Template parse errors: 'cronometro' is not a known element: 1. If 'cronometro' is an Angular component, then verify that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found