-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(replay): fix rrweb issue & vendor it #6335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6e651b2
175eb10
471a9c9
b250c32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,14 +52,14 @@ | |
"@types/pako": "^2.0.0", | ||
"jsdom-worker": "^0.2.1", | ||
"pako": "^2.0.4", | ||
"rrweb": "1.1.3", | ||
"tslib": "^1.9.3" | ||
}, | ||
"dependencies": { | ||
"@sentry/core": "7.23.0", | ||
"@sentry/types": "7.23.0", | ||
"@sentry/utils": "7.23.0", | ||
"lodash.debounce": "^4.0.8", | ||
"rrweb": "^1.1.3" | ||
"lodash.debounce": "^4.0.8" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably think about also either inlining this, or actually replace it with some custom code. but we can tackle this later, I'd say! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have custom (kinda-)debounce logic in |
||
}, | ||
"peerDependencies": { | ||
"@sentry/browser": "7.23.0" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/index.js b/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/index.js | ||
index 8091399..48e8321 100644 | ||
--- a/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/index.js | ||
+++ b/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/index.js | ||
@@ -325,7 +325,11 @@ function record(options) { | ||
}, hooks); | ||
}; | ||
iframeManager.addLoadListener(function (iframeEl) { | ||
- handlers_1.push(observe_1(iframeEl.contentDocument)); | ||
+ try { | ||
+ handlers_1.push(observe_1(iframeEl.contentDocument)); | ||
+ } catch (error) { | ||
+ console.warn('error in rrweb iframe observer', error); | ||
+ } | ||
}); | ||
var init_1 = function () { | ||
takeFullSnapshot(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6043,7 +6043,7 @@ | |
tslib "^2.3.1" | ||
upath2 "^3.1.12" | ||
|
||
"@yarnpkg/[email protected]": | ||
"@yarnpkg/[email protected]", "@yarnpkg/lockfile@^1.1.0": | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" | ||
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== | ||
|
@@ -17127,6 +17127,13 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: | |
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" | ||
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== | ||
|
||
klaw-sync@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" | ||
integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== | ||
dependencies: | ||
graceful-fs "^4.1.11" | ||
|
||
kleur@^3.0.3: | ||
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" | ||
|
@@ -19600,6 +19607,14 @@ [email protected]: | |
is-docker "^2.0.0" | ||
is-wsl "^2.1.1" | ||
|
||
open@^7.4.2: | ||
version "7.4.2" | ||
resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" | ||
integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== | ||
dependencies: | ||
is-docker "^2.0.0" | ||
is-wsl "^2.1.1" | ||
|
||
open@^8.3.0: | ||
version "8.4.0" | ||
resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" | ||
|
@@ -20148,6 +20163,26 @@ pascalcase@^0.1.1: | |
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" | ||
integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= | ||
|
||
patch-package@^6.5.0: | ||
version "6.5.0" | ||
resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.5.0.tgz#feb058db56f0005da59cfa316488321de585e88a" | ||
integrity sha512-tC3EqJmo74yKqfsMzELaFwxOAu6FH6t+FzFOsnWAuARm7/n2xB5AOeOueE221eM9gtMuIKMKpF9tBy/X2mNP0Q== | ||
dependencies: | ||
"@yarnpkg/lockfile" "^1.1.0" | ||
chalk "^4.1.2" | ||
cross-spawn "^6.0.5" | ||
find-yarn-workspace-root "^2.0.0" | ||
fs-extra "^7.0.1" | ||
is-ci "^2.0.0" | ||
klaw-sync "^6.0.0" | ||
minimist "^1.2.6" | ||
open "^7.4.2" | ||
rimraf "^2.6.3" | ||
semver "^5.6.0" | ||
slash "^2.0.0" | ||
tmp "^0.0.33" | ||
yaml "^1.10.2" | ||
|
||
[email protected]: | ||
version "0.0.1" | ||
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" | ||
|
@@ -22608,7 +22643,7 @@ rrweb-snapshot@^1.1.14: | |
resolved "https://registry.yarnpkg.com/rrweb-snapshot/-/rrweb-snapshot-1.1.14.tgz#9d4d9be54a28a893373428ee4393ec7e5bd83fcc" | ||
integrity sha512-eP5pirNjP5+GewQfcOQY4uBiDnpqxNRc65yKPW0eSoU1XamDfc4M8oqpXGMyUyvLyxFDB0q0+DChuxxiU2FXBQ== | ||
|
||
rrweb@^1.1.3: | ||
[email protected]: | ||
version "1.1.3" | ||
resolved "https://registry.yarnpkg.com/rrweb/-/rrweb-1.1.3.tgz#4fbb3d473d71c79b6c30a54e585e5a01c8ac08bb" | ||
integrity sha512-F2qp8LteJLyycsv+lCVJqtVpery63L3U+/ogqMA0da8R7Jx57o6gT+HpjrzdeeGMIBZR7kKNaKyJwDupTTu5KA== | ||
|
@@ -26608,6 +26643,11 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec" | ||
integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw== | ||
|
||
yaml@^1.10.2: | ||
version "1.10.2" | ||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" | ||
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== | ||
|
||
[email protected], yargs-parser@^13.1.2: | ||
version "13.1.2" | ||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be a top-level dependency because rrweb is hoisted to the root
node_modules
directory, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this runs as
postinstall
when runningyarn
, so it needs to be on the very top. Also note that the patch itself is also at the root of the project!