-
Notifications
You must be signed in to change notification settings - Fork 25.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] IE11 -> Can't execute code from a freed script #31723
Comments
@lifaon74 , could you provide a reproduce sample ?
to see the result. |
I took the example from https://github.com/mgechev/angular-seed , and updated to angular 5 and zone.js 0.8.18. I added you code and this worked ! Do you have detailed informations of what does this module (https://github.com/angular/zone.js/blob/master/MODULE.md) ? And idea why does it works on chrome but not on IE ? Thanks to you. EDIT 1 : the error is in zone.js inside |
@lifaon74 , glad to help, and |
Happening to me in edge also. Using the latest cli 1.5.4 |
@lifaon74 While analyzing the migration of AngularJS to Angular 5 we came across the same problem you mentioned here with zone.js 0.8.18 in IE11. Downgrading it to 0.8.12 does not throw the exception anymore. Thank you for mentioning this workaround. |
@ganeshkbhat, @falcoprescher , could you guys try to add <script>
__Zone_enable_cross_context_check = true;
</script> in index.html before loading |
@JiaLiPassion Setting this flag works which you suggested on the 20th October 2017. |
@falcoprescher , this is a fix and it should be better documented. I will add document and better setting method later. |
@JiaLiPassion Thank you for the information. I am also considering disabling this flag in production mode via our webpack configuration. webpack.config.js
app.base.ts
app.globals.ts
|
@falcoprescher , thank you for the configuration idea! |
How can that be configured in an Angular CLI generated project? |
Also having this problem in IE11, how to configure this in angular cli? |
@fuerst, @ciesielskico, you can just add the following line in (window as any).__Zone_enable_cross_context_check = true;
import 'zone.js/dist/zone'; // Included with Angular CLI. |
The code above produces a compiler error for me:
I feel like I am missing something here... |
@shcallaway , oh, sorry, please modify it to (window as any).__Zone_enable_cross_context_check = true;
import 'zone.js/dist/zone'; // Included with Angular CLI. |
I'm seeing this intermittently even after adding the fix mentioned above. I've pushed a sample repro at kevinkuszyk/angular-ie-freed-script-error which shows both this and #1001. |
Hi @kevinkuszyk, can you try to set the property not in the polyfills file but directly in the index.html file? In my project when I set it in the index.html it is not reproducible but when it is set in the polyfills it doesn't take effect. |
@danail-vasilev , 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. \HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER I just modify to 50, and the error gone. |
Thanks @danail-vasilev, putting the fix in the |
Hi all, The fixes I see above always set the value __Zone_enable_cross_context_check to true for kind of browser. I think it should only do it for Internet Explorer, no? Jochen |
@jochenhebbrecht , the So if you have the specified issue, I may be able to help you to see whether the |
Hi @JiaLiPassion , Thanks for your very fast feedback! :-) Jochen |
This is what I was wondering also - could this bug report be interpreted as a feature request, that Zone "just work" across browsers (including IE)? |
@jochenhebbrecht , because this |
@JiaLiPassion what do you mean with: it will have impact on IE/Edge developer tools? It seems to be working fine when put to true? The developer tools still work? |
@jochenhebbrecht , yes, everything will work if you set it to And the reason don't want to set it to /*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true; you can open the comment when you in development mode and comment it when you want to build in production mode. |
Thanks @JiaLiPassion ! |
Thanks so much @JiaLiPassion Added only for IE and Edge using the below in pollyfills.ts and it works a charm
|
I seem to get this error in IE11 while dev tools are open, regardless of whether or not JiaLiPassion's fix is applied. Closing dev tools makes the web app load again....... gotta love IE |
Has this been documented?
|
Try to specify the version of IE in
|
<script>
In pollyfills.ts, uncommented the following line (window as any).__Zone_enable_cross_context_check = true;
could you help me to resolve this issue? Thanks in advance. |
@Deepakm1051, please provide a reproduce repo, thanks. |
@JiaLiPassion we found this issue bcoz of window.addEventListener(). window.addEventListener("storage", checkTabs); function checkTabs(ev) { We have a requirement like
Commenting the code does not give any problem |
In Angular 8, the polyfills.ts file specifically explains to create a new file in the same directory as polyfills.ts and add the zone checks in there. Then import it to the polyfills.ts file before zone.js.
*/` |
I couldn't find such a registry entry for Latest IE on Windows 10 |
Same Issue here |
Closing this ticket, since the reported problem was only present in IE11 and Angular no longer supports IE. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Context:
I tried to update from zone 0.8.4 (current official angular 5 tutorials version) to 0.8.18, and get at some point with IE 11 the following error:
Can't execute code from a freed script
. This is a really imprecise error, that I didn't manage to find the origin but is due for sure from zone.js.EDIT: after testing => appear from 0.8.12 (working) to 0.8.13 (no more working on IE 11)
The text was updated successfully, but these errors were encountered: