sentry-android-gradle-plugin icon indicating copy to clipboard operation
sentry-android-gradle-plugin copied to clipboard

Document custom proxies blocking traffic to sentry.io

Open mslalith opened this issue 1 year ago • 12 comments

Gradle Version

8.6

AGP Version

8.2.2

Code Minifier/Optimizer

Proguard

Version

4.3.0

Sentry SDK Version

7.3.0

Steps to Reproduce

I've integrated Sentry to my project (https://github.com/mslalith/focus_launcher/pull/383). I'm able to see crash reports in devDebug builds but not in devRelease builds

Expected Result

Crashes should properly report in release builds

Actual Result

Crashes are not being reported in release builds

mslalith avatar Feb 15 '24 16:02 mslalith

hi, could you enable debug logs and check the logcat output - it should show you what exactly is happening.

        <meta-data android:name="io.sentry.debug" android:value="true" />

romtsn avatar Feb 15 '24 18:02 romtsn

Nothing is shown when I tried enabling debug mode from SentryPluginExtension. Lemme check with manifest override

mslalith avatar Feb 16 '24 01:02 mslalith

Looks to me that sentry files are also obfuscated.

SCR-20240216-gyfk

BTW, debug logs are not being shown when enabling from SentryPluginExtension but working if added from manifest.

mslalith avatar Feb 16 '24 01:02 mslalith

BTW, debug logs are not being shown when enabling from SentryPluginExtension but working if added from manifest.

Yea, that's because debug in SentryPluginExtension is for the gradle plugin, and to have the sdk debug logs enabled you have to go through manifest.


Few questions to the issue:

  • Are you using self-hosted Sentry or sentry.io?
  • Do you set a proper DSN for your release builds?
  • Are you behind a proxy on your device/emulator?

romtsn avatar Feb 16 '24 07:02 romtsn

Are you using self-hosted Sentry or sentry.io?

Not self-hosted

Do you set a proper DSN for your release builds?

DSN is proper. I can see it in debug logs

Are you behind a proxy on your device/emulator?

No. I tested on real device as well

I can see crash reports with debug build but not with release

mslalith avatar Feb 16 '24 11:02 mslalith

@romtsn Somehow today I could see crash reports from emulator (release build) but still no luck when tested on real device

mslalith avatar Feb 19 '24 05:02 mslalith

@romtsn Somehow today I could see crash reports from emulator (release build) but still no luck when tested on real device

just to make sure, do you restart the app after it crashes? we upload crash reports on restart (to not block the process from termination for too long) and whenever internet connectivity changes

romtsn avatar Feb 19 '24 09:02 romtsn

just to make sure, do you restart the app after it crashes? we upload crash reports on restart (to not block the process from termination for too long) and whenever internet connectivity changes

Yes I did

mslalith avatar Feb 20 '24 02:02 mslalith

@romtsn Found the issue. When DuckDuckGo's App Tracking Protection is enabled, reports are not being sent. For now I disabled this for my launcher. But I feel this should be properly handled (if it is possible)

mslalith avatar Feb 21 '24 04:02 mslalith

@romtsn Found the issue. When DuckDuckGo's App Tracking Protection is enabled, reports are not being sent. For now I disabled this for my launcher. But I feel this should be properly handled (if it is possible)

glad you figured it out. I don't think we can handle this, but it definitely deserves to be mentioned on the docs/troubleshooting. I will address that, thanks for the update!

romtsn avatar Feb 21 '24 08:02 romtsn

Troubleshooting entry similar to e.g. https://docs.sentry.io/platforms/javascript/troubleshooting/#dealing-with-ad-blockers would make sense

kahest avatar Feb 21 '24 14:02 kahest