diff --git a/packages/browser/src/parsers.ts b/packages/browser/src/parsers.ts index 69a7ee755b7a..e7dc375ac014 100644 --- a/packages/browser/src/parsers.ts +++ b/packages/browser/src/parsers.ts @@ -1,7 +1,7 @@ import { Event, Exception, StackFrame } from '@sentry/types'; import { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils'; -import { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit'; +import { computeStackTrace, StackTrace as TraceKitStackTrace } from './tracekit'; const STACKTRACE_LIMIT = 50; @@ -80,15 +80,15 @@ export function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event { /** * @hidden */ -export function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] { - if (!stack || !stack.length) { +export function prepareFramesForEvent(stack: StackFrame[]): StackFrame[] { + if (!stack.length) { return []; } let localStack = stack; - const firstFrameFunction = localStack[0].func || ''; - const lastFrameFunction = localStack[localStack.length - 1].func || ''; + const firstFrameFunction = localStack[0].function || ''; + const lastFrameFunction = localStack[localStack.length - 1].function || ''; // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { @@ -103,14 +103,12 @@ export function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] // The frame where the crash happened, should be the last entry in the array return localStack .slice(0, STACKTRACE_LIMIT) - .map( - (frame: TraceKitStackFrame): StackFrame => ({ - colno: frame.column === null ? undefined : frame.column, - filename: frame.url || localStack[0].url, - function: frame.func || '?', - in_app: true, - lineno: frame.line === null ? undefined : frame.line, - }), - ) + .map(frame => ({ + filename: frame.filename || localStack[0].filename, + function: frame.function || '?', + lineno: frame.lineno, + colno: frame.colno, + in_app: true, + })) .reverse(); } diff --git a/packages/browser/src/tracekit.ts b/packages/browser/src/tracekit.ts index e91dc37ddc58..86dcdac850f3 100644 --- a/packages/browser/src/tracekit.ts +++ b/packages/browser/src/tracekit.ts @@ -1,3 +1,5 @@ +import { StackFrame } from '@sentry/types'; + /** * This was originally forked from https://github.com/occ/TraceKit, but has since been * largely modified and is now maintained as part of Sentry JS SDK. @@ -5,23 +7,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access, max-lines */ -/** - * An object representing a single stack frame. - * {Object} StackFrame - * {string} url The JavaScript or HTML file URL. - * {string} func The function name, or empty for anonymous functions (if guessing did not work). - * {string[]?} args The arguments passed to the function, if known. - * {number=} line The line number, if known. - * {number=} column The column number, if known. - * {string[]} context An array of source code lines; the middle element corresponds to the correct line#. - */ -export interface StackFrame { - url: string; - func: string; - line: number | null; - column: number | null; -} - /** * An object representing a JavaScript stack trace. * {Object} StackTrace @@ -32,9 +17,7 @@ export interface StackFrame { export interface StackTrace { name: string; message: string; - mechanism?: string; stack: StackFrame[]; - failed?: boolean; } // global reference to slice @@ -54,11 +37,13 @@ const geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; const chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108 const reactMinifiedRegexp = /Minified React error #\d+;/i; +const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; +const opera11Regex = + / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i; /** JSDoc */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types -export function computeStackTrace(ex: any): StackTrace { - let stack = null; +export function computeStackTrace(ex: Error & { framesToPop?: number; stacktrace?: string }): StackTrace { + let frames: StackFrame[] = []; let popSize = 0; if (ex) { @@ -70,50 +55,52 @@ export function computeStackTrace(ex: any): StackTrace { } try { - // This must be tried first because Opera 10 *destroys* - // its stacktrace property if you try to access the stack - // property first!! - stack = computeStackTraceFromStacktraceProp(ex); - if (stack) { - return popFrames(stack, popSize); - } + // Access and store the stacktrace property before doing ANYTHING + // else to it because Opera is not very good at providing it + // reliably in other circumstances. + const stacktrace = ex.stacktrace || ex.stack || ''; + + frames = parseFrames(stacktrace); } catch (e) { // no-empty } - try { - stack = computeStackTraceFromStackProp(ex); - if (stack) { - return popFrames(stack, popSize); - } - } catch (e) { - // no-empty + if (frames.length && popSize > 0) { + frames = frames.slice(popSize); } return { message: extractMessage(ex), name: ex && ex.name, - stack: [], - failed: true, + stack: frames, }; } /** JSDoc */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity -function computeStackTraceFromStackProp(ex: any): StackTrace | null { - if (!ex || !ex.stack) { - return null; - } - - const stack = []; - const lines = ex.stack.split('\n'); +// eslint-disable-next-line complexity +function parseFrames(stackString: string): StackFrame[] { + const frames: StackFrame[] = []; + const lines = stackString.split('\n'); let isEval; let submatch; let parts; - let element; + let element: StackFrame | undefined; for (const line of lines) { - if ((parts = chrome.exec(line))) { + if ((parts = opera10Regex.exec(line))) { + element = { + filename: parts[2], + function: parts[3] || UNKNOWN_FUNCTION, + lineno: +parts[1], + }; + } else if ((parts = opera11Regex.exec(line))) { + element = { + filename: parts[5], + function: parts[3] || parts[4] || UNKNOWN_FUNCTION, + lineno: +parts[1], + colno: +parts[2], + }; + } else if ((parts = chrome.exec(line))) { isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line if (isEval && (submatch = chromeEval.exec(parts[2]))) { // throw out eval line/column and use top-most line/column number @@ -124,20 +111,20 @@ function computeStackTraceFromStackProp(ex: any): StackTrace | null { // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable) - const [func, url] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]); + const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]); element = { - url, - func, - line: parts[3] ? +parts[3] : null, - column: parts[4] ? +parts[4] : null, + filename, + function: func, + lineno: parts[3] ? +parts[3] : undefined, + colno: parts[4] ? +parts[4] : undefined, }; } else if ((parts = winjs.exec(line))) { element = { - url: parts[2], - func: parts[1] || UNKNOWN_FUNCTION, - line: +parts[3], - column: parts[4] ? +parts[4] : null, + filename: parts[2], + function: parts[1] || UNKNOWN_FUNCTION, + lineno: +parts[3], + colno: parts[4] ? +parts[4] : undefined, }; } else if ((parts = gecko.exec(line))) { isEval = parts[3] && parts[3].indexOf(' > eval') > -1; @@ -149,86 +136,24 @@ function computeStackTraceFromStackProp(ex: any): StackTrace | null { parts[5] = ''; // no column when eval } - let url = parts[3]; + let filename = parts[3]; let func = parts[1] || UNKNOWN_FUNCTION; - [func, url] = extractSafariExtensionDetails(func, url); + [func, filename] = extractSafariExtensionDetails(func, filename); element = { - url, - func, - line: parts[4] ? +parts[4] : null, - column: parts[5] ? +parts[5] : null, + filename, + function: func, + lineno: parts[4] ? +parts[4] : undefined, + colno: parts[5] ? +parts[5] : undefined, }; } else { continue; } - stack.push(element); - } - - if (!stack.length) { - return null; + frames.push(element); } - return { - message: extractMessage(ex), - name: ex.name, - stack, - }; -} - -/** JSDoc */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function computeStackTraceFromStacktraceProp(ex: any): StackTrace | null { - if (!ex || !ex.stacktrace) { - return null; - } - // Access and store the stacktrace property before doing ANYTHING - // else to it because Opera is not very good at providing it - // reliably in other circumstances. - const stacktrace = ex.stacktrace; - const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; - const opera11Regex = - / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i; - const lines = stacktrace.split('\n'); - const stack = []; - let parts; - - for (let line = 0; line < lines.length; line += 2) { - let element = null; - if ((parts = opera10Regex.exec(lines[line]))) { - element = { - url: parts[2], - func: parts[3], - line: +parts[1], - column: null, - }; - } else if ((parts = opera11Regex.exec(lines[line]))) { - element = { - url: parts[5], - func: parts[3] || parts[4], - line: +parts[1], - column: +parts[2], - }; - } - - if (element) { - if (!element.func && element.line) { - element.func = UNKNOWN_FUNCTION; - } - stack.push(element); - } - } - - if (!stack.length) { - return null; - } - - return { - message: extractMessage(ex), - name: ex.name, - stack, - }; + return frames; } /** @@ -251,30 +176,18 @@ function computeStackTraceFromStacktraceProp(ex: any): StackTrace | null { * Unfortunatelly "just" changing RegExp is too complicated now and making it pass all tests * and fix this case seems like an impossible, or at least way too time-consuming task. */ -const extractSafariExtensionDetails = (func: string, url: string): [string, string] => { +const extractSafariExtensionDetails = (func: string, filename: string): [string, string] => { const isSafariExtension = func.indexOf('safari-extension') !== -1; const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1; return isSafariExtension || isSafariWebExtension ? [ func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION, - isSafariExtension ? `safari-extension:${url}` : `safari-web-extension:${url}`, + isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`, ] - : [func, url]; + : [func, filename]; }; -/** Remove N number of frames from the stack */ -function popFrames(stacktrace: StackTrace, popSize: number): StackTrace { - try { - return { - ...stacktrace, - stack: stacktrace.stack.slice(popSize), - }; - } catch (e) { - return stacktrace; - } -} - /** * There are cases where stacktrace.message is an Event object * https://github.com/getsentry/sentry-javascript/issues/1949 diff --git a/packages/browser/test/unit/parsers.test.ts b/packages/browser/test/unit/parsers.test.ts index 675ac19e62e7..475d720fd3d1 100644 --- a/packages/browser/test/unit/parsers.test.ts +++ b/packages/browser/test/unit/parsers.test.ts @@ -5,9 +5,9 @@ describe('Parsers', () => { describe('removed top frame if its internally reserved word (public API)', () => { it('reserved captureException', () => { const stack = [ - { context: ['x'], column: 1, line: 4, url: 'anything.js', func: 'captureException', args: [] }, - { context: ['x'], column: 1, line: 3, url: 'anything.js', func: 'foo', args: [] }, - { context: ['x'], column: 1, line: 2, url: 'anything.js', func: 'bar', args: [] }, + { colno: 1, lineno: 4, filename: 'anything.js', function: 'captureException' }, + { colno: 1, lineno: 3, filename: 'anything.js', function: 'foo' }, + { colno: 1, lineno: 2, filename: 'anything.js', function: 'bar' }, ]; // Should remove `captureException` as its a name considered "internal" @@ -20,9 +20,9 @@ describe('Parsers', () => { it('reserved captureMessage', () => { const stack = [ - { context: ['x'], column: 1, line: 4, url: 'anything.js', func: 'captureMessage', args: [] }, - { context: ['x'], column: 1, line: 3, url: 'anything.js', func: 'foo', args: [] }, - { context: ['x'], column: 1, line: 2, url: 'anything.js', func: 'bar', args: [] }, + { colno: 1, lineno: 4, filename: 'anything.js', function: 'captureMessage' }, + { colno: 1, lineno: 3, filename: 'anything.js', function: 'foo' }, + { colno: 1, lineno: 2, filename: 'anything.js', function: 'bar' }, ]; // Should remove `captureMessage` as its a name considered "internal" @@ -37,9 +37,9 @@ describe('Parsers', () => { describe('removed bottom frame if its internally reserved word (internal API)', () => { it('reserved sentryWrapped', () => { const stack = [ - { context: ['x'], column: 1, line: 3, url: 'anything.js', func: 'foo', args: [] }, - { context: ['x'], column: 1, line: 2, url: 'anything.js', func: 'bar', args: [] }, - { context: ['x'], column: 1, line: 1, url: 'anything.js', func: 'sentryWrapped', args: [] }, + { colno: 1, lineno: 3, filename: 'anything.js', function: 'foo' }, + { colno: 1, lineno: 2, filename: 'anything.js', function: 'bar' }, + { colno: 1, lineno: 1, filename: 'anything.js', function: 'sentryWrapped' }, ]; // Should remove `sentryWrapped` as its a name considered "internal" @@ -53,10 +53,10 @@ describe('Parsers', () => { it('removed top and bottom frame if they are internally reserved words', () => { const stack = [ - { context: ['x'], column: 1, line: 4, url: 'anything.js', func: 'captureMessage', args: [] }, - { context: ['x'], column: 1, line: 3, url: 'anything.js', func: 'foo', args: [] }, - { context: ['x'], column: 1, line: 2, url: 'anything.js', func: 'bar', args: [] }, - { context: ['x'], column: 1, line: 1, url: 'anything.js', func: 'sentryWrapped', args: [] }, + { colno: 1, lineno: 4, filename: 'anything.js', function: 'captureMessage' }, + { colno: 1, lineno: 3, filename: 'anything.js', function: 'foo' }, + { colno: 1, lineno: 2, filename: 'anything.js', function: 'bar' }, + { colno: 1, lineno: 1, filename: 'anything.js', function: 'sentryWrapped' }, ]; // Should remove `captureMessage` and `sentryWrapped` as its a name considered "internal" diff --git a/packages/browser/test/unit/tracekit/chromium.test.ts b/packages/browser/test/unit/tracekit/chromium.test.ts index 65555c4656b6..c35fbb6a2a96 100644 --- a/packages/browser/test/unit/tracekit/chromium.test.ts +++ b/packages/browser/test/unit/tracekit/chromium.test.ts @@ -8,7 +8,7 @@ describe('Tracekit - Chrome Tests', () => { expect(stackFrames).toEqual({ message: 'foo', name: 'bar', - stack: [{ url: 'native', func: 'Array.forEach', line: null, column: null }], + stack: [{ filename: 'native', function: 'Array.forEach' }], }); }); @@ -31,10 +31,10 @@ describe('Tracekit - Chrome Tests', () => { message: "Object # has no method 'undef'", name: 'foo', stack: [ - { url: 'http://path/to/file.js', func: 'bar', line: 13, column: 17 }, - { url: 'http://path/to/file.js', func: 'bar', line: 16, column: 5 }, - { url: 'http://path/to/file.js', func: 'foo', line: 20, column: 5 }, - { url: 'http://path/to/file.js', func: '?', line: 24, column: 4 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 13, colno: 17 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 16, colno: 5 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 20, colno: 5 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 24, colno: 4 }, ], }); }); @@ -56,13 +56,13 @@ describe('Tracekit - Chrome Tests', () => { message: 'Default error', name: 'Error', stack: [ - { url: 'http://localhost:8080/file.js', func: 'dumpExceptionError', line: 41, column: 27 }, - { url: 'http://localhost:8080/file.js', func: 'HTMLButtonElement.onclick', line: 107, column: 146 }, + { filename: 'http://localhost:8080/file.js', function: 'dumpExceptionError', lineno: 41, colno: 27 }, + { filename: 'http://localhost:8080/file.js', function: 'HTMLButtonElement.onclick', lineno: 107, colno: 146 }, { - url: 'http://localhost:8080/file.js', - func: 'I.e.fn.(anonymous function) [as index]', - line: 10, - column: 3651, + filename: 'http://localhost:8080/file.js', + function: 'I.e.fn.(anonymous function) [as index]', + lineno: 10, + colno: 3651, }, ], }); @@ -87,19 +87,29 @@ describe('Tracekit - Chrome Tests', () => { message: "Cannot read property 'error' of undefined", name: 'TypeError', stack: [ - { url: 'webpack:///./src/components/test/test.jsx?', func: 'TESTTESTTEST.eval', line: 295, column: 108 }, - { url: 'webpack:///./src/components/test/test.jsx?', func: 'TESTTESTTEST.render', line: 272, column: 32 }, { - url: 'webpack:///./~/react-transform-catch-errors/lib/index.js?', - func: 'TESTTESTTEST.tryRender', - line: 34, - column: 31, + filename: 'webpack:///./src/components/test/test.jsx?', + function: 'TESTTESTTEST.eval', + lineno: 295, + colno: 108, }, { - url: 'webpack:///./~/react-proxy/modules/createPrototypeProxy.js?', - func: 'TESTTESTTEST.proxiedMethod', - line: 44, - column: 30, + filename: 'webpack:///./src/components/test/test.jsx?', + function: 'TESTTESTTEST.render', + lineno: 272, + colno: 32, + }, + { + filename: 'webpack:///./~/react-transform-catch-errors/lib/index.js?', + function: 'TESTTESTTEST.tryRender', + lineno: 34, + colno: 31, + }, + { + filename: 'webpack:///./~/react-proxy/modules/createPrototypeProxy.js?', + function: 'TESTTESTTEST.proxiedMethod', + lineno: 44, + colno: 30, }, ], }); @@ -124,11 +134,11 @@ describe('Tracekit - Chrome Tests', () => { message: 'message string', name: 'Error', stack: [ - { url: 'http://localhost:8080/file.js', func: 'baz', line: 21, column: 17 }, - { url: 'http://localhost:8080/file.js', func: 'foo', line: 21, column: 17 }, - { url: 'http://localhost:8080/file.js', func: 'eval', line: 21, column: 17 }, - { url: 'http://localhost:8080/file.js', func: 'Object.speak', line: 21, column: 17 }, - { url: 'http://localhost:8080/file.js', func: '?', line: 31, column: 13 }, + { filename: 'http://localhost:8080/file.js', function: 'baz', lineno: 21, colno: 17 }, + { filename: 'http://localhost:8080/file.js', function: 'foo', lineno: 21, colno: 17 }, + { filename: 'http://localhost:8080/file.js', function: 'eval', lineno: 21, colno: 17 }, + { filename: 'http://localhost:8080/file.js', function: 'Object.speak', lineno: 21, colno: 17 }, + { filename: 'http://localhost:8080/file.js', function: '?', lineno: 31, colno: 13 }, ], }); }); @@ -154,42 +164,42 @@ describe('Tracekit - Chrome Tests', () => { message: 'Error: test', name: 'Error', stack: [ - { url: 'native', func: 'Error', line: null, column: null }, + { filename: 'native', function: 'Error' }, { - url: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', - func: 's', - line: 31, - column: 29146, + filename: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', + function: 's', + lineno: 31, + colno: 29146, }, { - url: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', - func: 'Object.d [as add]', - line: 31, - column: 30039, + filename: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', + function: 'Object.d [as add]', + lineno: 31, + colno: 30039, }, { - url: 'blob:http%3A//localhost%3A8080/d4eefe0f-361a-4682-b217-76587d9f712a', - func: '?', - line: 15, - column: 10978, + filename: 'blob:http%3A//localhost%3A8080/d4eefe0f-361a-4682-b217-76587d9f712a', + function: '?', + lineno: 15, + colno: 10978, }, { - url: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', - func: '?', - line: 1, - column: 6911, + filename: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', + function: '?', + lineno: 1, + colno: 6911, }, { - url: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', - func: 'n.fire', - line: 7, - column: 3019, + filename: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', + function: 'n.fire', + lineno: 7, + colno: 3019, }, { - url: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', - func: 'n.handle', - line: 7, - column: 2863, + filename: 'blob:http%3A//localhost%3A8080/abfc40e9-4742-44ed-9dcd-af8f99a29379', + function: 'n.handle', + lineno: 7, + colno: 2863, }, ], }); @@ -209,7 +219,12 @@ describe('Tracekit - Chrome Tests', () => { message: 'message string', name: 'Error', stack: [ - { url: 'examplescheme://examplehost/cd351f7250857e22ceaa.worker.js', func: '?', line: 70179, column: 15 }, + { + filename: 'examplescheme://examplehost/cd351f7250857e22ceaa.worker.js', + function: '?', + lineno: 70179, + colno: 15, + }, ], }); }); @@ -231,10 +246,10 @@ describe('Tracekit - Chrome Tests', () => { message: 'test', name: 'Error', stack: [ - { url: 'http://localhost:5000/test', func: 'fooIterator', line: 20, column: 17 }, - { url: '', func: 'Array.map', line: null, column: null }, - { url: 'http://localhost:5000/test', func: 'foo', line: 19, column: 19 }, - { url: 'http://localhost:5000/test', func: '?', line: 24, column: 7 }, + { filename: 'http://localhost:5000/test', function: 'fooIterator', lineno: 20, colno: 17 }, + { filename: '', function: 'Array.map' }, + { filename: 'http://localhost:5000/test', function: 'foo', lineno: 19, colno: 19 }, + { filename: 'http://localhost:5000/test', function: '?', lineno: 24, colno: 7 }, ], }); }); @@ -262,16 +277,16 @@ describe('Tracekit - Chrome Tests', () => { message: 'bad', name: 'Error', stack: [ - { url: 'http://localhost:5000/', func: 'Object.aha', line: 19, column: 13 }, - { url: 'http://localhost:5000/', func: 'callAnotherThing', line: 20, column: 16 }, - { url: 'http://localhost:5000/', func: 'Object.callback', line: 25, column: 7 }, - { url: 'http://localhost:5000/', func: '?', line: 34, column: 17 }, - { url: '', func: 'Array.map', line: null, column: null }, - { url: 'http://localhost:5000/', func: 'test', line: 33, column: 23 }, - { url: 'http://localhost:5000/', func: 'eval', line: 37, column: 5 }, - { url: 'http://localhost:5000/', func: 'aha', line: 39, column: 5 }, - { url: 'http://localhost:5000/', func: 'Foo.testMethod', line: 44, column: 7 }, - { url: 'http://localhost:5000/', func: '?', line: 50, column: 19 }, + { filename: 'http://localhost:5000/', function: 'Object.aha', lineno: 19, colno: 13 }, + { filename: 'http://localhost:5000/', function: 'callAnotherThing', lineno: 20, colno: 16 }, + { filename: 'http://localhost:5000/', function: 'Object.callback', lineno: 25, colno: 7 }, + { filename: 'http://localhost:5000/', function: '?', lineno: 34, colno: 17 }, + { filename: '', function: 'Array.map' }, + { filename: 'http://localhost:5000/', function: 'test', lineno: 33, colno: 23 }, + { filename: 'http://localhost:5000/', function: 'eval', lineno: 37, colno: 5 }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 39, colno: 5 }, + { filename: 'http://localhost:5000/', function: 'Foo.testMethod', lineno: 44, colno: 7 }, + { filename: 'http://localhost:5000/', function: '?', lineno: 50, colno: 19 }, ], }); }); @@ -293,10 +308,10 @@ describe('Tracekit - Chrome Tests', () => { message: 'test', name: 'Error', stack: [ - { url: 'http://localhost:5000/test', func: 'fooIterator', line: 20, column: 11 }, - { url: 'native code', func: 'Array.prototype.map', line: null, column: null }, - { url: 'http://localhost:5000/test', func: 'foo', line: 19, column: 9 }, - { url: 'http://localhost:5000/test', func: 'Global code', line: 24, column: 7 }, + { filename: 'http://localhost:5000/test', function: 'fooIterator', lineno: 20, colno: 11 }, + { filename: 'native code', function: 'Array.prototype.map' }, + { filename: 'http://localhost:5000/test', function: 'foo', lineno: 19, colno: 9 }, + { filename: 'http://localhost:5000/test', function: 'Global code', lineno: 24, colno: 7 }, ], }); }); @@ -324,16 +339,16 @@ describe('Tracekit - Chrome Tests', () => { message: 'aha', name: 'Error', stack: [ - { url: 'http://localhost:5000/', func: 'aha', line: 19, column: 7 }, - { url: 'http://localhost:5000/', func: 'callAnotherThing', line: 18, column: 6 }, - { url: 'http://localhost:5000/', func: 'callback', line: 25, column: 7 }, - { url: 'http://localhost:5000/', func: 'Anonymous function', line: 34, column: 7 }, - { url: 'native code', func: 'Array.prototype.map', line: null, column: null }, - { url: 'http://localhost:5000/', func: 'test', line: 33, column: 5 }, - { url: 'eval code', func: 'eval code', line: 1, column: 1 }, - { url: 'http://localhost:5000/', func: 'aha', line: 39, column: 5 }, - { url: 'http://localhost:5000/', func: 'Foo.prototype.testMethod', line: 44, column: 7 }, - { url: 'http://localhost:5000/', func: 'Anonymous function', line: 50, column: 8 }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 19, colno: 7 }, + { filename: 'http://localhost:5000/', function: 'callAnotherThing', lineno: 18, colno: 6 }, + { filename: 'http://localhost:5000/', function: 'callback', lineno: 25, colno: 7 }, + { filename: 'http://localhost:5000/', function: 'Anonymous function', lineno: 34, colno: 7 }, + { filename: 'native code', function: 'Array.prototype.map' }, + { filename: 'http://localhost:5000/', function: 'test', lineno: 33, colno: 5 }, + { filename: 'eval code', function: 'eval code', lineno: 1, colno: 1 }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 39, colno: 5 }, + { filename: 'http://localhost:5000/', function: 'Foo.prototype.testMethod', lineno: 44, colno: 7 }, + { filename: 'http://localhost:5000/', function: 'Anonymous function', lineno: 50, colno: 8 }, ], }); }); @@ -351,7 +366,14 @@ describe('Tracekit - Chrome Tests', () => { expect(stacktrace).toEqual({ message: "Cannot read property 'error' of undefined", name: 'TypeError', - stack: [{ url: 'C:\\Users\\user\\path\\to\\file.js', func: 'TESTTESTTEST.someMethod', line: 295, column: 108 }], + stack: [ + { + filename: 'C:\\Users\\user\\path\\to\\file.js', + function: 'TESTTESTTEST.someMethod', + lineno: 295, + colno: 108, + }, + ], }); }); }); diff --git a/packages/browser/test/unit/tracekit/firefox.test.ts b/packages/browser/test/unit/tracekit/firefox.test.ts index 03414c66da3a..21a80d9a0d4e 100644 --- a/packages/browser/test/unit/tracekit/firefox.test.ts +++ b/packages/browser/test/unit/tracekit/firefox.test.ts @@ -24,13 +24,17 @@ describe('Tracekit - Firefox Tests', () => { message: 'this.undef is not a function', name: 'TypeError', stack: [ - { url: 'http://127.0.0.1:8000/js/stacktrace.js', func: '?', line: 44, column: null }, - { url: 'http://127.0.0.1:8000/js/stacktrace.js', func: '?', line: 31, column: null }, - { url: 'http://127.0.0.1:8000/js/stacktrace.js', func: 'printStackTrace', line: 18, column: null }, - { url: 'http://127.0.0.1:8000/js/file.js', func: 'bar', line: 13, column: null }, - { url: 'http://127.0.0.1:8000/js/file.js', func: 'bar', line: 16, column: null }, - { url: 'http://127.0.0.1:8000/js/file.js', func: 'foo', line: 20, column: null }, - { url: 'http://127.0.0.1:8000/js/file.js', func: '?', line: 24, column: null }, + { filename: 'http://127.0.0.1:8000/js/stacktrace.js', function: '?', lineno: 44 }, + { filename: 'http://127.0.0.1:8000/js/stacktrace.js', function: '?', lineno: 31 }, + { + filename: 'http://127.0.0.1:8000/js/stacktrace.js', + function: 'printStackTrace', + lineno: 18, + }, + { filename: 'http://127.0.0.1:8000/js/file.js', function: 'bar', lineno: 13 }, + { filename: 'http://127.0.0.1:8000/js/file.js', function: 'bar', lineno: 16 }, + { filename: 'http://127.0.0.1:8000/js/file.js', function: 'foo', lineno: 20 }, + { filename: 'http://127.0.0.1:8000/js/file.js', function: '?', lineno: 24 }, ], }); }); @@ -58,13 +62,13 @@ describe('Tracekit - Firefox Tests', () => { message: 'bar', name: 'foo', stack: [ - { url: 'file:///G:/js/stacktrace.js', func: '?', line: 44, column: null }, - { url: 'file:///G:/js/stacktrace.js', func: '?', line: 31, column: null }, - { url: 'file:///G:/js/stacktrace.js', func: 'printStackTrace', line: 18, column: null }, - { url: 'file:///G:/js/file.js', func: 'bar', line: 13, column: null }, - { url: 'file:///G:/js/file.js', func: 'bar', line: 16, column: null }, - { url: 'file:///G:/js/file.js', func: 'foo', line: 20, column: null }, - { url: 'file:///G:/js/file.js', func: '?', line: 24, column: null }, + { filename: 'file:///G:/js/stacktrace.js', function: '?', lineno: 44 }, + { filename: 'file:///G:/js/stacktrace.js', function: '?', lineno: 31 }, + { filename: 'file:///G:/js/stacktrace.js', function: 'printStackTrace', lineno: 18 }, + { filename: 'file:///G:/js/file.js', function: 'bar', lineno: 13 }, + { filename: 'file:///G:/js/file.js', function: 'bar', lineno: 16 }, + { filename: 'file:///G:/js/file.js', function: 'foo', lineno: 20 }, + { filename: 'file:///G:/js/file.js', function: '?', lineno: 24 }, ], }); }); @@ -88,9 +92,9 @@ describe('Tracekit - Firefox Tests', () => { message: 'x is null', name: 'foo', stack: [ - { url: 'http://path/to/file.js', func: '?', line: 48, column: null }, - { url: 'http://path/to/file.js', func: 'dumpException3', line: 52, column: null }, - { url: 'http://path/to/file.js', func: 'onclick', line: 1, column: null }, + { filename: 'http://path/to/file.js', function: '?', lineno: 48 }, + { filename: 'http://path/to/file.js', function: 'dumpException3', lineno: 52 }, + { filename: 'http://path/to/file.js', function: 'onclick', lineno: 1 }, ], }); }); @@ -115,9 +119,9 @@ describe('Tracekit - Firefox Tests', () => { message: 'Default error', name: 'Error', stack: [ - { url: 'http://path/to/file.js', func: 'foo', line: 41, column: 13 }, - { url: 'http://path/to/file.js', func: 'bar', line: 1, column: 1 }, - { url: 'http://path/to/file.js', func: '.plugin/e.fn[c]/<', line: 1, column: 1 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 41, colno: 13 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 1, colno: 1 }, + { filename: 'http://path/to/file.js', function: '.plugin/e.fn[c]/<', lineno: 1, colno: 1 }, ], }); }); @@ -148,10 +152,10 @@ describe('Tracekit - Firefox Tests', () => { message: 'No error message', name: 'NS_ERROR_FAILURE', stack: [ - { url: 'http://path/to/file.js', func: '[2] { message: 'this.props.raw[this.state.dataSource].rows is undefined', name: 'TypeError', stack: [ - { url: 'resource://path/data/content/bundle.js', func: 'render', line: 5529, column: 16 }, - { url: 'resource://path/data/content/vendor.bundle.js', func: 'dispatchEvent', line: 18, column: 23028 }, - { url: 'resource://path/data/content/bundle.js', func: 'wrapped', line: 7270, column: 25 }, + { filename: 'resource://path/data/content/bundle.js', function: 'render', lineno: 5529, colno: 16 }, + { + filename: 'resource://path/data/content/vendor.bundle.js', + function: 'dispatchEvent', + lineno: 18, + colno: 23028, + }, + { filename: 'resource://path/data/content/bundle.js', function: 'wrapped', lineno: 7270, colno: 25 }, ], }); }); @@ -203,11 +212,11 @@ describe('Tracekit - Firefox Tests', () => { message: 'message string', name: 'foo', stack: [ - { url: 'http://localhost:8080/file.js', func: 'baz', line: 26, column: null }, - { url: 'http://localhost:8080/file.js', func: 'foo', line: 26, column: null }, - { url: 'http://localhost:8080/file.js', func: 'eval', line: 26, column: null }, - { url: 'http://localhost:8080/file.js', func: 'speak', line: 26, column: 17 }, - { url: 'http://localhost:8080/file.js', func: '?', line: 33, column: 9 }, + { filename: 'http://localhost:8080/file.js', function: 'baz', lineno: 26 }, + { filename: 'http://localhost:8080/file.js', function: 'foo', lineno: 26 }, + { filename: 'http://localhost:8080/file.js', function: 'eval', lineno: 26 }, + { filename: 'http://localhost:8080/file.js', function: 'speak', lineno: 26, colno: 17 }, + { filename: 'http://localhost:8080/file.js', function: '?', lineno: 33, colno: 9 }, ], }); }); @@ -227,9 +236,9 @@ describe('Tracekit - Firefox Tests', () => { message: 'test', name: 'Error', stack: [ - { url: 'http://localhost:5000/test', func: 'fooIterator', line: 20, column: 17 }, - { url: 'http://localhost:5000/test', func: 'foo', line: 19, column: 19 }, - { url: 'http://localhost:5000/test', func: '?', line: 24, column: 7 }, + { filename: 'http://localhost:5000/test', function: 'fooIterator', lineno: 20, colno: 17 }, + { filename: 'http://localhost:5000/test', function: 'foo', lineno: 19, colno: 19 }, + { filename: 'http://localhost:5000/test', function: '?', lineno: 24, colno: 7 }, ], }); }); @@ -255,15 +264,15 @@ describe('Tracekit - Firefox Tests', () => { message: 'aha', name: 'Error', stack: [ - { url: 'http://localhost:5000/', func: 'aha', line: 19, column: 13 }, - { url: 'http://localhost:5000/', func: 'callAnotherThing', line: 20, column: 15 }, - { url: 'http://localhost:5000/', func: 'callback', line: 25, column: 7 }, - { url: 'http://localhost:5000/', func: 'test/<', line: 34, column: 7 }, - { url: 'http://localhost:5000/', func: 'test', line: 33, column: 23 }, - { url: 'http://localhost:5000/', func: 'eval', line: 39, column: null }, - { url: 'http://localhost:5000/', func: 'aha', line: 39, column: 5 }, - { url: 'http://localhost:5000/', func: 'testMethod', line: 44, column: 7 }, - { url: 'http://localhost:5000/', func: '?', line: 50, column: 19 }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 19, colno: 13 }, + { filename: 'http://localhost:5000/', function: 'callAnotherThing', lineno: 20, colno: 15 }, + { filename: 'http://localhost:5000/', function: 'callback', lineno: 25, colno: 7 }, + { filename: 'http://localhost:5000/', function: 'test/<', lineno: 34, colno: 7 }, + { filename: 'http://localhost:5000/', function: 'test', lineno: 33, colno: 23 }, + { filename: 'http://localhost:5000/', function: 'eval', lineno: 39 }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 39, colno: 5 }, + { filename: 'http://localhost:5000/', function: 'testMethod', lineno: 44, colno: 7 }, + { filename: 'http://localhost:5000/', function: '?', lineno: 50, colno: 19 }, ], }); }); diff --git a/packages/browser/test/unit/tracekit/ie.test.ts b/packages/browser/test/unit/tracekit/ie.test.ts index 7d016802175d..f746335d9cb3 100644 --- a/packages/browser/test/unit/tracekit/ie.test.ts +++ b/packages/browser/test/unit/tracekit/ie.test.ts @@ -21,9 +21,9 @@ describe('Tracekit - IE Tests', () => { message: "Unable to get property 'undef' of undefined or null reference", name: 'foo', stack: [ - { url: 'http://path/to/file.js', func: 'Anonymous function', line: 48, column: 13 }, - { url: 'http://path/to/file.js', func: 'foo', line: 46, column: 9 }, - { url: 'http://path/to/file.js', func: 'bar', line: 82, column: 1 }, + { filename: 'http://path/to/file.js', function: 'Anonymous function', lineno: 48, colno: 13 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 46, colno: 9 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 82, colno: 1 }, ], }); }); @@ -48,9 +48,9 @@ describe('Tracekit - IE Tests', () => { message: "Unable to get property 'undef' of undefined or null reference", name: 'TypeError', stack: [ - { url: 'http://path/to/file.js', func: 'Anonymous function', line: 47, column: 21 }, - { url: 'http://path/to/file.js', func: 'foo', line: 45, column: 13 }, - { url: 'http://path/to/file.js', func: 'bar', line: 108, column: 1 }, + { filename: 'http://path/to/file.js', function: 'Anonymous function', lineno: 47, colno: 21 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 45, colno: 13 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 108, colno: 1 }, ], }); }); @@ -74,9 +74,9 @@ describe('Tracekit - IE Tests', () => { message: "'getExceptionProps' is undefined", name: 'ReferenceError', stack: [ - { url: 'eval code', func: 'eval code', line: 1, column: 1 }, - { url: 'http://path/to/file.js', func: 'foo', line: 58, column: 17 }, - { url: 'http://path/to/file.js', func: 'bar', line: 109, column: 1 }, + { filename: 'eval code', function: 'eval code', lineno: 1, colno: 1 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 58, colno: 17 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 109, colno: 1 }, ], }); }); diff --git a/packages/browser/test/unit/tracekit/misc.test.ts b/packages/browser/test/unit/tracekit/misc.test.ts index 0ec51e94c26a..91038d014e64 100644 --- a/packages/browser/test/unit/tracekit/misc.test.ts +++ b/packages/browser/test/unit/tracekit/misc.test.ts @@ -17,9 +17,9 @@ describe('Tracekit - Misc Tests', () => { message: 'bar', name: 'foo', stack: [ - { url: 'file:///path/to/file.js', func: '?', line: 878, column: null }, - { url: 'http://path/to/file.js', func: 'foo', line: 4283, column: null }, - { url: 'http://path/to/file.js', func: '?', line: 4287, column: null }, + { filename: 'file:///path/to/file.js', function: '?', lineno: 878 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 4283 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 4287 }, ], }); }); diff --git a/packages/browser/test/unit/tracekit/opera.test.ts b/packages/browser/test/unit/tracekit/opera.test.ts index 5df2ba4a78ae..7d86bb68909c 100644 --- a/packages/browser/test/unit/tracekit/opera.test.ts +++ b/packages/browser/test/unit/tracekit/opera.test.ts @@ -30,13 +30,13 @@ describe('Tracekit - Opera Tests', () => { message: 'Statement on line 42: Type mismatch (usually non-object value supplied where object required)', name: 'foo', stack: [ - { url: 'http://path/to/file.js', func: '?', line: 42, column: null }, - { url: 'http://path/to/file.js', func: '?', line: 27, column: null }, - { url: 'http://path/to/file.js', func: 'printStackTrace', line: 18, column: null }, - { url: 'http://path/to/file.js', func: 'bar', line: 4, column: null }, - { url: 'http://path/to/file.js', func: 'bar', line: 7, column: null }, - { url: 'http://path/to/file.js', func: 'foo', line: 11, column: null }, - { url: 'http://path/to/file.js', func: '?', line: 15, column: null }, + { filename: 'http://path/to/file.js', function: '?', lineno: 42 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 27 }, + { filename: 'http://path/to/file.js', function: 'printStackTrace', lineno: 18 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 4 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 7 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 11 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 15 }, ], }); }); @@ -74,13 +74,13 @@ describe('Tracekit - Opera Tests', () => { message: "'this.undef' is not a function", name: 'foo', stack: [ - { url: 'http://path/to/file.js', func: 'createException', line: 42, column: 12 }, - { url: 'http://path/to/file.js', func: 'run', line: 27, column: 8 }, - { url: 'http://path/to/file.js', func: 'printStackTrace', line: 18, column: 4 }, - { url: 'http://path/to/file.js', func: 'bar', line: 4, column: 5 }, - { url: 'http://path/to/file.js', func: 'bar', line: 7, column: 4 }, - { url: 'http://path/to/file.js', func: 'foo', line: 11, column: 4 }, - { url: 'http://path/to/file.js', func: '?', line: 15, column: 3 }, + { filename: 'http://path/to/file.js', function: 'createException', lineno: 42, colno: 12 }, + { filename: 'http://path/to/file.js', function: 'run', lineno: 27, colno: 8 }, + { filename: 'http://path/to/file.js', function: 'printStackTrace', lineno: 18, colno: 4 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 4, colno: 5 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 7, colno: 4 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 11, colno: 4 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 15, colno: 3 }, ], }); }); @@ -109,9 +109,14 @@ describe('Tracekit - Opera Tests', () => { message: "Cannot convert 'x' to object", name: 'foo', stack: [ - { url: 'http://localhost:8000/ExceptionLab.html', func: '', line: 48, column: 12 }, - { url: 'http://localhost:8000/ExceptionLab.html', func: 'dumpException3', line: 46, column: 8 }, - { url: 'http://localhost:8000/ExceptionLab.html', func: '', line: 1, column: 0 }, + { + filename: 'http://localhost:8000/ExceptionLab.html', + function: '', + lineno: 48, + colno: 12, + }, + { filename: 'http://localhost:8000/ExceptionLab.html', function: 'dumpException3', lineno: 46, colno: 8 }, + { filename: 'http://localhost:8000/ExceptionLab.html', function: '', lineno: 1, colno: 0 }, ], }); }); @@ -133,9 +138,9 @@ describe('Tracekit - Opera Tests', () => { message: "Cannot read property 'undef' of null", name: 'TypeError', stack: [ - { url: 'http://path/to/file.js', func: '?', line: 47, column: 22 }, - { url: 'http://path/to/file.js', func: 'foo', line: 52, column: 15 }, - { url: 'http://path/to/file.js', func: 'bar', line: 108, column: 168 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 47, colno: 22 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 52, colno: 15 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 108, colno: 168 }, ], }); }); diff --git a/packages/browser/test/unit/tracekit/react-native.test.ts b/packages/browser/test/unit/tracekit/react-native.test.ts index eb8ed1d521ab..89ae3c430ca1 100644 --- a/packages/browser/test/unit/tracekit/react-native.test.ts +++ b/packages/browser/test/unit/tracekit/react-native.test.ts @@ -20,13 +20,13 @@ describe('Tracekit - React Native Tests', () => { message: 'Manually triggered crash to test Sentry reporting', name: 'Error', stack: [ - { url: 'index.android.bundle', func: 'Object.onPress', line: 2342, column: 3773 }, - { url: 'index.android.bundle', func: 's.touchableHandlePress', line: 214, column: 2048 }, - { url: 'index.android.bundle', func: 's._performSideEffectsForTransition', line: 198, column: 9608 }, - { url: 'index.android.bundle', func: 's._receiveSignal', line: 198, column: 8309 }, - { url: 'index.android.bundle', func: 's.touchableHandleResponderRelease', line: 198, column: 5615 }, - { url: 'index.android.bundle', func: 'Object.y', line: 93, column: 571 }, - { url: 'index.android.bundle', func: 'P', line: 93, column: 714 }, + { filename: 'index.android.bundle', function: 'Object.onPress', lineno: 2342, colno: 3773 }, + { filename: 'index.android.bundle', function: 's.touchableHandlePress', lineno: 214, colno: 2048 }, + { filename: 'index.android.bundle', function: 's._performSideEffectsForTransition', lineno: 198, colno: 9608 }, + { filename: 'index.android.bundle', function: 's._receiveSignal', lineno: 198, colno: 8309 }, + { filename: 'index.android.bundle', function: 's.touchableHandleResponderRelease', lineno: 198, colno: 5615 }, + { filename: 'index.android.bundle', function: 'Object.y', lineno: 93, colno: 571 }, + { filename: 'index.android.bundle', function: 'P', lineno: 93, colno: 714 }, ], }); }); @@ -48,30 +48,34 @@ describe('Tracekit - React Native Tests', () => { name: 'Error', stack: [ { - url: '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', - func: 'onPress', - line: 595, - column: 658, + filename: + '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', + function: 'onPress', + lineno: 595, + colno: 658, }, { - url: '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', - func: 'value', - line: 221, - column: 7656, + filename: + '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', + function: 'value', + lineno: 221, + colno: 7656, }, { - url: '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', - func: 'onResponderRelease', - line: 221, - column: 5666, + filename: + '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', + function: 'onResponderRelease', + lineno: 221, + colno: 5666, }, { - url: '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', - func: 'p', - line: 96, - column: 385, + filename: + '/data/user/0/com.sentrytest/files/.expo-internal/bundle-613EDD44F3305B9D75D4679663900F2BCDDDC326F247CA3202A3A4219FD412D3', + function: 'p', + lineno: 96, + colno: 385, }, - { url: '[native code]', func: 'forEach', line: null, column: null }, + { filename: '[native code]', function: 'forEach' }, ], }); }); @@ -99,52 +103,59 @@ describe('Tracekit - React Native Tests', () => { name: 'Error', stack: [ { - url: '/home/username/sample-workspace/sampleapp.collect.react/src/components/GpsMonitorScene.js', - func: 'render', - line: 78, - column: 24, + filename: '/home/username/sample-workspace/sampleapp.collect.react/src/components/GpsMonitorScene.js', + function: 'render', + lineno: 78, + colno: 24, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', - func: '_renderValidatedComponentWithoutOwnerOrContext', - line: 1050, - column: 29, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', + function: '_renderValidatedComponentWithoutOwnerOrContext', + lineno: 1050, + colno: 29, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', - func: '_renderValidatedComponent', - line: 1075, - column: 15, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', + function: '_renderValidatedComponent', + lineno: 1075, + colno: 15, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', - func: 'renderedElement', - line: 484, - column: 29, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', + function: 'renderedElement', + lineno: 484, + colno: 29, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', - func: '_currentElement', - line: 346, - column: 40, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js', + function: '_currentElement', + lineno: 346, + colno: 40, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactReconciler.js', - func: 'child', - line: 68, - column: 25, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactReconciler.js', + function: 'child', + lineno: 68, + colno: 25, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactMultiChild.js', - func: 'children', - line: 264, - column: 10, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactMultiChild.js', + function: 'children', + lineno: 264, + colno: 10, }, { - url: '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeBaseComponent.js', - func: 'this', - line: 74, - column: 41, + filename: + '/home/username/sample-workspace/sampleapp.collect.react/node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeBaseComponent.js', + function: 'this', + lineno: 74, + colno: 41, }, ], }); @@ -200,43 +211,48 @@ describe('Tracekit - React Native Tests', () => { message: 'Error: test', name: 'Error', stack: [ - { url: 'index.android.bundle', func: 'value', line: 12, column: 1917 }, - { url: 'index.android.bundle', func: 'onPress', line: 12, column: 2336 }, - { url: 'index.android.bundle', func: 'touchableHandlePress', line: 258, column: 1497 }, - { url: '[native code]', func: '?', line: null, column: null }, - { url: 'index.android.bundle', func: '_performSideEffectsForTransition', line: 252, column: 8508 }, - { url: '[native code]', func: '?', line: null, column: null }, - { url: 'index.android.bundle', func: '_receiveSignal', line: 252, column: 7291 }, - { url: '[native code]', func: '?', line: null, column: null }, - { url: 'index.android.bundle', func: 'touchableHandleResponderRelease', line: 252, column: 4735 }, - { url: '[native code]', func: '?', line: null, column: null }, - { url: 'index.android.bundle', func: 'u', line: 79, column: 142 }, - { url: 'index.android.bundle', func: 'invokeGuardedCallback', line: 79, column: 459 }, - { url: 'index.android.bundle', func: 'invokeGuardedCallbackAndCatchFirstError', line: 79, column: 580 }, - { url: 'index.android.bundle', func: 'c', line: 95, column: 365 }, - { url: 'index.android.bundle', func: 'a', line: 95, column: 567 }, - { url: 'index.android.bundle', func: 'v', line: 146, column: 501 }, - { url: 'index.android.bundle', func: 'g', line: 146, column: 604 }, - { url: '[native code]', func: 'forEach', line: null, column: null }, - { url: 'index.android.bundle', func: 'i', line: 149, column: 80 }, - { url: 'index.android.bundle', func: 'processEventQueue', line: 146, column: 1432 }, - { url: 'index.android.bundle', func: 's', line: 157, column: 88 }, - { url: 'index.android.bundle', func: 'handleTopLevel', line: 157, column: 174 }, - { url: 'index.android.bundle', func: '?', line: 156, column: 572 }, - { url: 'index.android.bundle', func: 'a', line: 93, column: 276 }, - { url: 'index.android.bundle', func: 'c', line: 93, column: 60 }, - { url: 'index.android.bundle', func: 'perform', line: 177, column: 596 }, - { url: 'index.android.bundle', func: 'batchedUpdates', line: 188, column: 464 }, - { url: 'index.android.bundle', func: 'i', line: 176, column: 358 }, - { url: 'index.android.bundle', func: 'i', line: 93, column: 90 }, - { url: 'index.android.bundle', func: 'u', line: 93, column: 150 }, - { url: 'index.android.bundle', func: '_receiveRootNodeIDEvent', line: 156, column: 544 }, - { url: 'index.android.bundle', func: 'receiveTouches', line: 156, column: 918 }, - { url: 'index.android.bundle', func: 'value', line: 29, column: 3016 }, - { url: 'index.android.bundle', func: '?', line: 29, column: 955 }, - { url: 'index.android.bundle', func: 'value', line: 29, column: 2417 }, - { url: 'index.android.bundle', func: 'value', line: 29, column: 927 }, - { url: '[native code]', func: '?', line: null, column: null }, + { filename: 'index.android.bundle', function: 'value', lineno: 12, colno: 1917 }, + { filename: 'index.android.bundle', function: 'onPress', lineno: 12, colno: 2336 }, + { filename: 'index.android.bundle', function: 'touchableHandlePress', lineno: 258, colno: 1497 }, + { filename: '[native code]', function: '?' }, + { filename: 'index.android.bundle', function: '_performSideEffectsForTransition', lineno: 252, colno: 8508 }, + { filename: '[native code]', function: '?' }, + { filename: 'index.android.bundle', function: '_receiveSignal', lineno: 252, colno: 7291 }, + { filename: '[native code]', function: '?' }, + { filename: 'index.android.bundle', function: 'touchableHandleResponderRelease', lineno: 252, colno: 4735 }, + { filename: '[native code]', function: '?' }, + { filename: 'index.android.bundle', function: 'u', lineno: 79, colno: 142 }, + { filename: 'index.android.bundle', function: 'invokeGuardedCallback', lineno: 79, colno: 459 }, + { + filename: 'index.android.bundle', + function: 'invokeGuardedCallbackAndCatchFirstError', + lineno: 79, + colno: 580, + }, + { filename: 'index.android.bundle', function: 'c', lineno: 95, colno: 365 }, + { filename: 'index.android.bundle', function: 'a', lineno: 95, colno: 567 }, + { filename: 'index.android.bundle', function: 'v', lineno: 146, colno: 501 }, + { filename: 'index.android.bundle', function: 'g', lineno: 146, colno: 604 }, + { filename: '[native code]', function: 'forEach' }, + { filename: 'index.android.bundle', function: 'i', lineno: 149, colno: 80 }, + { filename: 'index.android.bundle', function: 'processEventQueue', lineno: 146, colno: 1432 }, + { filename: 'index.android.bundle', function: 's', lineno: 157, colno: 88 }, + { filename: 'index.android.bundle', function: 'handleTopLevel', lineno: 157, colno: 174 }, + { filename: 'index.android.bundle', function: '?', lineno: 156, colno: 572 }, + { filename: 'index.android.bundle', function: 'a', lineno: 93, colno: 276 }, + { filename: 'index.android.bundle', function: 'c', lineno: 93, colno: 60 }, + { filename: 'index.android.bundle', function: 'perform', lineno: 177, colno: 596 }, + { filename: 'index.android.bundle', function: 'batchedUpdates', lineno: 188, colno: 464 }, + { filename: 'index.android.bundle', function: 'i', lineno: 176, colno: 358 }, + { filename: 'index.android.bundle', function: 'i', lineno: 93, colno: 90 }, + { filename: 'index.android.bundle', function: 'u', lineno: 93, colno: 150 }, + { filename: 'index.android.bundle', function: '_receiveRootNodeIDEvent', lineno: 156, colno: 544 }, + { filename: 'index.android.bundle', function: 'receiveTouches', lineno: 156, colno: 918 }, + { filename: 'index.android.bundle', function: 'value', lineno: 29, colno: 3016 }, + { filename: 'index.android.bundle', function: '?', lineno: 29, colno: 955 }, + { filename: 'index.android.bundle', function: 'value', lineno: 29, colno: 2417 }, + { filename: 'index.android.bundle', function: 'value', lineno: 29, colno: 927 }, + { filename: '[native code]', function: '?' }, ], }); }); @@ -279,32 +295,32 @@ describe('Tracekit - React Native Tests', () => { message: 'Error: lets throw!', name: 'Error', stack: [ - { url: 'index.android.bundle', func: 'onPress', line: 1, column: 452701 }, - { url: 'index.android.bundle', func: 'anonymous', line: 1, column: 224280 }, - { url: 'index.android.bundle', func: '_performSideEffectsForTransition', line: 1, column: 230843 }, - { url: 'native', func: '_receiveSignal', line: null, column: null }, - { url: 'native', func: 'touchableHandleResponderRelease', line: null, column: null }, - { url: 'native', func: 'onResponderRelease', line: null, column: null }, - { url: 'native', func: 'apply', line: null, column: null }, - { url: 'index.android.bundle', func: 'b', line: 1, column: 74037 }, - { url: 'native', func: 'apply', line: null, column: null }, - { url: 'index.android.bundle', func: 'k', line: 1, column: 74094 }, - { url: 'native', func: 'apply', line: null, column: null }, - { url: 'index.android.bundle', func: 'C', line: 1, column: 74126 }, - { url: 'index.android.bundle', func: 'N', line: 1, column: 74267 }, - { url: 'index.android.bundle', func: 'A', line: 1, column: 74709 }, - { url: 'native', func: 'forEach', line: null, column: null }, - { url: 'index.android.bundle', func: 'z', line: 1, column: 74642 }, - { url: 'index.android.bundle', func: 'anonymous', line: 1, column: 77747 }, - { url: 'index.android.bundle', func: '_e', line: 1, column: 127755 }, - { url: 'index.android.bundle', func: 'Ne', line: 1, column: 77238 }, - { url: 'index.android.bundle', func: 'Ue', line: 1, column: 77571 }, - { url: 'index.android.bundle', func: 'receiveTouches', line: 1, column: 122512 }, - { url: 'native', func: 'apply', line: null, column: null }, - { url: 'index.android.bundle', func: 'value', line: 1, column: 33176 }, - { url: 'index.android.bundle', func: 'anonymous', line: 1, column: 31603 }, - { url: 'index.android.bundle', func: 'value', line: 1, column: 32776 }, - { url: 'index.android.bundle', func: 'value', line: 1, column: 31561 }, + { filename: 'index.android.bundle', function: 'onPress', lineno: 1, colno: 452701 }, + { filename: 'index.android.bundle', function: 'anonymous', lineno: 1, colno: 224280 }, + { filename: 'index.android.bundle', function: '_performSideEffectsForTransition', lineno: 1, colno: 230843 }, + { filename: 'native', function: '_receiveSignal' }, + { filename: 'native', function: 'touchableHandleResponderRelease' }, + { filename: 'native', function: 'onResponderRelease' }, + { filename: 'native', function: 'apply' }, + { filename: 'index.android.bundle', function: 'b', lineno: 1, colno: 74037 }, + { filename: 'native', function: 'apply' }, + { filename: 'index.android.bundle', function: 'k', lineno: 1, colno: 74094 }, + { filename: 'native', function: 'apply' }, + { filename: 'index.android.bundle', function: 'C', lineno: 1, colno: 74126 }, + { filename: 'index.android.bundle', function: 'N', lineno: 1, colno: 74267 }, + { filename: 'index.android.bundle', function: 'A', lineno: 1, colno: 74709 }, + { filename: 'native', function: 'forEach' }, + { filename: 'index.android.bundle', function: 'z', lineno: 1, colno: 74642 }, + { filename: 'index.android.bundle', function: 'anonymous', lineno: 1, colno: 77747 }, + { filename: 'index.android.bundle', function: '_e', lineno: 1, colno: 127755 }, + { filename: 'index.android.bundle', function: 'Ne', lineno: 1, colno: 77238 }, + { filename: 'index.android.bundle', function: 'Ue', lineno: 1, colno: 77571 }, + { filename: 'index.android.bundle', function: 'receiveTouches', lineno: 1, colno: 122512 }, + { filename: 'native', function: 'apply' }, + { filename: 'index.android.bundle', function: 'value', lineno: 1, colno: 33176 }, + { filename: 'index.android.bundle', function: 'anonymous', lineno: 1, colno: 31603 }, + { filename: 'index.android.bundle', function: 'value', lineno: 1, colno: 32776 }, + { filename: 'index.android.bundle', function: 'value', lineno: 1, colno: 31561 }, ], }); }); diff --git a/packages/browser/test/unit/tracekit/react.test.ts b/packages/browser/test/unit/tracekit/react.test.ts index 7f648ff39593..caa5e832d2ec 100644 --- a/packages/browser/test/unit/tracekit/react.test.ts +++ b/packages/browser/test/unit/tracekit/react.test.ts @@ -21,10 +21,10 @@ describe('Tracekit - React Tests', () => { 'Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B%7D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ', name: 'Invariant Violation', stack: [ - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: '?', line: 1, column: 21738 }, - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: 'a', line: 1, column: 21841 }, - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: 'ho', line: 1, column: 68735 }, - { url: 'http://localhost:5000/', func: 'f', line: 1, column: 980 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: '?', lineno: 1, colno: 21738 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: 'a', lineno: 1, colno: 21841 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: 'ho', lineno: 1, colno: 68735 }, + { filename: 'http://localhost:5000/', function: 'f', lineno: 1, colno: 980 }, ], }); }); @@ -48,10 +48,10 @@ describe('Tracekit - React Tests', () => { 'Minified React error #200; visit https://reactjs.org/docs/error-decoder.html?invariant=200 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.', name: 'Error', stack: [ - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: '?', line: 1, column: 21738 }, - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: 'a', line: 1, column: 21841 }, - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: 'ho', line: 1, column: 68735 }, - { url: 'http://localhost:5000/', func: 'f', line: 1, column: 980 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: '?', lineno: 1, colno: 21738 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: 'a', lineno: 1, colno: 21841 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: 'ho', lineno: 1, colno: 68735 }, + { filename: 'http://localhost:5000/', function: 'f', lineno: 1, colno: 980 }, ], }); }); @@ -76,10 +76,10 @@ describe('Tracekit - React Tests', () => { 'Minified React error #200; visit https://reactjs.org/docs/error-decoder.html?invariant=200 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.', name: 'Error', stack: [ - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: '?', line: 1, column: 21738 }, - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: 'a', line: 1, column: 21841 }, - { url: 'http://localhost:5000/static/js/foo.chunk.js', func: 'ho', line: 1, column: 68735 }, - { url: 'http://localhost:5000/', func: 'f', line: 1, column: 980 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: '?', lineno: 1, colno: 21738 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: 'a', lineno: 1, colno: 21841 }, + { filename: 'http://localhost:5000/static/js/foo.chunk.js', function: 'ho', lineno: 1, colno: 68735 }, + { filename: 'http://localhost:5000/', function: 'f', lineno: 1, colno: 980 }, ], }); }); diff --git a/packages/browser/test/unit/tracekit/safari.test.ts b/packages/browser/test/unit/tracekit/safari.test.ts index 55e9b4c7fb9c..5f43e042a279 100644 --- a/packages/browser/test/unit/tracekit/safari.test.ts +++ b/packages/browser/test/unit/tracekit/safari.test.ts @@ -20,10 +20,10 @@ describe('Tracekit - Safari Tests', () => { message: "'null' is not an object (evaluating 'x.undef')", name: 'foo', stack: [ - { url: 'http://path/to/file.js', func: '?', line: 48, column: null }, - { url: 'http://path/to/file.js', func: 'dumpException3', line: 52, column: null }, - { url: 'http://path/to/file.js', func: 'onclick', line: 82, column: null }, - { url: '[native code]', func: '?', line: null, column: null }, + { filename: 'http://path/to/file.js', function: '?', lineno: 48 }, + { filename: 'http://path/to/file.js', function: 'dumpException3', lineno: 52 }, + { filename: 'http://path/to/file.js', function: 'onclick', lineno: 82 }, + { filename: '[native code]', function: '?' }, ], }); }); @@ -44,9 +44,9 @@ describe('Tracekit - Safari Tests', () => { message: "'null' is not an object (evaluating 'x.undef')", name: 'TypeError', stack: [ - { url: 'http://path/to/file.js', func: '?', line: 48, column: 22 }, - { url: 'http://path/to/file.js', func: 'foo', line: 52, column: 15 }, - { url: 'http://path/to/file.js', func: 'bar', line: 108, column: 107 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 48, colno: 22 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 52, colno: 15 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 108, colno: 107 }, ], }); }); @@ -68,9 +68,9 @@ describe('Tracekit - Safari Tests', () => { message: "null is not an object (evaluating 'x.undef')", name: 'TypeError', stack: [ - { url: 'http://path/to/file.js', func: '?', line: 47, column: 22 }, - { url: 'http://path/to/file.js', func: 'foo', line: 52, column: 15 }, - { url: 'http://path/to/file.js', func: 'bar', line: 108, column: 23 }, + { filename: 'http://path/to/file.js', function: '?', lineno: 47, colno: 22 }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 52, colno: 15 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 108, colno: 23 }, ], }); }); @@ -96,9 +96,9 @@ describe('Tracekit - Safari Tests', () => { message: "Can't find variable: getExceptionProps", name: 'ReferenceError', stack: [ - { url: '[native code]', func: 'eval', line: null, column: null }, - { url: 'http://path/to/file.js', func: 'foo', line: 58, column: 21 }, - { url: 'http://path/to/file.js', func: 'bar', line: 109, column: 91 }, + { filename: '[native code]', function: 'eval' }, + { filename: 'http://path/to/file.js', function: 'foo', lineno: 58, colno: 21 }, + { filename: 'http://path/to/file.js', function: 'bar', lineno: 109, colno: 91 }, ], }); }); @@ -120,16 +120,16 @@ describe('Tracekit - Safari Tests', () => { name: 'Error', stack: [ { - url: 'safari-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js', - func: 'ClipperError', - line: 223036, - column: 10, + filename: 'safari-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js', + function: 'ClipperError', + lineno: 223036, + colno: 10, }, { - url: 'safari-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/topee-content.js', - func: '?', - line: 3313, - column: 26, + filename: 'safari-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/topee-content.js', + function: '?', + lineno: 3313, + colno: 26, }, ], }); @@ -150,18 +150,18 @@ describe('Tracekit - Safari Tests', () => { name: 'TypeError', stack: [ { - url: 'safari-extension://com.grammarly.safari.extension.ext2-W8F64X92K3/ee7759dd/Grammarly.js', - func: 'isClaimed', - line: 2, - column: 929865, + filename: 'safari-extension://com.grammarly.safari.extension.ext2-W8F64X92K3/ee7759dd/Grammarly.js', + function: 'isClaimed', + lineno: 2, + colno: 929865, }, { - url: 'safari-extension://com.grammarly.safari.extension.ext2-W8F64X92K3/ee7759dd/Grammarly.js', - func: '?', - line: 2, - column: 1588410, + filename: 'safari-extension://com.grammarly.safari.extension.ext2-W8F64X92K3/ee7759dd/Grammarly.js', + function: '?', + lineno: 2, + colno: 1588410, }, - { url: '[native code]', func: 'promiseReactionJob', line: null, column: null }, + { filename: '[native code]', function: 'promiseReactionJob' }, ], }); }); @@ -182,16 +182,16 @@ describe('Tracekit - Safari Tests', () => { name: 'Error', stack: [ { - url: 'safari-web-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js', - func: 'ClipperError', - line: 223036, - column: 10, + filename: 'safari-web-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js', + function: 'ClipperError', + lineno: 223036, + colno: 10, }, { - url: 'safari-web-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/topee-content.js', - func: '?', - line: 3313, - column: 26, + filename: 'safari-web-extension://3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/topee-content.js', + function: '?', + lineno: 3313, + colno: 26, }, ], }); @@ -212,18 +212,18 @@ describe('Tracekit - Safari Tests', () => { name: 'TypeError', stack: [ { - url: 'safari-web-extension://46434E60-F5BD-48A4-80C8-A422C5D16897/scripts/content-script.js', - func: 'p_', - line: 29, - column: 33314, + filename: 'safari-web-extension://46434E60-F5BD-48A4-80C8-A422C5D16897/scripts/content-script.js', + function: 'p_', + lineno: 29, + colno: 33314, }, { - url: 'safari-web-extension://46434E60-F5BD-48A4-80C8-A422C5D16897/scripts/content-script.js', - func: '?', - line: 29, - column: 56027, + filename: 'safari-web-extension://46434E60-F5BD-48A4-80C8-A422C5D16897/scripts/content-script.js', + function: '?', + lineno: 29, + colno: 56027, }, - { url: '[native code]', func: 'promiseReactionJob', line: null, column: null }, + { filename: '[native code]', function: 'promiseReactionJob' }, ], }); }); @@ -245,10 +245,10 @@ describe('Tracekit - Safari Tests', () => { message: 'test', name: 'Error', stack: [ - { url: 'http://localhost:5000/test', func: 'fooIterator', line: 20, column: 26 }, - { url: '[native code]', func: 'map', line: null, column: null }, - { url: 'http://localhost:5000/test', func: 'foo', line: 19, column: 22 }, - { url: 'http://localhost:5000/test', func: 'global code', line: 24, column: 10 }, + { filename: 'http://localhost:5000/test', function: 'fooIterator', lineno: 20, colno: 26 }, + { filename: '[native code]', function: 'map' }, + { filename: 'http://localhost:5000/test', function: 'foo', lineno: 19, colno: 22 }, + { filename: 'http://localhost:5000/test', function: 'global code', lineno: 24, colno: 10 }, ], }); }); @@ -277,17 +277,17 @@ describe('Tracekit - Safari Tests', () => { message: 'aha', name: 'Error', stack: [ - { url: 'http://localhost:5000/', func: 'aha', line: 19, column: 22 }, - { url: '[native code]', func: 'aha', line: null, column: null }, - { url: 'http://localhost:5000/', func: 'callAnotherThing', line: 20, column: 16 }, - { url: 'http://localhost:5000/', func: 'callback', line: 25, column: 23 }, - { url: 'http://localhost:5000/', func: '?', line: 34, column: 25 }, - { url: '[native code]', func: 'map', line: null, column: null }, - { url: 'http://localhost:5000/', func: 'test', line: 33, column: 26 }, - { url: '[native code]', func: 'eval', line: null, column: null }, - { url: 'http://localhost:5000/', func: 'aha', line: 39, column: 9 }, - { url: 'http://localhost:5000/', func: 'testMethod', line: 44, column: 10 }, - { url: 'http://localhost:5000/', func: '?', line: 50, column: 29 }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 19, colno: 22 }, + { filename: '[native code]', function: 'aha' }, + { filename: 'http://localhost:5000/', function: 'callAnotherThing', lineno: 20, colno: 16 }, + { filename: 'http://localhost:5000/', function: 'callback', lineno: 25, colno: 23 }, + { filename: 'http://localhost:5000/', function: '?', lineno: 34, colno: 25 }, + { filename: '[native code]', function: 'map' }, + { filename: 'http://localhost:5000/', function: 'test', lineno: 33, colno: 26 }, + { filename: '[native code]', function: 'eval' }, + { filename: 'http://localhost:5000/', function: 'aha', lineno: 39, colno: 9 }, + { filename: 'http://localhost:5000/', function: 'testMethod', lineno: 44, colno: 10 }, + { filename: 'http://localhost:5000/', function: '?', lineno: 50, colno: 29 }, ], }); });