Understanding (and fixing) network errors

Hi there :wave:

Many of you have started reporting network errors when using Xano collections in WeWeb.

The behavior goes something like this:

  • you try to make calls to Xano
  • sometimes the call works but sometimes you get a “Network Error” in the WeWeb debugger or in your console
  • you can’t see the call in the Xano debugger

Here are some thoughts to help you solve this.

:warning: Network errors are a server issue (in this case Xano), not a frontend/WeWeb issue. :warning:

When you see a “Network Error” message, it means that:

  • the frontend (in this case WeWeb) was able to successfully send the request to the backend (in this case Xano)
  • but the server (in this case Xano) was not able to process it.

This could be due to multiple reasons, including but not limited to:

1- You are trying to make too many calls to Xano at once and their server can’t handle it.
2- You have reached a usage limit in your Xano plan and might need to optimize or upgrade your instance
3- You have a CORS settings which doesn’t allow external requests to be made on your API group (you can fix by adjusting the setting server-side or by proxying the request)

To optimize the API calls you make to Xano, there are a few things that you can do in WeWeb:

  • when possible, disable “Fetch automatically” on your Xano collections and use workflows to control exactly when you want to fetch the data
  • when possible, enable “Preserve on navigation” on collections
  • fetch collections one after the other instead of “in parallel”

:stop_sign: IMPORTANT :stop_sign: In some use cases, you do NOT want to preserve collections on navigation. Make sure to understand the pros and cons of fetching data automatically and preserving on navigation.

Before you upgrade your Xano instance, there are also things you can do on Xano’s side to optimize the resources used in your Xano instance. We encourage you to reach out to Xano’s team to learn more about that.

Hope this helps!

3 Likes