We recently encountered an error while working with one of our customers who was hosting numerous static websites (converted from WordPress to static) in Firebase. When attempting to add a new site to the existing project, we received an error message. It’s worth noting that this error message contradicts the information provided by Google. Even if you try again, the addition of a new site to an existing Firebase project will not work if the project has already reached its limit of 36 sites.

Firebase hosting is a powerful platform for hosting your static websites, especially if you are looking for a fast and reliable hosting solution. However, like any other technology, it is not immune to issues and errors. One such issue that we recently encountered while working with one of our clients is the “An error occurred while creating your site. Please try again.” error message. In this blog post, we will discuss this error in detail, its possible causes, and most importantly, how to fix it.

Understanding the Error

When you try to add a new site to an existing Firebase project, you may encounter the following error message: “An error occurred while creating your site. Please try again.” This error message is vague and doesn’t provide much information about what went wrong. However, upon investigating the issue, we found that the most likely cause of this error is hitting the maximum number of sites limit for a Firebase project.

According to Firebase documentation, the multisite feature supports a maximum of 36 sites per Firebase project. This means that if you have already reached this limit, you won’t be able to add any more sites to the project, and you will receive the above error message.

Possible Solutions

If you are facing this error message, the most straightforward solution is to create a new Firebase project and host your new site there. This will ensure that you do not exceed the maximum number of sites limit for a Firebase project. Alternatively, you can host your new site as a subdirectory of an existing domain. This means that you can create a new directory within an existing site and host your new site there. This will allow you to host more than 36 sites in a single Firebase project.

Data received from API:

{
  "error": {
    "code": 429,
    "message": "Resource has been exhausted (e.g. check quota).",
    "status": "RESOURCE_EXHAUSTED"
  }
}

you can also check the article to about how to configure custom domain with www to the firebase hosting.

Related Posts