partytown icon indicating copy to clipboard operation
partytown copied to clipboard

[🐞] Cannot read property 'Error' of null

Open imattferreira opened this issue 10 months ago • 0 comments

Describe the bug

Hey, what's up?

In the last month, I've implemented Partytown in a web application that I works. This webapp was built on top of Next.JS v12 and ReactJS v17, the vast majority of pages are rendered via server-side rendering (SSR) and we are using Partytown to load Google Analytics.

Initially, I've integrated Partytown in the project following the manual installation present in the documentation. After I deployed to production, our error-tracker (Sentry) tracked a lot of similar errors inside Partytown's service-worker:

image image

Because error tracking volume is very high, we momentarily configure Sentry to no longer capture more these Partytown errors.

I already attempted to reimplement Partytown, now following the Next.JS internal integration, but I had no success. And I already attempted to reproduce and debug in my local environment, but I had no success too.

How could I not have a good reproduction, I have providing a minimal implementation that I make in the application.

Reproduction

https://codesandbox.io/p/sandbox/confident-lamarr-584ddr?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clusqae5z00063b6g43xr2h4n%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clusqae5y00023b6guak822iq%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clusqae5y00033b6glswxqwj1%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clusqae5y00053b6ge5k8io0j%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clusqae5y00023b6guak822iq%2522%253A%257B%2522id%2522%253A%2522clusqae5y00023b6guak822iq%2522%252C%2522tabs%2522%253A%255B%255D%257D%252C%2522clusqae5y00053b6ge5k8io0j%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clusqae5y00043b6gdo8puctj%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clusqae5y00053b6ge5k8io0j%2522%252C%2522activeTabId%2522%253A%2522clusqae5y00043b6gdo8puctj%2522%257D%252C%2522clusqae5y00033b6glswxqwj1%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clusqae5y00033b6glswxqwj1%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

Steps to reproduce

🤷‍♂️

Browser Info

Mainly Chrome Mobile

Additional Information

No response

imattferreira avatar Apr 09 '24 18:04 imattferreira