No collector configured
raised when calling disableAnonymousTracking
on a newly created tracker
#1221
Labels
type:defect
Bugs or weaknesses. The issue has to contain steps to reproduce.
Describe the bug
No collector configured
is raised when callingdisableAnonymousTracking
on a newly createdtracker
. I investigated the bug and found that this can happen when the local storage queue is non empty.More specifically:
disableAnonymousTracking
callsexecuteQueue
which will throw ifconfigCollectorUrl
is not a string.configCollectorUrl
is set either byenqueueRequest
or bysetCollectorUrl
. We have that we cannot reach theconfigCollectorUrl
check unless the queue has some items:This would normally ensure that
enqueueRequest
has been called, BUToutQueue
can be initialized from the localstorage in which case,enqueueRequest
would not have been called and thusconfigCollectorUrl
would not be set inOutQueueManager
.To Reproduce
A code snippet
Expected behavior
It should be possible to call
disableAnonymousTracking
on a newly created tracker without errors.Desktop (please complete the following information):
Additional context
I was able to reproduce this error on both the javascript tracker and the browser tracker.
The text was updated successfully, but these errors were encountered: