diff --git a/packages/replay/src/main.test.ts b/packages/replay/src/main.test.ts index 36f5f538..0c60644d 100644 --- a/packages/replay/src/main.test.ts +++ b/packages/replay/src/main.test.ts @@ -29,7 +29,7 @@ describe("filterRecordings", () => { }, ]; - const filtered = filterRecordings(recordings, r => r.id === "3"); + const filtered = filterRecordings(recordings, r => r.id === "3", false); expect(filtered).toHaveLength(1); }); it("inclues crash reports when includeCrashes is set", () => { diff --git a/packages/replay/src/main.ts b/packages/replay/src/main.ts index c0771f0d..12fbfc42 100644 --- a/packages/replay/src/main.ts +++ b/packages/replay/src/main.ts @@ -552,6 +552,18 @@ async function uploadAllRecordings(opts: Options & UploadAllOptions = {}) { const allRecordings = readRecordings(dir).filter(r => !uploadSkipReason(r)); const recordings = filterRecordings(allRecordings, opts.filter, opts.includeCrashes); + if ( + allRecordings.some(r => r.status === "crashed") && + !recordings.some(r => r.status === "crashed") && + opts.filter && + !opts.includeCrashes + ) { + maybeLog( + opts.verbose, + `\n⚠️ Warning: Some crash reports were created but will not be uploaded because of the provided filter. Add --include-crashes to upload crash reports.\n` + ); + } + if (recordings.length === 0) { if (opts.filter && allRecordings.length > 0) { maybeLog(opts.verbose, `No replays matched the provided filter`);