scripts
scripts copied to clipboard
Illegal invocation with sendBeacon and URL has an error
From a very helpful customer, we got this error report:
The following is logged to console: Simple Analytics: Uncaught TypeError: Illegal invocation At this stage, it seems exclusively happening on Chrome/Windows.
Good read: https://xgwang.me/posts/you-may-not-know-beacon/
It does suggest that if a URL has an error, sendBeacon will throw "TypeError: Illegal invocation".
This also seemed to effect the next.js project as well: https://github.com/vercel/next.js/issues/23856 (fix: https://github.com/vercel/next.js/pull/26601/files)
I've also had this logged to sentry