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:

image

And after:

image

This is a drill down into the sources:

image

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, https://msdn.microsoft.com/ja-jp/library/ee330736%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396.
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...

image

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:

49
zone.js Runtime Error Zone already loaded
I had the same issue after following the tutorial from the docs: https://github.com/angular/angularf...
17
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...
12
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 ...
8
zone.js Error: Missing: SyncTestZoneSpec
@AbnerCrivellari the loading order is not correct you need to load proxy and sync-test before jasmin...