1

I'm at the Sentry dashboard trying to make sense of an error, and it's showing Apple Mail 605.1.15 as an Browser, but I'm not 100% what's the full User-Agent. There's a way to see?

Example

daymannovaes
  • 1,416
  • 12
  • 23
  • 1
    I'm seeing all my user agents as Apple Mail. What version of sentry sdk are you using? Ours is outdated, and I'm wondering if that's the reason. Obviously all our users are not using Apple Mail. – jessica May 08 '22 at 21:49
  • We're using https://www.npmjs.com/package/@sentry/capacitor at the latest version. I think the reason is because we're using Ionic, and maybe Sentry treats Ionic client as Apple Mail... – daymannovaes May 10 '22 at 14:57
  • 1
    Ah, similarly, we are using cordova, must be the reason. – jessica May 10 '22 at 18:58
  • 1
    I wanted to update you on this issue, it turns out the reason is that WKWebView puts the iPad into "desktop" mode unless you tell it to use "mobile" mode using a config setting called `PreferredContentMode` -- apparently this is an obscure setting that when in mobile mode, uses the correct user agent for an iPad. Unfortunately I don't believe changing it is supported if you use ionic webview: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/609 Changing this did fix the issue for me, so I just wanted to let you know I confirmed the source of the issue. – jessica Jul 13 '22 at 01:52
  • Thank you so much for the update @jessica! I'll take a look at that, although I think I'm getting some "Apple Mail" from desktop uses, like from Mac OSX – daymannovaes Jul 14 '22 at 16:28
  • 1
    Oh! I didn't realize your app was on Mac OSX, but of course, you're using Capacitor, I should have read that more closely. What I ultimately learned is that the Apple Mail user agent is what apple sends from WebView for a "desktop" app, so that makes sense that you're getting it in your app. I can't be sure, but I think your best bet might be looking for a plugin that can discern the device and OS and manually set it in your sentry requests. Good luck! – jessica Jul 14 '22 at 20:24

0 Answers0