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

309
Visualizações
Firebase cloud functions working in emulator, but failed to deploy

I am working for a mini project, I need to call an external api but I could not deploy the function, I am having a the following error,

Error: There was an error deploying functions

I could not find anything in firebase-debug.log. when I called the same function as http triggered function and test it from the emulator, it worked, However, I could not deploy.

exports.scheduledFunction = functions.pubsub.schedule("every 1 minute").onRun(async (context) => {
  const response = await getResponse();
  functions.logger.log(response);
  return null;
});

function getResponse() {
  const url = "https://pikas.techinsight.com.my/kgateway/testing.php";
  return new Promise((resolve, reject) => {
    axios.get(url).then((response) => {
      return resolve(response.data.split("\n"));
    }).catch((error) => {
      functions.logger.log(error);
      return reject(error);
    });
  });
}

Here's the debug.log

[debug] [2021-11-15T18:41:34.063Z] Error: Failed to update function scheduledFunction in region us-central1
    at /usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:38:11
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Fabricator.updateV1Function (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:250:32)
    at async Fabricator.updateEndpoint (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:134:13)
    at async handle (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:75:17)
[error] 
[error] Error: There was an error deploying functions

Please help me to see what i am doing wrong

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