launchdarkly / js-client-sdk

LaunchDarkly Client-side SDK for Browser JavaScript
Other
109 stars 62 forks source link

Ublock Origin blocks some LaunchDarkly URLs #255

Closed ehuange closed 1 year ago

ehuange commented 1 year ago

Similar to #62, the extension uBlock Origin blocks some requests from LaunchDarkly.

image

eli-darkly commented 1 year ago

We're not familiar with the user interface of this extension, so can you please interpret that screenshot for us? That is: are you saying that it is blocking all LaunchDarkly domains, or only events.launchdarkly.com?

eli-darkly commented 1 year ago

If it is only events.launchdarkly.com that's being blocked, that is known behavior; that subdomain receives analytics data from the SDK, and the extension (or rather, the EasyList site list that it's using) blocks analytics services by design. However, it would not be correct for it to be blocking the other domains, since those are not any kind of analytics service or tracker— they are for getting the values of feature flags. See: https://github.com/easylist/easylist/pull/5814

gonzalopaniagua commented 1 year ago

Any suggestion on how to register/track users that are using Ublock or similar adblockers?

eli-darkly commented 1 year ago

Such products are explicitly designed with a goal of making it hard to track users. Opinions may vary as to whether that's a good thing, but defeating that goal isn't something we do in our own work and it isn't something we have any expertise in. I think it would be more of a general web development question; the issue would be the same for any kind of tool that sends analytics data. Generally blockers will assume that a POST request to a third-party site (that is, a cross-origin request) that isn't a form submission must be some kind of tracking or analytics, and if they decide to block it and are able to block it, the third-party site (LD) will never know, and the JS code in the browser won't necessarily be able to distinguish it from any other kind of network failure; whether it is even reported as an error at all in JS would depend on the details of how the blocking is implemented.

louis-launchdarkly commented 1 year ago

Closing this as there are no further comments on this issue or actions that LaunchDarkly can take.

asantos00 commented 1 year ago

How can I handle these errors? I'm having a lot of these errors polluting my logs:

XHR error GET https://app.launchdarkly.com/sdk/evalx//users/

I'm using the React Version of LaunchDarkly, but it doesn't seem to have a proper way of dealing with these errors.