diff --git a/apps/ledger-live-mobile/.env.android.nightly b/apps/ledger-live-mobile/.env.android.nightly index a5befd396a5c..27f744aa9737 100644 --- a/apps/ledger-live-mobile/.env.android.nightly +++ b/apps/ledger-live-mobile/.env.android.nightly @@ -1,6 +1,7 @@ APP_NAME="LL [STAGING]" ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh SENTRY_DSN=https://e16494560bce41b1a27e60095f0cd7e0@o118392.ingest.sentry.io/6549924 +SENTRY_DISABLE_AUTO_UPLOAD=true BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3" BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.android.prerelease b/apps/ledger-live-mobile/.env.android.prerelease index e31040346200..8d190f6284e2 100644 --- a/apps/ledger-live-mobile/.env.android.prerelease +++ b/apps/ledger-live-mobile/.env.android.prerelease @@ -1,6 +1,7 @@ APP_NAME="Ledger Live" SENTRY_DSN=https://ea730d6c531f40679e7306c888f7fbc5@o118392.ingest.sentry.io/6723478 +SENTRY_DISABLE_AUTO_UPLOAD=true ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3 BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17" BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.android.release b/apps/ledger-live-mobile/.env.android.release index 3beb50181f19..5ff22408ed9b 100644 --- a/apps/ledger-live-mobile/.env.android.release +++ b/apps/ledger-live-mobile/.env.android.release @@ -1,6 +1,7 @@ APP_NAME="Ledger Live" SENTRY_DSN=https://bfd61f321b4144ffbce693aa6c6be9d0@o118392.ingest.sentry.io/6505213 +SENTRY_DISABLE_AUTO_UPLOAD=true ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3 BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17" BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.android.staging b/apps/ledger-live-mobile/.env.android.staging index cd58db3a57e8..6cb5fcdd439a 100644 --- a/apps/ledger-live-mobile/.env.android.staging +++ b/apps/ledger-live-mobile/.env.android.staging @@ -1,6 +1,7 @@ APP_NAME="LL [STAGING]" SENTRY_DSN=https://0109819a39084e718120d031def0db38@o118392.ingest.sentry.io/6619343 +SENTRY_DISABLE_AUTO_UPLOAD=true ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3" BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.ios.nightly b/apps/ledger-live-mobile/.env.ios.nightly index ec993400a93f..fa7f685ca6d7 100644 --- a/apps/ledger-live-mobile/.env.ios.nightly +++ b/apps/ledger-live-mobile/.env.ios.nightly @@ -1,7 +1,8 @@ APP_NAME="LL [STAGING]" ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh +SENTRY_DISABLE_AUTO_UPLOAD=true GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Production" SENTRY_DSN=https://3b35bb6adb6541db95d13e56dec0a0f9@o118392.ingest.sentry.io/6549925 BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3" BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.ios.prerelease b/apps/ledger-live-mobile/.env.ios.prerelease index 54cbc249144e..aa7010439b24 100644 --- a/apps/ledger-live-mobile/.env.ios.prerelease +++ b/apps/ledger-live-mobile/.env.ios.prerelease @@ -1,7 +1,8 @@ APP_NAME="Ledger Live" SENTRY_DSN=https://52a4181714f74dffa9cdf48224dba505@o118392.ingest.sentry.io/6723477 +SENTRY_DISABLE_AUTO_UPLOAD=true ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3 GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Production" BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17" BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.ios.release b/apps/ledger-live-mobile/.env.ios.release index 744006c1f4cb..a010de92b663 100644 --- a/apps/ledger-live-mobile/.env.ios.release +++ b/apps/ledger-live-mobile/.env.ios.release @@ -1,7 +1,8 @@ APP_NAME="Ledger Live" SENTRY_DSN=https://b4ac5f291b7a48529fc7ec1f34cf57ed@o118392.ingest.sentry.io/6505205 +SENTRY_DISABLE_AUTO_UPLOAD=true ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3 GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Production" BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17" BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/.env.ios.staging b/apps/ledger-live-mobile/.env.ios.staging index 481b4aa292c6..682c97e3f672 100644 --- a/apps/ledger-live-mobile/.env.ios.staging +++ b/apps/ledger-live-mobile/.env.ios.staging @@ -1,7 +1,8 @@ APP_NAME="LL [STAGING]" SENTRY_DSN=https://bd8b742115104e82b9ad3686fd9fd9f2@o118392.ingest.sentry.io/6619346 +SENTRY_DISABLE_AUTO_UPLOAD=true ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Staging" BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3" BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618" -BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" \ No newline at end of file +BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu" diff --git a/apps/ledger-live-mobile/android/app/build.gradle b/apps/ledger-live-mobile/android/app/build.gradle index 6e4839a8d8ec..cdee6204376b 100644 --- a/apps/ledger-live-mobile/android/app/build.gradle +++ b/apps/ledger-live-mobile/android/app/build.gradle @@ -136,6 +136,15 @@ android { testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } + + if (System.getenv("SENTRY_AUTH_TOKEN") != null) { + sentry { + autoUploadProguardMapping = shouldSentryAutoUpload() + uploadNativeSymbols = shouldSentryAutoUpload() + } + } + + configurations.all { resolutionStrategy { // Needed for Braze diff --git a/apps/ledger-live-mobile/android/build.gradle b/apps/ledger-live-mobile/android/build.gradle index 65b247c5237d..3f37f0f06b3c 100644 --- a/apps/ledger-live-mobile/android/build.gradle +++ b/apps/ledger-live-mobile/android/build.gradle @@ -17,6 +17,7 @@ buildscript { mavenCentral() } dependencies { + classpath("io.sentry:sentry-android-gradle-plugin:4.14.1") classpath("com.android.tools.build:gradle:7.4.1") classpath("com.facebook.react:react-native-gradle-plugin") // NOTE: Do not place your application dependencies here; they belong @@ -70,4 +71,4 @@ allprojects { force "androidx.core:core-ktx:$rootProject.ext.androidXCore" } } -} \ No newline at end of file +} diff --git a/apps/ledger-live-mobile/ios/Podfile.lock b/apps/ledger-live-mobile/ios/Podfile.lock index 506f88ef0969..e617c811225d 100644 --- a/apps/ledger-live-mobile/ios/Podfile.lock +++ b/apps/ledger-live-mobile/ios/Podfile.lock @@ -1983,11 +1983,29 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNSentry (5.24.3): + - RNSentry (6.5.0): + - DoubleConversion + - glog - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics - React-hermes - - Sentry/HybridSDK (= 8.36.0) + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Sentry/HybridSDK (= 8.43.0) + - Yoga - RNShare (10.1.0): - React-Core - RNSVG (13.14.0): @@ -2022,7 +2040,7 @@ PODS: - segment-analytics-react-native (2.19.1): - React-Core - sovran-react-native - - Sentry/HybridSDK (8.36.0) + - Sentry/HybridSDK (8.43.0) - SocketRocket (0.7.0) - sovran-react-native (0.4.5): - React-Core @@ -2576,14 +2594,14 @@ SPEC CHECKSUMS: RNReactNativeHapticFeedback: ec56a5f81c3941206fd85625fa669ffc7b4545f9 RNReanimated: 82b558efb00a30a3b8ea1a3ca8975125e9400313 RNScreens: 63500b789c1b5286972a55d4a7d73fc1123f51e4 - RNSentry: e7e5d059d62d6c447d83e14800edc1812a594a5d + RNSentry: e1a16a23ada7d12686dff2f1eeaf55a08738585c RNShare: b674d9f1cb0dc11116983bebd8712908a226a3ee RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396 RNVectorIcons: 6382277afab3c54658e9d555ee0faa7a37827136 SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d segment-analytics-react-native: 1c36d83c0a735795e304178241331e7701dc5d2a - Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57 + Sentry: 532b281a53b1b45a523fd592f608956fb36e577c SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d sovran-react-native: fd3dc8f1a4b14acdc4ad25fc6b4ac4f52a2a2a15 Storyly: 310297bcf4493d3d5b41e71834fba49502c8067a diff --git a/apps/ledger-live-mobile/package.json b/apps/ledger-live-mobile/package.json index e59b1a10b2da..4a4113dfa593 100644 --- a/apps/ledger-live-mobile/package.json +++ b/apps/ledger-live-mobile/package.json @@ -129,7 +129,7 @@ "@reduxjs/toolkit": "2.0.1", "@segment/analytics-react-native": "2.19.1", "@segment/sovran-react-native": "0.4.5", - "@sentry/react-native": "5.24.3", + "@sentry/react-native": "6.5.0", "@shopify/flash-list": "1.6.4", "@shopify/react-native-performance": "4.1.2", "@shopify/react-native-performance-navigation": "3.0.0", @@ -245,7 +245,7 @@ "@react-native-community/cli-platform-ios": "14.1.0", "@react-native/babel-preset": "0.75.4", "@react-native/dev-middleware": "0.75.4", - "@sentry/cli": "2.34.1", + "@sentry/cli": "2.40.0", "@swc/core": "1.4.11", "@swc/jest": "0.2.36", "@testing-library/jest-native": "5.4.3", diff --git a/apps/ledger-live-mobile/src/navigation/DeeplinksProvider.tsx b/apps/ledger-live-mobile/src/navigation/DeeplinksProvider.tsx index 03b8a986fa7f..db3a300814e9 100644 --- a/apps/ledger-live-mobile/src/navigation/DeeplinksProvider.tsx +++ b/apps/ledger-live-mobile/src/navigation/DeeplinksProvider.tsx @@ -15,7 +15,6 @@ import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; import { BUY_SELL_UI_APP_ID } from "@ledgerhq/live-common/wallet-api/constants"; import Braze from "@braze/react-native-sdk"; import { LiveAppManifest } from "@ledgerhq/live-common/platform/types"; -import * as Sentry from "@sentry/react-native"; import { hasCompletedOnboardingSelector } from "~/reducers/settings"; import { navigationRef, isReadyRef } from "../rootnavigation"; import { ScreenName, NavigatorName } from "~/const"; @@ -27,7 +26,7 @@ import { track } from "~/analytics"; import { setEarnInfoModal } from "~/actions/earn"; import { blockPasswordLock } from "../actions/appstate"; import { useStorylyContext } from "~/components/StorylyStories/StorylyProvider"; -const routingInstrumentation = new Sentry.ReactNavigationInstrumentation(); +import { navigationIntegration } from "../sentry"; const TRACKING_EVENT = "deeplink_clicked"; const themes: { @@ -674,7 +673,7 @@ export const DeeplinksProvider = ({ onReady={() => { (isReadyRef as Writeable).current = true; setTimeout(() => SplashScreen.hide(), 300); - routingInstrumentation.registerNavigationContainer(navigationRef); + navigationIntegration.registerNavigationContainer(navigationRef); }} > {children} diff --git a/apps/ledger-live-mobile/src/screens/Settings/Debug/Debugging/Crashes.tsx b/apps/ledger-live-mobile/src/screens/Settings/Debug/Debugging/Crashes.tsx index 11eec28d350f..d9d723538c4e 100644 --- a/apps/ledger-live-mobile/src/screens/Settings/Debug/Debugging/Crashes.tsx +++ b/apps/ledger-live-mobile/src/screens/Settings/Debug/Debugging/Crashes.tsx @@ -71,6 +71,14 @@ const Crashes = (_: Props) => { containerStyle={styles.buttonStyle} /> +