From 1a6933ef0a9edcc3cb30764ccd0c914aec14cbe6 Mon Sep 17 00:00:00 2001 From: Kevin Caffrey Date: Fri, 29 Jan 2021 14:52:29 -0500 Subject: [PATCH] Revert "[RUMF-802] add support for capacitor app stack traces (#685)" This reverts commit af1931442d2bc8f2a1991a73b2881f9c65f1900d. --- packages/core/src/domain/tracekit.ts | 2 +- .../core/src/domain/tracekitParser.spec.ts | 20 ------------------- packages/core/test/capturedExceptions.ts | 5 ----- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/packages/core/src/domain/tracekit.ts b/packages/core/src/domain/tracekit.ts index 56d68ccf56..9bb6bbcdec 100644 --- a/packages/core/src/domain/tracekit.ts +++ b/packages/core/src/domain/tracekit.ts @@ -502,7 +502,7 @@ export const computeStackTrace = (function computeStackTraceWrapper() { // tslint:disable-next-line max-line-length const chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i // tslint:disable-next-line max-line-length - const gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i + const gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i // tslint:disable-next-line max-line-length const winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i diff --git a/packages/core/src/domain/tracekitParser.spec.ts b/packages/core/src/domain/tracekitParser.spec.ts index 3b2634d092..2df9903625 100644 --- a/packages/core/src/domain/tracekitParser.spec.ts +++ b/packages/core/src/domain/tracekitParser.spec.ts @@ -1151,24 +1151,4 @@ describe('Parser', () => { url: '[native code]', }) }) - - it('should parse iOS capacitor', () => { - const stackFrames = computeStackTrace(CapturedExceptions.IOS_CAPACITOR) - - expect(stackFrames.stack.length).toEqual(2) - expect(stackFrames.stack[0]).toEqual({ - args: [], - column: 99546, - func: '?', - line: 34, - url: 'capacitor://localhost/media/dist/bundle.js', - }) - expect(stackFrames.stack[1]).toEqual({ - args: [], - column: 47950, - func: 'r', - line: 34, - url: 'capacitor://localhost/media/dist/bundle.js', - }) - }) }) diff --git a/packages/core/test/capturedExceptions.ts b/packages/core/test/capturedExceptions.ts index 62ac4eb7e3..553a001fb3 100644 --- a/packages/core/test/capturedExceptions.ts +++ b/packages/core/test/capturedExceptions.ts @@ -440,8 +440,3 @@ value@index.android.bundle:29:2417 value@index.android.bundle:29:927 [native code]`, } - -export const IOS_CAPACITOR = { - stack: `capacitor://localhost/media/dist/bundle.js:34:99546 -r@capacitor://localhost/media/dist/bundle.js:34:47950`, -}