diff --git a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx
index 8c6271df2599b5..fb37ec7526d339 100644
--- a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx
+++ b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx
@@ -54,6 +54,12 @@ function getErrorMessage(
}
return `${baseSourceMapDocsLink}troubleshooting_js/` + (section ? `#${section}` : '');
}
+ function getMigrationGuide() {
+ if (docPlatform === 'react-native') {
+ return 'https://docs.sentry.io/platforms/react-native/migration/';
+ }
+ return 'https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#upgrading-from-6x-to-7x';
+ }
const defaultDocsLink = `${baseSourceMapDocsLink}#uploading-source-maps-to-sentry`;
@@ -168,6 +174,18 @@ function getErrorMessage(
docsLink: getTroubleshootingLink(),
},
];
+ case SourceMapProcessingIssueType.SDK_OUT_OF_DATE:
+ return [
+ {
+ title: t('SDK Out of Date'),
+ desc: t(
+ "We're not able to un-minify your application's source code, because your SDK %s is out of date with version %s. Please update it to the latest version.",
+ error.data.sdkName,
+ error.data.sdkVersion
+ ),
+ docsLink: error.data.showMigrationGuide ? getMigrationGuide() : undefined,
+ },
+ ];
case SourceMapProcessingIssueType.UNKNOWN_ERROR:
default:
return [];
@@ -301,12 +319,14 @@ export function SourceMapDebug({debugFrames, event}: SourcemapDebugProps) {
key={idx}
title={message.title}
docsLink={
- handleDocsClick(message.type)}
- >
- {t('Read Guide')}
-
+ message.docsLink ? (
+ handleDocsClick(message.type)}
+ >
+ {t('Read Guide')}
+
+ ) : null
}
onExpandClick={() => handleExpandClick(message.type)}
>
diff --git a/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx b/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx
index e997c34ac53c91..97e81e21ce47af 100644
--- a/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx
+++ b/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx
@@ -50,6 +50,11 @@ interface NoURLMatchDebugError extends BaseSourceMapDebugError {
type: SourceMapProcessingIssueType.NO_URL_MATCH;
}
+interface SDKOutOfDate extends BaseSourceMapDebugError {
+ data: {sdkName: string; sdkVersion: string; showMigrationGuide: boolean};
+ type: SourceMapProcessingIssueType.SDK_OUT_OF_DATE;
+}
+
export type SourceMapDebugError =
| UnknownErrorDebugError
| MissingReleaseDebugError
@@ -59,7 +64,8 @@ export type SourceMapDebugError =
| PartialMatchDebugError
| DistMismatchDebugError
| SourcemapNotFoundDebugError
- | NoURLMatchDebugError;
+ | NoURLMatchDebugError
+ | SDKOutOfDate;
export interface SourceMapDebugResponse {
errors: SourceMapDebugError[];
@@ -75,6 +81,7 @@ export enum SourceMapProcessingIssueType {
PARTIAL_MATCH = 'partial_match',
DIST_MISMATCH = 'dist_mismatch',
SOURCEMAP_NOT_FOUND = 'sourcemap_not_found',
+ SDK_OUT_OF_DATE = 'sdk_out_of_date',
}
const sourceMapDebugQuery = ({