Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@snowplow/browser-tracker | missing outQueue collector url #1283

Open
ghost opened this issue Jan 16, 2024 · 1 comment
Open

@snowplow/browser-tracker | missing outQueue collector url #1283

ghost opened this issue Jan 16, 2024 · 1 comment
Labels
type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.

Comments

@ghost
Copy link

ghost commented Jan 16, 2024

Description
We encounter error logs when executing "disableAnonymousTracking()" alongside an out-queue in local storage containing items; before any event is sent and therefore bloat the monitoring system with error logs and also loose events from the out-queue.

To Reproduce

  1. The collector has anonymousTracking disabled and therefore set to false;
    stateStorageStrategy is set to "cookieAndLocalStorage"
  2. Make sure that disableAnonymousTracking() gets immediately executed before any new event is triggered
    (e.g. in an effect when using react)
  3. Open the page/app, start a session and make sure that events land in the local storage out-queue when e.g. leaving the page.
  4. Return and open the page/app again with an out-queue containing items to be processed;
    disableAnonymousTracking()will get called as in step 2) | make sure that no event has been sent before
  5. Now the events in the out-queue which are start being processed are failing because there is no collector url defined

Expected behavior
I would either expect more documentation on the behavior or pitfalls of executing the disableAnonymousTracking() function;
or that the events within the out-queue are somehow correctly1) processed.

1) It's hard for me to say at this point what exactly that might be.

Screenshots
none

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.2.1 (23C71)
  • Browser: chrome
  • Version: 120.0.6099.216 (Official Build) (arm64)

Additional context
We could also configure the tracker correctly in the first place, and not call disableAnonymousTracking() when anonymousTracking is already disabled. Either way, it should not interfere in this case, as this will prevent pending events from the out-queue from being processed successfully.

I am aware that the steps to reproduce are kept quite minimal; but may be sufficient.
Please do not hesitate to let me know if you need any additional info or context.

@ghost ghost added the type:defect Bugs or weaknesses. The issue has to contain steps to reproduce. label Jan 16, 2024
@ghost ghost changed the title missing outQueue collector url @snowplow/browser-tracker | missing outQueue collector url Jan 16, 2024
@ghost
Copy link
Author

ghost commented Jan 16, 2024

Duplicates: #1221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.
Projects
None yet
Development

No branches or pull requests

0 participants