79721323

Date: 2025-07-31 13:06:46
Score: 0.5
Natty:
Report link

I Figure it out.

The problem was with this lines:

const RAPIDAPI_KEY  = process.env.RAPIDAPI_KEY || functions.config().rapidapi.key;
const RAPIDAPI_HOST = process.env.RAPIDAPI_HOST || functions.config().rapidapi.host;

The command:

function.config()

is no longer available in Google Cloud.

instead, need to using secrets and using it like this:

the cosnsts are inside the exports and not outside like before.

exports.importFixtures = onSchedule(
    {
        schedule: "0 2 * * *",
        timeZone: "Asia/Jerusalem",
        region:   "europe-west1",
        secrets:  ["RAPIDAPI_KEY", "RAPIDAPI_HOST"],
    },
    async (event) => {
      const RAPIDAPI_KEY  = process.env.RAPIDAPI_KEY
      const RAPIDAPI_HOST = process.env.RAPIDAPI_HOST
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Stam Mashu