firebase / firebase/firebase-tools

Error when deploying a scheduled function to an incompatible region is not explicit

Open
#6,598 2 comments 0 reactions 1 assignee Assigned to @taeold View on GitHub
api: functions reproducible type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### Environment info

**firebase-tools:** 12.9.1

**Platform:** macOS

### Test case

Create a minimal scheduled function with an incompatible region

```js
export const sampleScheduledFunction = onSchedule({ region: 'europe-west9', schedule: '0 */6 * * *' }, async () => {
console.log('Hello world!');
});
```

### Steps to reproduce

Try to deploy the function:
```sh
firebase deploy --only functions
```

### Expected behavior

An error saying that 'europe-west9' does not support Cloud Scheduler.

### Actual behavior

A misleading error:
```
HTTP Error: 403, The principal (user or service account) lacks IAM permission "cloudscheduler.jobs.update" for the resource "projects/[project-id]/locations/europe-west9/jobs/firebase-schedule-sampleScheduledFunction-europe-west9" (or the resource may not exist).
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.