Expand my Community achievements bar.

Error on console: cannnot read properies of undefined - Adobe Data Collection

Avatar

Level 2

Hi,

 

I am setting a rule that initialises the Adobe Target server call via the Adobe Target V2 extension in Adobe Data Collection

 

At this moment, the only condition is based on a localStorage value. When the value is false the rule fires and when it is true it doesn't.

 

When debugging using the _satellite.setDebug command I am getting the following error:

 

RaulFo_0-1726589149128.png

 

I have tried to modify several things (conditions mainly) within the rule but I am still getting the same error. What does it mean? How can I avoid that error on console?

 

Thanks.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Community Advisor

Hi, 

The error means that you are trying to access a property (or read a data field) from a JavaScript object that does not exist. This error usually occurs when you are accessing objects before they are properly loaded so the execution order may be the problem here. Do you have any other behavioral issues? Is the target loading properly?



Esteban Bustamante

Avatar

Level 2

Hi @EstebanBustamante,

 

Since I am doing some testing to identify the issue, the rule configuration is currently very simple.

 

RaulFo_0-1726757510900.png

 

The only property I am trying to access is a local storage variable which I use for the condition to check its value. 

 

The rule is firing when the condition is met. All works fine when debugging apart from that error. I haven't got a clue what the persisting error might be. 

 

Thanks.

Avatar

Community Advisor

If you click on the blue link in the error message (the one you obfuscated), it will open the code that your browser is running and from there you should be able to see which object is undefined (does not exist).



Esteban Bustamante

Avatar

Level 2

Hi @EstebanBustamante,

 

It gets difficult to me to identify the error directly from the source code.

 

I don't know if I can have more help from you.

 

Thanks.

Avatar

Community Advisor

Hi, 

Try to add a timeout before the next action runs, you can do this in the advance options from your "Load Target" rule:

EstebanBustamante_1-1727096906101.png

It will look like this:

 

EstebanBustamante_0-1727096816741.png

 



Esteban Bustamante

Avatar

Level 8

@RaulFo  consider using a debugger extension to see when and what value is getting stored in your local storage value or rule conflict/order or event used here. as it seems to be variable access issue with no value defined, or initiate your local storage with a default value