Solvedzone.js IE11 - SecurityError zone.js (192,25)
✔️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:
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';
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.