Network error when calling Xano API

Hi,

not sure if it is a bug or configuration issue on my side: When fetching a collection from Xano API in 3 of 10 cases WeWeb throws a Network error.

How can I fix this?

Here is an extract of the Error in WeWeb:
stack: “Error: Network Error at e.exports (https://editor-cdn.weweb.io/public/js/chunk-vendors.f83c0b3b.js:64:1241) at g.onerror (https://editor-cdn.weweb.io/public/js/chunk-vendors.f83c0b3b.js:257:2567) at XMLHttpRequest.sentryWrapped (https://browser.sentry-cdn.com/5.12.1/bundle.min.js:2:44863)”

message: “Network Error”

response: undefined

isAxiosError: true

toJSON: function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}

@Soenke can you provide some more information on how the error is being produced? What’s the code/action/setup of your Xano request. That error is not very helpful to diagnose where the issue is. Screenshots are very helpful also.

@kevinwasie I attach some scrrenshots of the workflow which is leading into the fetch error (also attached).

Nothing special in there, just fetching the collection and then updating the selectedItem variable.

The error occurs from time to time with no reason, also when I am testing the workflow in the editor, and run the workflow via “Test workflow” 10 times, the error occurs sometimes, but sometimes not.

  1. Action: Fetching the error

  1. Action: Updating variable

  1. Error in Collection occurs sometimes

Are you on the free plan for Xano?

Xano will throw a 429 error if you hit your rate limit, but that could be a culprit here.

Hey, I am using a paid plan in Xano.

In the logs I can also see that the response is transmitted as it should be. The error seems to occur on WeWeb side.

What is the response on Xano side?

In Xano’s logs the response is an array of objects as intended.

Something like this:

Hi @Soenke,

Can you tell us what is the Xano response in WeWeb?

i.e. inside the error > request > data > message as shown in some of these examples:

HI @Soenke,
we take a look at your project, and apparently you had a infinite loop of redirection to the login page. So you overflood Xano with requests, which was causing the issue.
We fixed your checkUser workflow with a filter, so that you do not loop on the login page.
We take note on this problem (you are not the only one) and we will probably add a security so this can’t happen.

Hope it help,

Regarding the periodic 502 error I discovered that some of the Xano API calls response headers do not comply with CORS. In detail the “Access-Control-Allow-Origin: *” parameter is missing in the response header. Strange thing is that the response is sometimes CORS compliant and sometimes not :thinking:

Found this interesting article about CORS, but the proposed fixes do not look sustainable to me:

Thats indeed strange. Can you check on Xano side why this behavior is happening? You will probably not being able to fix it by yourself as it is on Xano/server hands.
If you manage to find why can you get back to us :slight_smile: ? If there is something on our side, i will be happy to help, but here it seems to be a server issue.

Hi @aurelie , I forwarded the screenshots to Xano’s support, let’s see if they solve it (Crossing fingers).

I will definitely let you know…

@Michael_Xano

What was the latest update in this regard? I am having same error.

Hi @codage to be honest I cannot really tell you how the issue was solved in my case. I exchanged a couple of emails with the Xano team and Michael and his team investigated. Was tricky. Then suddenly the error did no longer appear :man_shrugging: A bit strange but until now everything runs smoothly :crossed_fingers:

I suggest that you contact the Xano support. They were really supportive. I recorded a loom video showing the error which helped them to understand the problem.

Hi,
I have the same issue while fetching the collection. It happens for different endpoints, not some particular one.
I contacted Xano support, but the problem is not on their side. I tested their APIs in Postman, and there is no error, everything works fine. But in WeWeb I keep getting “Network Error”. Before it happened once in a while, and I thought it was related to Xano API rate limits, since this workspace is on a free plan. But now those errors are too frequent and very annoying. And I’m 100% confident that it’s not related to rate limits. Can anyone help, please? I can’t imagine going live with such a user experience :frowning:


Hi @polina_cigen :wave:

Could you create a support ticket with:

  • a screenshot of the API call you made in Postman,
  • the URL of the endpoint you called in Postman,
  • If I need credentials to get a response from Xano, please also share those.

I will take a look.

Thanks, Joyce!
I’ve just submitted a ticket.
Appreciate your assistance and looking forward to your help!

1 Like

I am hoping that this problem can be resolved. I’ve been getting the exact same error for a couple of days now.

Do I have to create a separate support ticket, or can I expect that whatever is done to solve this will apply across the board? @Joyce

It’s better if you create a separate support ticket with credentials to your own app so we can test different solutions and you can follow the progress of the bug ticket.