Sync Tables that fail without an error in Pack Maker tools

My sync tables are saying they’ve failed, but my Pack maker tools are showing successes:

I do appear to be missing the last page of results. Thoughts on why I’m not seeing any error info?

1 Like

Does this happen consistently or sporadically? Could it be that the sync formula execution timed out? Expand the Overview entry for the last execution and check the Duration reported.

It’s consistently every time now, and always succeeds on the second-last page, silently failing on the last page. Duration 3488ms on the last execution (representing the second-last page).

In preparing this post though, I just noticed where my problem lies: = instead of == on line 2 here:

let nextContinuation = {};
if ((opportunities.length = constants.PAGE_SIZE))
  nextContinuation = { pageNumber: pageNumber + 1 };
return {
  result: opportunities,
  continuation: nextContinuation,

The typo’d condition is always true, which should just keep the continuation going in an infinite loop.

  • On the command line, it does indeed. Throws this error after a while without returning any results:
    Error: Sync is still running after 100 iterations, this is likely due to an infinite loop.

  • In a doc though, it seems to at least harvest the results it can before spiralling (silently) into eternity.

I fixed the issue and all is working properly now.

Recommendation: implement similar infinite loop detection in the Pack Maker Tools (unsure what the diagnosis should be based on - in CLI seems like 100 iterations; perhaps that, and/or certain number of iterations returning null result). Haven’t determined why the last page gets lost before the loop takes over, but anyway it’s fixed now :man_shrugging:

Thanks for the detailed response, and I’m glad you were able to find the cause. I’ve filed a feature request with the Packs engineering team to see if we can improve this sort of infinite loop detection for sync tables.

Hi Nick,

Could you please help me with this issue ? I copied only partial code. It fetches the results properly and logged the results.

The logs are below