Skip to content

Deployed NextJS backend service name is too long #6137

Closed

Description

@xSAVIKx

[REQUIRED] Environment info

firebase-tools: 12.4.4

Platform: Windows and Ubuntu

[REQUIRED] Test case

N/A. Just a test NextJS project with a pretty long GCP project ID

[REQUIRED] Steps to reproduce

  • Create a GCP project with a pretty long GCP project ID.
  • Create example Firebase + NextJS project.
  • Run firebase deploy.

[REQUIRED] Expected behavior

Deployment is successful.

[REQUIRED] Actual behavior

Deployment failed with the following error:

  [2023-07-16T20:09:13.743Z] <<< [apiv2][body] PUT https://run.googleapis.com/v1/projects/<PROJECT_NUMBER>/locations/europe-west1/services/ssr<PROJECT_ID>***"error":***"code":400,"message":"spec.traffic.tag: traffic tag 'fh-1d316462d434c000' and service name 'ssr<PROJECT_ID>' together are too long. Combined traffic tag and service name cannot exceed 46 characters.","status":"INVALID_ARGUMENT","details":[***"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[***"field":"spec.traffic.tag","description":"traffic tag 'fh-1d316462d434c000' and service name 'ssr<PROJECT_ID>' together are too long. Combined traffic tag and service name cannot exceed 46 characters."***]***]***
  [2023-07-16T20:09:13.744Z] FirebaseError: HTTP Error: 400, spec.traffic.tag: traffic tag 'fh-1d316462d434c000' and service name 'ssr<PROJECT_ID>' together are too long. Combined traffic tag and service name cannot exceed 46 characters.
      at responseToError (/home/runner/work/delivo-business-portal-frontend/delivo-business-portal-frontend/node_modules/firebase-tools/lib/responseToError.js:49:12)
      at RetryOperation._fn (/home/runner/work/delivo-business-portal-frontend/delivo-business-portal-frontend/node_modules/firebase-tools/lib/apiv2.js:289:77)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  
  Error: Failed to replace Run service projects/<PROJECT_NUMBER>/locations/europe-west1/services/ssr<PROJECT_ID>

Most probably, the tooling used to generate the new traffic tag should ensure that the tag + service name is within the limits. Also, it'd be great if one can specify the SSR service name somewhere in the config and not rely on the project ID for the naming.

Activity

  1. aalej commented on Jul 18, 2023

    @aalej
    Contributor

    Hi @xSAVIKx, thanks for reporting this issue and providing your observations. I was able to replicate the behavior you mentioned. I created a project that has a long project ID, then I tried deploying a NextJS app to the project and the same error was raised.

    Let me inform our team about this issue and try to bring someone here who can provide more context about this behavior.

  2. aalej commented on Jul 19, 2024

    @aalej
    Contributor

    This should be fixed by #6260. I’m going to go ahead and close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions