question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing styles in recording

See original GitHub issue

Hi!

First I want to say that this project is amazing to use, simple and fast to implement! 😃

I have 2 react SPA, one is relativley straight forward, while the other is much more complex. The simple site works perfectly! 😃

But the slightly more complex site looks like this: image

But in the records it looks like this instead: image

This site uses styled-components heavily, and the grey color comes from the default index.scss.

My code looks like this:

const useRRWeb = () => {
    const [allow, setAllow] = useState(false)
    const eventsRef = useRef([])

    const allowRecording = () => setAllow(true)
    const getRandom = () => Math.random().toString(36).substring(7);
    import("rrweb").then(({record}) => {
        record({
            emit: (event) => {
                eventsRef.current.push(event)
            }
        })
    })
    useEffect(() => {
        if (!allow)
            return;

        const sessionId = getRandom() + getRandom() + getRandom();
        const save = () => {
            const events = eventsRef.current
            const body = JSON.stringify({events});
            eventsRef.current = [];

            fetch(getUrl(sessionId), {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body,
            }).catch(() => {
                eventsRef.current.unshift(events)
            });
        }
        const saveInterval = setInterval(save, 10 * 1000);

        record({
            emit: (event) => {
                eventsRef.current.push(event)
            }
        })

        return () => {
            clearInterval(saveInterval)
            save()
        }
    }, [allow])

    return [allow, allowRecording]
}
export default useRRWeb

Any ideas about where I should start to look?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
havard024commented, Oct 13, 2020

@Yuyz0112 I’m also experiencing styling issues, using ionic with angular with a rrweb sentry integratioon, I have a public web page you can look at. You can’t really navigate much, but you can trigger an exception which will trigger the call to sentry with the rrweb events.

Here’s the url to the public webpage: https://vehicle-registry-staging.nor1.se/

The button to trigger the exception is on the bottom of the left menu.

Screen Shot 2020-10-13 at 10 22 50 PM

And this is how the replay looks (You can barely see anything, but the layout and colors are off)

Screen Shot 2020-10-13 at 10 27 14 PM
1reaction
alexcrooxcommented, Feb 29, 2020

I’ve not had much luck in getting different results using Vue and:

“rrweb”: “^0.7.29”, “rrweb-player”: “^0.4.3”

Is anyone else seeing styles in their playback now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No Styles in Playback | Help Center - Mouseflow
The most common reason for your recordings and heatmaps to be missing styles is that Mouseflow is unable to find the stylesheets on...
Read more >
CSS is not correct in my recordings | Smartlook Help Center
When playing visitor recordings, a specific recording might show a page with an incorrect layout—either partially or completely devoid of styles, or missing...
Read more >
What can I do if the heatmap or session recording is not styled ...
What can I do if the heatmap or session recording is not styled and CSS or font icons seem missing? When Matomo (Piwik)...
Read more >
Why Do the Pages Look Broken or Have No CSS Loading?
If your Recordings look broken when compared to your live site, this could be because Hotjar isn't able to access the CSS files...
Read more >
Troubleshooting Recordings | Microsoft Learn
Any styling resources that Clarity is unable to access will be missing from the rendered playbacks. Stylesheets and fonts are constantly being ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found