Skip to content
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

Critical crash bug "typeError: intl is not available" #15687

Closed
almogyehuda opened this issue Apr 2, 2019 · 15 comments · Fixed by #15693
Closed

Critical crash bug "typeError: intl is not available" #15687

almogyehuda opened this issue Apr 2, 2019 · 15 comments · Fixed by #15693
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@almogyehuda
Copy link

What is the expected behavior?

Have a fallback for Intl while is not available

What is the current behavior?

Unexpectedly, all the app crashed and "typeError: intl is not available" error is presented at console.
Only IE-11

What are the steps to reproduce?

I Don't know if we can repro this, but I'll give the background story as far as it can help.
While changing the localization -

App crashed on this line:
const hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);
from this file:
https://github.com/angular/material2/blob/master/src/cdk/platform/platform.ts

with this error: "typeError: intl is not available".
This crash won't let the app start, and there is no fallback.
We manage to fix it while editing the vendor.**.js file, and adding try-catch
block for this line.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 7.2.1
CDK: 7.2.1
TypeScript: 3.2.2
Browsers: IE 11

Is there anything else we should know?

Critical bug, should provide hotfix.

@HawkSoftDevTeam
Copy link

We have been experiencing this as well, same fix - editing the vendor.js and inserting a try/catch.

Angular: 5.2.9
CDK: 5.2.5
TypeScript: 2.7.2
Browsers: IE 11

@almogohayon1
Copy link

@HawkSoftDevTeam Do you know the root cause?

@HawkSoftDevTeam
Copy link

HawkSoftDevTeam commented Apr 2, 2019

@almogyehuda Not all instances of IE11 display this problem. It has gotten worse in the last month or two however. We are currently trying to find a commonality between instances of the problem. We've observed the issue on a subset of Windows 2012, Windows 8.1 boxes.

Currently suspecting this KB, and testing:
https://support.microsoft.com/en-us/help/4483187/cumulative-security-update-for-internet-explorer-december-19-2018

@HawkSoftDevTeam
Copy link

Can confirm installing a language pack induces the error state on a previously working machine. Reinstalling the KB does not fix the error.

@almogohayon1
Copy link

We see that issue started on our end after the following updates were installed, testing.
https://support.microsoft.com/en-us/help/4489881/windows-8-1-update-kb4489881

crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 2, 2019
…dows

On some versions of Windows merely trying to access the `Intl` object can cause IE to throw an error, if the default `Map` object has been overwritten (e.g. when polyfilling). These changes add a `try/catch` around our usages so that users' apps don't crash completely on load.

Fixes angular#15687.
@crisbeto crisbeto self-assigned this Apr 2, 2019
@crisbeto crisbeto added has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Apr 2, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 2, 2019
…dows

On some versions of Windows merely trying to access the `Intl` object can cause IE to throw an error, if the default `Map` object has been overwritten (e.g. when polyfilling). These changes add a `try/catch` around our usages so that users' apps don't crash completely on load.

Fixes angular#15687.
@almogohayon1
Copy link

We can now confirm that the issue (Angular App not being rendered) after kb4489881 installed on win8.1/winserver2012 + IE11.
https://support.microsoft.com/en-us/help/4489881/windows-8-1-update-kb4489881
@almogyehuda @HawkSoftDevTeam @thealmogg @crisbeto

@crisbeto
Copy link
Member

crisbeto commented Apr 2, 2019

I've submitted a fix at #15693, but it would be nice to get it double-checked against the particular Windows version before it goes in.

@almogohayon1
Copy link

Thanks much @crisbeto! We are double checking now

@almogohayon1
Copy link

@crisbeto
We did double check install/uninstall and the update is the root cause for that problem

@crisbeto
Copy link
Member

crisbeto commented Apr 2, 2019

Sorry, what I meant is to check whether the changes from #15693 would fix the issue.

@thealmogg
Copy link

Sorry, what I meant is to check whether the changes from #15693 would fix the issue.

@crisbeto Yes,
We validated and that's the proper fix.

mmalerba pushed a commit that referenced this issue Apr 3, 2019
…dows

On some versions of Windows merely trying to access the `Intl` object can cause IE to throw an error, if the default `Map` object has been overwritten (e.g. when polyfilling). These changes add a `try/catch` around our usages so that users' apps don't crash completely on load.

Fixes #15687.
mmalerba pushed a commit that referenced this issue Apr 3, 2019
…dows (#15693)

On some versions of Windows merely trying to access the `Intl` object can cause IE to throw an error, if the default `Map` object has been overwritten (e.g. when polyfilling). These changes add a `try/catch` around our usages so that users' apps don't crash completely on load.

Fixes #15687.
@almogohayon1
Copy link

@mmalerba Thanks much!
Any idea when it will be tagged? We're currently not functioning in production envs effecting more than 20k users daily.
Sorry for the rush but we need it ASAP.

@almogyehuda
Copy link
Author

@crisbeto Any new with tag for this fix? We're depend on this commit right now...

@mmalerba
Copy link
Contributor

mmalerba commented Apr 4, 2019

this will go out with our next release on Monday

jelbourn pushed a commit that referenced this issue Apr 4, 2019
…dows (#15693)

On some versions of Windows merely trying to access the `Intl` object can cause IE to throw an error, if the default `Map` object has been overwritten (e.g. when polyfilling). These changes add a `try/catch` around our usages so that users' apps don't crash completely on load.

Fixes #15687.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants