FAQ and troubleshooting

This page provides answers to frequently asked questions (FAQs) about App Hosting.

App Hosting FAQ

App Hosting provides preconfigured build and deploy support for Next.js and Angular, where we've committed to understanding those frameworks and interpreting their native configurations. For a number of other frameworks, the developer community supports App Hosting framework adapters. Additionally, for any Node.js application with a build and start script, App Hosting will attempt builds, but cannot dependably guarantee success. See Framework integration.

The regions for App Hosting are likely to expand over time. See App Hosting locations for the most up-to-date information.

Currently you can't, but support for other providers is in the long term roadmap for App Hosting.

If your repository does not appear in the list of options when you are creating a new backend in the Firebase console, first try selecting Refresh list. If the preferred repository is still not available, you may need to add it using the option to Grant access to a new repository in GitHub.

Additionally, you can manage repositories with the Firebase App Hosting GitHub application. To do this, go to your GitHub profile, and select Settings and then Applications. In the table row for the Firebase App Hosting application, click Configure to manage repositories.

Currently, changing the repository isn't possible. However, you can create a new backend associated with the preferred repository within the same project, or create a new backend in a separate project.

Headers are framework-dependent. Do whatever you would normally do for your framework.

Yes, you can perform local tests of your app prior to App Hosting deployment using the App Hosting emulator, which is part of the Firebase Local Emulator Suite. See Locally test your app deployment .

In such cases, it's possible that your error may have come from Cloud Run. Check the status of the rollout to be sure.

To remove the linked GitHub account, open Developer Connect, ensure your project is selected, and delete the firebase-app-hosting-github-oath connection and the connection that starts with apphosting-github-conn-. When you open App Hosting in the Firebase console, you should now be able to set up a new GitHub connection.

Though it was not available at the launch of the App Hosting preview, the Set-Cookie HTTP response header now works as expected.

General App Hosting limitations and troubleshooting

  • Cache-Control headers are modified to limit CDN caches to 60 minutes; this limitation will be removed shortly after the product's GA launch.
  • App Hosting's CDN can only include a specific set of request headers in its cache keys. That list includes NextJS's RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch, and Next-Url headers, as well as Cloud CDN's standard Accept, Accept-Encoding, Access-Control-Request-Headers, Access-Control-Request-Method, Origin, Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site, X-Goog-Allowed-Resources, and X-Origin. If a response contains a Vary header with a value not listed here, our CDN won't cache it.
  • Uncached static files are served out of Cloud Run; in a later release, they'll be stored and served from the App Hosting origin for better performance.
  • The Firebase console may intermittently show a "build was not found and is invalid" error on backend creation.
  • All backends in the same project share a GitHub org/account. They can be connected to different repositories under that org/account. To create backends that are connected to different GitHub accounts, put them in separate projects.

Angular app limitations and troubleshooting

Though App Hosting support for Angular is actively in development and expanding, it has the following limitations:

  • I18n: While core I18n functionality works, direct navigation to SSR pages can result in errors.
  • Localization: Building versions for different locales isn't supported.
  • Builders: Only the Application builder is currently supported.
  • Environments and Monorepo Tooling: Angular projects that have more than a single application target will fail. For more complete monorepo support, use Nx.

Next.js limitations and troubleshooting

  • By default, the built-in NextJS image optimization is disabled on App Hosting unless you explicitly set images.unoptimized to false or use a custom Image Loader. See Optimize image loading on Next.js.
  • URL paths containing percent-encoded characters are decoded by Cloud Run. This may cause issues with features that expect only encoded URL paths, such as Next.js parallel routing.
  • Currently, App Hosting limits the caching for NextJS apps using middleware. Over time, cache hit rates should improve.
  • URL paths containing percent-encoded characters are decoded by Cloud Run. This may cause issues with features that expect only encoded URL paths, such as Next.js parallel routing