Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
serpro69 opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@serpro69
Copy link

serpro69 commented Jun 4, 2024

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

@serpro69 serpro69 added the bug Something isn't working label Jun 4, 2024
@matrix303
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants