Skip to content
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

posthog runtime errors #563

Closed
kfarr opened this issue Jun 6, 2024 · 5 comments
Closed

posthog runtime errors #563

kfarr opened this issue Jun 6, 2024 · 5 comments
Assignees

Comments

@kfarr
Copy link
Collaborator

kfarr commented Jun 6, 2024

had to disable posthog for local dev because it raises uncaught runtime errors. perhaps the official react version would be better?

image

@rahulkgupta
Copy link
Collaborator

rahulkgupta commented Jun 7, 2024

Screenshot 2024-06-06 at 8 07 16 PM Screenshot 2024-06-06 at 8 08 06 PM

very odd. im moving things around and clicking and not able to repro. I'm on add-posthog branch and am running things with npm start. im on http://localhost:3333/#/scenes/f9795da3-6292-415c-8109-e3a9ca1a8a2d.json

@vincentfretin
Copy link
Collaborator

The collecting data for the session replay feature seems to be rather aggressive.

sessionrecording.ts:789 Uncaught TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'd'
    |     property 'components' -> object with constructor 'Object'
    |     property 'position' -> object with constructor 'n'
    --- property 'el' closes the circle
    at JSON.stringify (<anonymous>)
    at e.value (sessionrecording.ts:789:27)
    at emit (sessionrecording.ts:683:22)
    at ht (index.js:108:57)
    at le (index.js:138:9)
    at He.e.mutationCb (observer.js:731:19)
    at e.emit (mutation.js:308:18)
    at e.processMutations (mutation.js:107:18)

in sessionrecording.ts:789:27
const size = JSON.stringify(event).length
it stringify the event probably the mouseenter or click event on the canvas and try to serialize the cameraRig entity where we have the cursor-teleport component, and an aframe entity has object3D and the again el a reference to the aframe entity.

@vincentfretin
Copy link
Collaborator

We should see if we can just disable the session replay feature.

@rahulkgupta
Copy link
Collaborator

gotcha, will try the other way. session replay is a key feature IMO to understand how the user is using the product

@vincentfretin
Copy link
Collaborator

vincentfretin commented Jun 8, 2024

That should be fixed by PostHog/posthog-js#1230

fyi the issue was triggered by this code

function toggleHelpers(show) {
if (inspector && inspector.opened) inspector.sceneHelpers.visible = show;
if (show) {
document
.querySelector('#cameraRig')
.setAttribute(
'cursor-teleport',
'cameraRig: #cameraRig; cameraHead: #camera;'
);
} else {
document.querySelector('#cameraRig').removeAttribute('cursor-teleport');
}
}

with the removeAtttribute('cursor-teleport') and then the setAttribute('cursor-teleport', ...) that is called to take a screenshot when you click on Share button, so that triggers the serialization of what DOM attributes changed because of the Share click event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants