Skip to content

Not able to deploy pubsub function #691

@pratiked

Description

@pratiked

Version info

node: v12.10.0
firebase-functions: 8.2.0
firebase-tools: 8.2.0
firebase-admin: 8.2.0

Test case

I'm trying to deploy a PubSub function:

exports.sendReminder 
    = functions.pubsub.schedule('0 6 * * *').timeZone('Asia/Kolkata').onRun((context) => {
        console.log('Wake up! It\'s 6AM');
        return null;
    }
);

Steps to reproduce

  1. Cloud schedular API was disabled before I tried to deploy for the first time.
  2. It got enabled automatically.
  3. PubSub is also enabled.

Expected behavior

Since Cloud Scheduler API and PubSub have enabled for the project. ideally, there should not be any error while deploying the function. The error does mention trying after a few minutes. But it's been 24 hrs since I enabled cloud schedular API and PubSub.

Actual behavior

> eslint .

+  functions: Finished running predeploy script.
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (41.54 KB) for uploading
+  functions: functions folder uploaded successfully
i  functions: uploading functions in project: sendReminder(us-central1)
i  functions: creating Node.js 8 function sendReminder(us-central1)...
i  scheduler: ensuring required API cloudscheduler.googleapis.com is enabled...
i  pubsub: ensuring required API pubsub.googleapis.com is enabled...
+  scheduler: required API cloudscheduler.googleapis.com is enabled
+  pubsub: required API pubsub.googleapis.com is enabled

Error: HTTP Error: 403, Cloud Scheduler API has not been used in project before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudscheduler.googleapis.com/overview then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

Were you able to successfully deploy your functions?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions