FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Deployed next.js function returns 'Your client does not have permission to get URL / from this server'

Open
#380 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

### Action config

```
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FIREBASE_SANDBOX_425310 }}
channelId: live
projectId: firebase-sandbox-425310
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks,pintags

```

### Error message

We're deploying next.js to firebase hosting. After the site and function are deployed, opening the hosting url results in

**403
Your client does not have permission to get URL / from this server**

The logs say:

```
textPayload: "The request was not authenticated. Either allow unauthenticated invocations or set the proper Authorization header. Read more at https://cloud.google.com/run/docs/securing/authenticating Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#unauthorized-client"
```

I thought this should've been handled by firebase by default, since according to https://firebase.google.com/docs/hosting/functions:

> Caution: New HTTP and HTTP callable functions deployed with any Firebase CLI lower than version 7.7.0 are private by default and throw HTTP 403 errors when invoked. Either explicitly [make these functions public](https://cloud.google.com/functions/docs/securing/managing-access-iam#allowing_unauthenticated_http_function_invocation) or [update your Firebase CLI](https://firebase.google.com/docs/cli#setup_update_cli) before you deploy any new functions.

However, that doesn't seem to be the case here.

### Expected behavior

Deployed function should not be private

### Actual behavior

403 because functions don't allow access

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.