Error on console: cannnot read properies of undefined - Adobe Data Collection | Community
Skip to main content
Level 2
September 17, 2024
Question

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

  • September 17, 2024
  • 2 replies
  • 1038 views

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:

 

 

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 19, 2024

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
RaulFoAuthor
Level 2
September 19, 2024

Hi @estebanbustamante,

 

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

 

 

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.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 19, 2024

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
RiteshY18
Community Advisor
Community Advisor
September 21, 2024

@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