Skip to content

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

@serpro69

Description

@serpro69

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 or update your Firebase 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions