Race condition when acdl event is pushed and added as event type, the custom code block doesn't execute and throws a timeout error | Community
Skip to main content
September 24, 2025
Question

Race condition when acdl event is pushed and added as event type, the custom code block doesn't execute and throws a timeout error

  • September 24, 2025
  • 1 reply
  • 843 views

In my website , I see a race condition rarely when the user land on first load rarely i could see my web sdk page load rule is not triggering. So i created an rule checking whether the acdl, ecid and one trust is available and emitting an acdl event on its availability. But this rule checking throws a timeout error on a race condition first page load where it records a unique visitor but not the pageview.
We are triggering that checking rule on acdl event pageloaded, but also throwing race condition and says custom code has been time out.
Any help how this can be fixed.
Note : Will this be caused as when acdl is pushed before launch library is not ready
please advise

 

1 reply

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 24, 2025

Hi @kalaivanil4 

by any chance, can you add screenshots? Having a hard time following your setup.

Cheers from Switzerland!
September 24, 2025

 

this is the error which i am getting on a race condition, inside this custom code i have first line console log even that isnt printing.It didnt even get into custom code to emit pageload ready event which needs to triggered for page load rule

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 24, 2025

Oh, so you are halting progress on tracking until users interact with your OneTrust logic... 

 

I don't think a timeout change here is the best option...

 

I am wondering if you should split up the logic... 

 

If the user is opted-in, run a rule that has an Opt-In condition on the DOM Ready or whatever page trigger you have. I would also add a second "Direct Call" trigger on this rule. Something like:

 

 

If the user is not opted-in, then the rule won't fire when the page loads, and if they are, then it will run.

 

Then, you need a second rule that is tied to the action of opting-in... when the user opts-in (which will be far past the DOM Ready state), you can call the Direct Call trigger using:

_satellite.track('opt-in-action');

 

So the user will opt-in, have the opt-in condition, and trigger the tracking rule...

 

Nothing is sitting there waiting for something to happen and timing out.