Hi all ,
Im trying to record and replay the sessions using rrweb script.I installed it and collected the events :
My events are like this :
events = [{'events': [{'type': 0, 'data': {}, 'timestamp': 1586525806542}, {'type': 1, 'data': {}, 'timestamp': 1586525809409}, {'type': 4, 'data': {'href': 'http://192.168.1.102/sample.html', 'width': 1533, 'height': 801}, 'timestamp': 1586525809409}, {'type': 2, 'data': {'node': {'type': 0, 'childNodes': [{'type': 2, 'tagName': 'html', 'attributes': {'style': '', 'class': ' js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths'},},.......,{'events':[]}]
const replayer = new rrweb.Replayer(events);
replayer.play();
I have included this js code in my script,when i run my html file it throws an error : Uncaught TypeError: Cannot read property 'appendChild' of null
What will be the reason ??
@Yuyz0112 Hey Yuyz and all,
I'm having the following problems:
1) for complicated pages - the entire browser gets stuck and crashes.
did anyone else encounter this problem?
2) I want to record an entire session with different pages. the rr-web did not serialize all the different pages, and i was forced to do stopRecord() and startRecord() for every page navigation.
Is this the correct practice? is there a way to make it more efficient?
@Yuyz0112 Sadly I cant.
I am working in angular 8 framework.
The problem is that on navigating to a heavy page - the recorded starts adding emitting thousands of events to the "events" array.
if I call stopRecordingFunction() after 6000 events in the array - the UI is OK,
These 6000 were sent to the backend - however while replaying them - they show nothing..
any idea?
document.createElement
will failed if the tag name is invalid. Maybe we need find another way to create element with invalid tag name?
Hey there @Yuyz0112 , I hope you and all the community members have a great day first of all!
I am just messaging to ask regarding the https://github.com/rrweb-io/rrweb-snapshot code. Could you please, give us an example of how we could use the snapshot code alone to simply take a snapshot of a page on demand via javascript?
@Yuyz0112 If a page contain this kind of code : <!--[if lt IE 9]>
<script src="//cdnj... html5shiv.min.js" type="text/javascript"></script>
<![endif]--> rrwebPlayer will crash with that error ( I think it's because it's a type 5 (comment) and when rrwebplayer read this part and found this caractere "<" it crash