question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LOCALE_ID is being set before APP_INITIALIZER runs

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/core.

Is this a regression?

Yes, the previous version in which this bug was not present was: 7.2.15

Description

Angular is trying to set the LOCALE_ID before the APP_INITIALIZER runs to set the runtime i18n value for Ivy. This does not allow the application to fetch the locale from a backend. This is happening without Ivy mode activated.

The screenshot below is from file: node_modules/@angular/core/fesm2015/core.js.

Captura de pantalla de 2019-07-09 13-48-44

🌍 Your Environment

Angular Version:

Angular CLI: 8.1.0
Node: 10.16.0
OS: linux x64
Angular: 8.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.0
@angular-devkit/build-angular     0.801.0
@angular-devkit/build-optimizer   0.801.0
@angular-devkit/build-webpack     0.801.0
@angular-devkit/core              8.1.0
@angular-devkit/schematics        8.1.0
@angular/cdk                      8.0.2
@angular/material                 8.0.2
@ngtools/webpack                  8.1.0
@schematics/angular               8.1.0
@schematics/update                0.801.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
amiramcommented, Jul 31, 2019

@botondus Looks like it is working well on 8.2.0

4reactions
ocombecommented, Jul 16, 2019

oh I see ! Thanks I’ll fix that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular (v5) service is getting constructed before ...
I have created a fork where I added delay to the observable and you can clearly see that the application waits for the...
Read more >
How To Use APP_INITIALIZER - Medium
This gives us an opportunity to hook into the initialization process and run some of our own logic before the app actually loads....
Read more >
Angular How to use APP_INITIALIZER - TekTutorialsHub
As mentioned earlier, the APP_INITIALIZER is run when the application is initialized. The Angular suspends the app initialization until all the functions ...
Read more >
Loading App Configuration in the APP_INITIALIZER
The app runs perfectly in my local development environment. ... some services were being loaded before the APP_INITIALIZER is done running.
Read more >
How does APP_INITIALIZER work? So what do you need to ...
When we develop an application designed to run on multiple ... and an Angular's app will not be initialized until it is being...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found