Code Monkey home page Code Monkey logo

Comments (6)

eoghanmurray avatar eoghanmurray commented on August 22, 2024

Thanks for the bug report.
When I make a recording of your website via yarn repl I get the following DOM structure:

{"type":2,
 "data":{"node":{"type":0,
		 "childNodes":[{"type":2,
				"tagName":"html",
				"attributes":{},
				"childNodes":[{"type":2,
					       "tagName":"head",
					       "attributes":{},
					       "childNodes":[{"type":3,
							      "textContent":"\n\t\t",
							      "id":4}

And don't get any error.

All of the nodes have an empty attributes object (your TypeError is complaining about attributes being undefined)

Is it possible that you are doing some server side processing of the rrewb data?

from rrweb.

eoghanmurray avatar eoghanmurray commented on August 22, 2024

This would be a fix btw, but don't think it's needed in trunk, but I may be wrong;

+++ b/packages/rrweb-snapshot/src/rebuild.ts
@@ -439,6 +439,7 @@ export function buildNodeWithSN(
       // this is needed as document.createElement('iframe') otherwise inherits a CSS1Compat mode from the parent replayer environment
       if (
         n.childNodes[0].type === NodeType.Element &&
+        n.childNodes[0].attributes &&
         'xmlns' in n.childNodes[0].attributes &&
         n.childNodes[0].attributes.xmlns === 'http://www.w3.org/1999/xhtml'
       ) {

from rrweb.

w3villa-harsh-yadav avatar w3villa-harsh-yadav commented on August 22, 2024

@eoghanmurray Appreciate your response. While recording sessions, I haven't encountered any errors. However, I'm encountering playback issues specifically with rrweb-player, and it seems to be isolated to a particular website. This suggests there might be an issue with how rrweb captures the DOM for this site. Can you please tell if that can be fixed or is there any alternate for this issue.

from rrweb.

eoghanmurray avatar eoghanmurray commented on August 22, 2024

So as mentioned I've checked with yarn repl against the website you referenced but could not recreate.
Could you do the same with your installation of rrweb — 1.0.0-alpha.4 — I'm running off trunk so I think that's a little ahead of you.

General instructions:

- Run recorder on a website: `yarn repl`

I also queried whether you are doing any postprocessing of events?

from rrweb.

w3villa-harsh-yadav avatar w3villa-harsh-yadav commented on August 22, 2024

@eoghanmurray Thank you for your response. I haven't encountered any errors while recording and saving the DOM structure to my backend. However, I'm experiencing issues with playback using rrweb-player. I'll also attempt playback using the trunk version. Regarding post-processing, I'm not currently performing any post-processing on the data.

from rrweb.

eoghanmurray avatar eoghanmurray commented on August 22, 2024

Could you let me know what the resolution on this was? Did the current version of trunk fix it?

from rrweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.