As Ture said, we are having this same problem on occasion after switching to pulling all.js from CDN. We haven’t figured out for sure if it’s a CDN failure or not, but having a fallback if it is failing to load from the CDN would be valuable, as that’s not an uncommon practice.
Another vendor said that they worked around the problem here by using a custom async wait function that would test for the presence of the AP
global in a loop to give it some time to init, and that this approach eliminated the errors for them. Looking at the all-debug.js
sources, I don’t see any way that the global couldn’t be there immediately if the script finishes loading without error, though, and we aren’t seeing any other errors being thrown from the AP script itself. I will try this approach, but am skeptical that it will help.
The error rate we are observing is relatively low (maybe 1-20 per day out of 10k+ total requests), but no errors is better than some errors Most often it occurs on Windows 10 with Chrome, but combinations involving MacOS and Firefox have been observed as well.