Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

276
Visualizações
Error after Injecting a service to another service : Uncaught TypeError: Cannot read properties of undefined (reading '<Class>')

I'm getting an error after injecting the AnalyticsService from the logs another module is being affected. What could lead to the error?

import { AnalyticsService } from '@s4y/elements/event-log-control';
import { catchError } from 'rxjs/operators';
import { Injectable } from '@angular/core';

import { AngularFireFunctions } from '@angular/fire/compat/functions';

/**
 * Interface with the firebase backend.
 */
@Injectable({ providedIn: 'root' })
export class BackendService
{
  constructor(private _fns: AngularFireFunctions, private _log: AnalyticsService) { }

  /**
   * Call Firebase Cloud Function
   *
   * @param fName:  Function Name
   * @param params: Function Parameter Object
   */
  callFunction(fName: string, params: any) {
    const toCall = this._fns.httpsCallable(fName);

    // const serviceLoader = ServiceLocator.injector.get(AnalyticsService)

    return toCall(params)
      .pipe(catchError
        (error => {
        // Getting the Error details.
        const code = error.code;
        const  message = error.message;
        const  details = error.details;

        console.log(JSON.stringify(error))
        // Do the logging!!!
        // this._analytics.logEvent()
        // console.l/og('error')
        // serviceLoader.logEvent({name: fName,info:{description: e, data:{params: params}}});
        // throw errors on cloud functions live

        // check if error http 500/ 400/ 301 /
        
        throw error;
      }));
  }

}

Error Logs

enter image description here

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda