amplitude / Amplitude-JavaScript

JavaScript SDK for Amplitude
MIT License
316 stars 133 forks source link

Error callback for 'identify' not called a 2nd time when using ad blocker #475

Open pioug opened 2 years ago

pioug commented 2 years ago

Expected Behavior

One of the callback should be called every time client.identify() is called.

client.identify(identity, () => console.log('success'), () => console.log'error')));

Current Behavior

When uBlock is enabled, the error callback is called only once. If I refresh the page no callbacks are called and my promise is never resolved.

Possible Solution

Steps to Reproduce

0:18 uBlock disabled, refresh, success callback called ✅ 0:34 uBlock enabled, refresh, error callback called ✅ 0:50 uBlock enabled, refresh, no callback called ❌

https://user-images.githubusercontent.com/3654180/147656429-79a69a9e-49eb-458f-9d86-2bc238cc2893.mp4

Environment

yuhao900914 commented 2 years ago

cc: @kevinpagtakhan