Comments (2)
I have currently the same TypeError, but I'm not sure it has something to do with the use of setTimeout.
I came across this comment in the initEventReplay function saying we may encounter undefined reading 'ngContracts'.
If it is the case, therefore the const container will be undefined too and the error will be thrown on the invocation of getJsactionData
.
// TODO: Upstream this back into event-dispatch.
function getJsactionData(container) {
return container._ejsa;
}
const initEventReplay = (eventDelegation, injector) => {
const appId = injector.get(APP_ID);
// This is set in packages/platform-server/src/utils.ts
// Note: globalThis[CONTRACT_PROPERTY] may be undefined in case Event Replay feature
// is enabled, but there are no events configured in an application.
const container = globalThis[CONTRACT_PROPERTY]?.[appId];
const earlyJsactionData = getJsactionData(container);
...
The problem seems to be the bundle jsaction contract script not correctly inlined during the html generation, which might be the case while using the "old" browser builder instead of esbuild from what I saw
from angular.
Thanks for reporting this issue. I was able to reproduce it for cases when there are no events registered in an application, but Event Replay feature is enabled. I've created PR #56509 with the fix.
The problem seems to be the bundle jsaction contract script not correctly inlined during the html generation, which might be the case while using the "old" browser builder instead of esbuild from what I saw
@Fluccioni the mentioned PR would likely resolve that problem as well (there will be no JS exceptions), but we may consider adding some logic to detect those cases and add a warning. Could you please create a minimal repro (in a form of GitHub repository), so that we can perform further investigation to see if we can detect those cases?
from angular.
Related Issues (20)
- Issue with using @for built-in template syntax while removing dynamic form array elements HOT 4
- Issues using angular cdk drag and drop with angular form array HOT 2
- @for(ID of IDs; track ID) and NG0956 - provide a way to prevent warning when tracking by item is legit scenario HOT 4
- The reset method of FormControl is setting the value to null instead of setting it to the initial value. HOT 2
- Example images from the Housing Location Tutorial missing HOT 2
- signals (or function calls in the templates) in language service HOT 3
- Detached DOM nodes HOT 4
- The `@angular/localize API` link directs to a 404 HOT 4
- Link gets broken with space character in its end HOT 1
- solution HOT 1
- Missing documentation for global `ng` variable HOT 2
- Some examples not showing in router API docs page HOT 2
- Cannot run test with ChromeHeadless in Continuous Integration HOT 1
- Missing documentation for InjectionToken HOT 2
- Page Not Found 🙃 - List of pipes HOT 1
- Snapdragon X Elite Arm / Windows , No native build was found for platform=win32 arch=arm64 HOT 1
- angular.dev NgOptimizedImage docs not up-to-date HOT 1
- Support VSCode intellisense for `@Attribute` / `HostAttributeToken` usage. HOT 6
- Provide a option to print an error report in the browser if Angular failed to launch due to a JS error HOT 8
- Page not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.