The easiest way to find out is to disable the
User-Agent customization and see if the problem goes away :) .
User-Agent is not guaranteed to be what you set. For example, a corporate firewall might use deep packet inspection to rewrite User-Agent and reduce browser entropy.
Philosophically, I think modifying
User-Agent to include additional logging information is a bad idea because it violates the single responsibility principle (as applied to data - hear me out). Assume everyone's browser is standards-compliant. (Your hybrid app is compliant, right? :) ) On mobile devices,
User-Agent has a well-defined responsibility: to indicate the user's preference for mobile or desktop rendering. Google says:
HTTP redirection is a commonly used to redirect clients to device-specific URLs. Usually, the redirection is done based on the user-agent in the HTTP request headers.
Is it ridiculous that a 109-byte (for me) string serves to convey a single bit of information? Sure, but that's the world we live in.
User-Agent to add logging information gives that string a second responsibility. That means your servers, CDN, logging tools, and everything else have to know about (or at least tolerate) both the logging information and the mobile/desktop intent information. Whenever you want to change the logging info, you have to make sure you're not breaking anything related to rendering intent, and vice versa.
Even though it may be a pain now, do yourself and those who maintain your code a favor: don't overload
User-Agent. Splitting responsibilities to keep your code simple and loosely coupled will pay for itself many times over by saving time, reducing stress, and preventing hair loss.