From 17e0fe42a5716c142d0f3bc448d7aadc2678fd56 Mon Sep 17 00:00:00 2001 From: Richard Roggenkemper Date: Thu, 23 Feb 2023 12:51:00 -0800 Subject: [PATCH 1/4] start updating copy --- .../exception/sourceMapDebug.spec.tsx | 6 ++--- .../crashContent/exception/sourceMapDebug.tsx | 26 +++++++++++++------ .../exception/useSourceMapDebug.tsx | 5 ++++ 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx index 62885e89dc4b..8056261bf8f4 100644 --- a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx @@ -99,7 +99,7 @@ describe('SourceMapDebug', () => { }); expect( await screen.findByText( - "We've encountered 1 problem de-minifying your applications source code!" + "We've encountered 1 problem un-minifying your applications source code!" ) ).toBeInTheDocument(); @@ -132,7 +132,7 @@ describe('SourceMapDebug', () => { }); expect( await screen.findByText( - "We've encountered 1 problem de-minifying your applications source code!" + "We've encountered 1 problem un-minifying your applications source code!" ) ).toBeInTheDocument(); @@ -161,7 +161,7 @@ describe('SourceMapDebug', () => { }); expect( await screen.findByText( - "We've encountered 1 problem de-minifying your applications source code!" + "We've encountered 1 problem un-minifying your applications source code!" ) ).toBeInTheDocument(); diff --git a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx index ec49f5b34c60..31e022e910d2 100644 --- a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx @@ -63,7 +63,7 @@ function getErrorMessage( { title: t('Event missing Release tag'), desc: t( - 'Integrate Sentry into your release pipeline. You can do this with a tool like Webpack or using the CLI.' + 'Integrate Sentry into your release pipeline using a tool like Webpack or the CLI.' ), docsLink: defaultDocsLink, }, @@ -90,7 +90,7 @@ function getErrorMessage( { title: t('Sentry not part of release pipeline'), desc: tct( - 'Integrate Sentry into your release pipeline. You can do this with a tool like Webpack or using the CLI. Please note the release must be the same as being set in your [init]. The value for this event is [version].', + 'Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what’s set in your Sentry.init. The value for this event is [version].', { init: sentryInit, version: {error.data.version}, @@ -104,7 +104,7 @@ function getErrorMessage( { title: t('Source Maps not uploaded'), desc: t( - 'It looks like you are creating but not uploading your source maps. Please refer to the instructions in our docs guide for help with troubleshooting the issue.' + 'It looks like you’re creating, but not uploading your source maps. Read our docs for troubleshooting help.' ), docsLink: defaultDocsLink, }, @@ -114,7 +114,7 @@ function getErrorMessage( { title: t('Invalid Absolute Path URL'), desc: tct( - 'The given [literalAbsPath] of the stack frame is [absPath] which is not a valid URL. Please refer to the instructions in our docs guide for help with troubleshooting the issue.', + 'The [literalAbsPath] of the stack frame is [absPath] which is not a valid URL. Read our docs for troubleshooting help.', { absPath: {error.data.absPath}, literalAbsPath: abs_path, @@ -130,7 +130,7 @@ function getErrorMessage( { title: t('Absolute Path Mismatch'), desc: tct( - "The given [literalAbsPath] of the stack frame is [absPath] which doesn't match any release artifact. Please refer to the instructions in our docs guide for help with troubleshooting the issue.", + "The given [literalAbsPath] of the stack frame is [absPath] which doesn't match any release artifact. Read our docs for troubleshooting help.", { absPath: {error.data.absPath}, literalAbsPath: abs_path, @@ -146,7 +146,7 @@ function getErrorMessage( { title: t('Dist Mismatch'), desc: tct( - "The distribution identifier you are providing doesn't match. The [literalDist] value of [dist] configured in your [init] must be the same as the one used during source map upload. Please refer to the instructions in our docs guide for help with troubleshooting the issue.", + 'The distribution identifier you’re providing doesn’t match. The [literalDist] value of [dist] configured in your [init] must be the same as the one used during source map upload. Read our docs for troubleshooting help.', { init: sentryInit, dist: dist, @@ -158,6 +158,16 @@ function getErrorMessage( ), }, ]; + case SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND: + return [ + { + title: t('Source Map File doesn’t exist'), + desc: t( + 'Sentry couldn’t fetch the source map file for this event. Read our docs for troubleshooting help.' + ), + docsLink: getTroubleshootingLink(), + }, + ]; case SourceMapProcessingIssueType.UNKNOWN_ERROR: default: return []; @@ -308,8 +318,8 @@ export function SourceMapDebug({debugFrames, event}: SourcemapDebugProps) { } > {tn( - "We've encountered %s problem de-minifying your applications source code!", - "We've encountered %s problems de-minifying your applications source code!", + "We've encountered %s problem unminifying your applications source code!", + "We've encountered %s problems unminifying your applications source code!", errorMessages.length )} diff --git a/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx b/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx index 2bce7e45b396..b22c584a3e19 100644 --- a/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebug.tsx @@ -36,6 +36,9 @@ interface PartialMatchDebugError extends BaseSourceMapDebugError { interface DistMismatchDebugError extends BaseSourceMapDebugError { type: SourceMapProcessingIssueType.DIST_MISMATCH; } +interface SourcemapNotFoundDebugError extends BaseSourceMapDebugError { + type: SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND; +} interface NoURLMatchDebugError extends BaseSourceMapDebugError { data: {absPath: string}; type: SourceMapProcessingIssueType.NO_URL_MATCH; @@ -49,6 +52,7 @@ export type SourceMapDebugError = | UrlNotValidDebugError | PartialMatchDebugError | DistMismatchDebugError + | SourcemapNotFoundDebugError | NoURLMatchDebugError; export interface SourceMapDebugResponse { @@ -64,6 +68,7 @@ export enum SourceMapProcessingIssueType { NO_URL_MATCH = 'no_url_match', PARTIAL_MATCH = 'partial_match', DIST_MISMATCH = 'dist_mismatch', + SOURCEMAP_NOT_FOUND = 'sourcemap_not_found', } const sourceMapDebugQuery = ({ From 0940373ebec8ad03d8aaee7055a9af9e280277be Mon Sep 17 00:00:00 2001 From: Richard Roggenkemper Date: Mon, 27 Feb 2023 14:04:23 -0800 Subject: [PATCH 2/4] fix typo --- .../crashContent/exception/sourceMapDebug.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx index 31e022e910d2..1544c0cc7412 100644 --- a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx @@ -90,7 +90,7 @@ function getErrorMessage( { title: t('Sentry not part of release pipeline'), desc: tct( - 'Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what’s set in your Sentry.init. The value for this event is [version].', + "Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what's set in your Sentry.init. The value for this event is [version].", { init: sentryInit, version: {error.data.version}, @@ -104,7 +104,7 @@ function getErrorMessage( { title: t('Source Maps not uploaded'), desc: t( - 'It looks like you’re creating, but not uploading your source maps. Read our docs for troubleshooting help.' + "It looks like you're creating, but not uploading your source maps. Read our docs for troubleshooting help." ), docsLink: defaultDocsLink, }, @@ -146,7 +146,7 @@ function getErrorMessage( { title: t('Dist Mismatch'), desc: tct( - 'The distribution identifier you’re providing doesn’t match. The [literalDist] value of [dist] configured in your [init] must be the same as the one used during source map upload. Read our docs for troubleshooting help.', + "The distribution identifier you're providing doesn't match. The [literalDist] value of [dist] configured in your [init] must be the same as the one used during source map upload. Read our docs for troubleshooting help.", { init: sentryInit, dist: dist, @@ -161,9 +161,9 @@ function getErrorMessage( case SourceMapProcessingIssueType.SOURCEMAP_NOT_FOUND: return [ { - title: t('Source Map File doesn’t exist'), + title: t("Source Map File doesn't exist"), desc: t( - 'Sentry couldn’t fetch the source map file for this event. Read our docs for troubleshooting help.' + "Sentry couldn't fetch the source map file for this event. Read our docs for troubleshooting help." ), docsLink: getTroubleshootingLink(), }, @@ -318,8 +318,8 @@ export function SourceMapDebug({debugFrames, event}: SourcemapDebugProps) { } > {tn( - "We've encountered %s problem unminifying your applications source code!", - "We've encountered %s problems unminifying your applications source code!", + "We've encountered %s problem un-minifying your applications source code!", + "We've encountered %s problems un-minifying your applications source code!", errorMessages.length )} From a4488e2854bca712ec3289e7b3a46af393bba377 Mon Sep 17 00:00:00 2001 From: Richard Roggenkemper Date: Mon, 27 Feb 2023 14:07:01 -0800 Subject: [PATCH 3/4] update init line --- .../events/interfaces/crashContent/exception/sourceMapDebug.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx index 1544c0cc7412..a3308283a17c 100644 --- a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.tsx @@ -90,7 +90,7 @@ function getErrorMessage( { title: t('Sentry not part of release pipeline'), desc: tct( - "Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what's set in your Sentry.init. The value for this event is [version].", + "Integrate Sentry into your release pipeline using a tool like Webpack or the CLI. Your release must match what's set in your [init]. The value for this event is [version].", { init: sentryInit, version: {error.data.version}, From 938635e1e2dee5da4a5b115b4bdc583085306790 Mon Sep 17 00:00:00 2001 From: Richard Roggenkemper Date: Mon, 27 Feb 2023 14:26:16 -0800 Subject: [PATCH 4/4] fix failing test --- .../interfaces/crashContent/exception/sourceMapDebug.spec.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx index 8056261bf8f4..a0fefbb656ad 100644 --- a/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/sourceMapDebug.spec.tsx @@ -166,7 +166,7 @@ describe('SourceMapDebug', () => { ).toBeInTheDocument(); const expandedMessage = - 'The given abs_path of the stack frame is absValue which is not a valid URL. Please refer to the instructions in our docs guide for help with troubleshooting the issue.'; + 'The abs_path of the stack frame is absValue which is not a valid URL. Read our docs for troubleshooting help.'; expect( screen.queryByText(textWithMarkupMatcher(expandedMessage)) ).not.toBeInTheDocument();