Batch processing failed

I’m trying to subscribe to an event that tells me reliably when an uploaded model is ingested and ready to be downloaded.

The projectVersionsUpdated == "CREATED" or ingestionStatus == "success" is not reliable for all models. my download starts as soon as the “CREATED” status is reached. but for some models it throws this error:

“Batch processing failed: Error: Items requested were not downloaded: 00002a0ef049e1992061cdb18fdf48a5,0000d6e585e34276a05cb7e80b99d215,000495c607af39c4a80be809e6f6572f, etc.”
when i wait for ca. 15-20s before starting the download, it works fine.

The same happens in the app.speckle.systems: when the model upload is done and i quickly try to open the version, the same error is thrown in the logs. when i refresh after a short while, it works.

Our current fix is a frontend-side retry logic in the objectloader, that usually resolves after 15-20s.

Are we using the events wrong? Are there events that tell me reliably if a version can be downloaded already?

Thanks in advance!

1 Like

In various places in our apps, we will poll a project.ingestion.statusData.status query, with a 1 second delay between polls until the ingestion reports a failed, timeout, cancelled, or success status (i.e. anything but processing or queued)

We’ve found that more reliable than subscriptions which often have a delay to setup, and the ingestion processing may complete faster than the subscription takes to setup.

Thanks, but i think your reply misses my issue a bit. Maybe my original post was a bit unclear: the failure happens even after ingestion has already reported success. So waiting for success isn’t sufficient, because the objects aren’t reliably readable at that point yet.

I just double checked it to confirm. Also the same error seems to appear on your web app (app.speckle.systems). so my guess is that it is a server side issue, not a frontend one. we already fixed the problem for our app frontendside, but i feel that the proper fix lies at the speckle servers. so this is not a breaking issue for us, rather an FYI for you.

My question is still: is there a signal that tells me the version’s objects are actually readable, not just that ingestion finished? Or is client-side retry on the download (what we do now) effectively the expected approach?

The bug happens with some bigger models (so far it appeared with 2 IFCs) but i cannot share them sadly.

Best regards!

How are you downloading the object data?
Because from the point the ingestion has succeeded, I would expect you to be able to receive it, but we expose several ways to “download” so perhaps there’s a problem that I’m not aware of.

We use the serverDownloader.ts from the objectLoader2 package from the speckle-server repo. That is also the place where we added the local fix.

I suspect you are downloading it the same way on your webapp. i can repro it like this: upload a larger ifc model (does not happen with all large models). wait for ingestion to be done and then quickly open the version. it results in this: