I noticed that in my browser console, I am seeing the following error whenever I generate a mixpanel event.
mixpanel-2-latest.min.js:66 Uncaught RangeError: Maximum call stack size exceeded
This appears to be a recent error and I am unsure what is causing it. Has anyone ever come across this error before and is there a known fix?
Best answer by michael
We've typically seen the 'maximum call stack size exceeded' error when there are multiple instances of our Mixpanel library snippet being injected and loaded on a webpage. If you take a closer look at the page source of your website can you find two + instances of the Mixpanel library being loaded on your web page? Common places this could be are one in the head tags and one in the body, or in some external JS being included on the page.
If you can consolidate the two sets of tracking code, and leave one snippet of the Mixpanel library in the header of your page, the errors should go away. Is there a reason you call a Mixpanel event more than once?
Please let me know if you have any follow up questions, if my assumption was wrong and there are not multiple snippets being initiated, or if the errors persist even after you've rid of the extra library snippet. Happy to continue to troubleshoot with you until this is resolved.