Solvedzone.js IE11 - SecurityError zone.js (192,25)

I'm seeing the following error intermittently both before and after applying the fix for the Can't execute code from a freed script error (#933).

Here is an example of before:


And after:


This is a drill down into the sources:


I've pushed a sample repro at kevinkuszyk/angular-ie-freed-script-error. IE may not display the error the first time the app is loaded, but refreshing a few times is usually enough to trigger it.

14 Answers

✔️Accepted Answer

@kevinkuszyk , I think I may find the possible reason, when run ng serve, there will be websocket to connect angular web app with angular dev server, and every time refresh IE page, there will be a new web socket was created.

and in IE, the maximum websocket connections are 6 by default,
so error occurs, you can change the number by modify the registry.

\HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER

and add a key, iexplore.exe(REG_DWORD) modify the value to 2~128.

I just modify to 50, and the error gone.

Other Answers:

same here...


FWIW, I added the following to my polyfills.ts and it seemed to fix the issue

import 'core-js/es7/object';
import 'core-js/es7/array';

@todthomson , you can search HKEY_LOCAL_MACHINE , if not exists either, you need to created those keys yourself.

issue resolved after adding below in polyfills.ts file:
import 'core-js/es7/object';
import 'core-js/es7/array';

Related Issues:

zone.js Runtime Error Zone already loaded
I had the same issue after following the tutorial from the docs:
zone.js IE11 - SecurityError zone.js (192,25)
@kevinkuszyk I think I may find the possible reason when run ng serve there will be websocket to con...
zone.js 'Uncaught TypeError: Cannot set property stack of [object Object] which has only a getter' with Angular
You can work around this by changing line 135 in node_modules/zone.js/dist/long-stack-trace-zone.js ...
zone.js Error: Missing: SyncTestZoneSpec
@AbnerCrivellari the loading order is not correct you need to load proxy and sync-test before jasmin...