Skip to content

appInsightsService.queue set to undefined  #75

@mostafa-raafat

Description

@mostafa-raafat

only first time i'm in home no error and session is set then whenever i back to home again
i got Uncaught TypeError: Cannot read property 'push' of undefined

` ngOnInit(): void {

this.eventManager.navigate.subscribe((path: any) => {
  if (path.url === '/') {
    this.startSession();
  }
});

}`

` private startSession(): void {

this.appInsightsService.queue.push(() => {
  this.appInsightsService.context.addTelemetryInitializer((envelope: Microsoft.ApplicationInsights.IEnvelope) => {
    envelope.tags['ai.session.id'] = uuid();
    envelope.tags['ai.device.id'] = this.env.store.unitName;
  });
});

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions