XHR Cancels on Client

Good day! I need help with regards to XHR on client side.

On DOM load, I have the initialization set on my index. However, there are times when it is cancelled but normally, it would have to be retried again until request is successful. The problem for example on addObjects is that when this particular process is being retried, the first time it is being processed actually is being reflected successfully on Algolia logs thus pushing thru the indices but it is reflected as a cancelled status on the client. See image for reference. Is there a way to solve this?

Thanks. Your help will do a lot.

Hmm, that seems like something weird, canceled requests usually aren’t write requests (like settings). Could you give some more information on your setup like

  • why are you indexing on a client, and not a server
  • code you’re using that generates this
  • browser / JS client version

Thanks,

Haroen

It may be that you are indexing big amount of objects at the same time and so the requests are cancelled, you can raise the timeouts and see how it goes:

https://www.algolia.com/doc/api-client/javascript/advanced/#configuring-timeouts

Can you also do a https://community.algolia.com/diag/ and see if your latency is good to Algolia and your index from where you are.

Even if the request are cancelled, some of it could be done because that’s the way the network works: we are streaming the data to our servers so some of it might get through