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

Outdated allowed SSR region #6223

Closed
eXodes opened this issue Aug 5, 2023 · 7 comments
Closed

Outdated allowed SSR region #6223

eXodes opened this issue Aug 5, 2023 · 7 comments

Comments

@eXodes
Copy link

eXodes commented Aug 5, 2023

[REQUIRED] Environment info

firebase-tools: v12.4.7

Platform: macOS

[REQUIRED] Test case

firebase.json

{
  // ...
  "hosting": {
      "source": ".",
      "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
      "frameworksBackend": {
          "region": "asia-southeast1",
          "maxInstances": 1
      }
  },
  // ...
}

[REQUIRED] Steps to reproduce

  1. Set firebase hosting config as above.

  2. Deploy firebase hosting with experiments env

FIREBASE_CLI_EXPERIMENTS="webframeworks,pintags" firebase deploy --only hosting

[REQUIRED] Expected behavior

Functions to be deployed successfully since asia-southeast1 supports 2nd gen functions.

[REQUIRED] Actual behavior

Error during deployment due to unsupported allowed SSR region.

  Error: Hosting config for site web-app places server-side content in region asia-southeast1 which is not known. Valid regions are us-central1, us-west1, us-east1, europe-west1, and asia-east1

The initial motive of this implementation is stated on this PR #5504. The constant has been refactored into frameworks/constants.ts. However, currently there are more regions that supports 2nd gen functions.

Reference: Cloud Functions supported regions

@google-oss-bot
Copy link
Contributor

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@eXodes
Copy link
Author

eXodes commented Aug 9, 2023

There is a PR created to solve this issue at #6086.

@aalej
Copy link
Contributor

aalej commented Aug 11, 2023

Hi @eXodes, thanks for reporting this issue and providing details about your observations. I was able to reproduce the error you mentioned. Let me inform our team about this so that they can look into the existing PR and try to bring someone here who can provide more context about this.

@al4nnw
Copy link

al4nnw commented Sep 18, 2023

@aalej, any updates on this matter? The region distance is causing load time issues for of our users. It's very important to address this, especially since V2 functions are already compatible with other regions.

@mfellner
Copy link

Meanwhile you can use patch-package with a diff like this (worked for me):

diff --git a/node_modules/firebase-tools/lib/frameworks/constants.js b/node_modules/firebase-tools/lib/frameworks/constants.js
index a05d65c..30f6600 100644
--- a/node_modules/firebase-tools/lib/frameworks/constants.js
+++ b/node_modules/firebase-tools/lib/frameworks/constants.js
@@ -28,6 +28,7 @@ exports.ALLOWED_SSR_REGIONS = [
     { name: "us-east1 (South Carolina)", value: "us-east1" },
     { name: "europe-west1 (Belgium)", value: "europe-west1" },
     { name: "asia-east1 (Taiwan)", value: "asia-east1" },
+    { name: "europe-west3 (Frankfurt)", value: "europe-west3" },
 ];
 exports.I18N_ROOT = "/";
 function GET_DEFAULT_BUILD_TARGETS() {

@mfellner
Copy link

#6086 was merged, can this issue be closed?

@aalej
Copy link
Contributor

aalej commented Jan 19, 2024

Thanks @mfellner, seems like this issue should be fixed in v.13.0.1. I'm going to go ahead and close this.

@aalej aalej closed this as completed Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants