highlight / highlight

highlight.io: The open source, full-stack monitoring platform. Error monitoring, session replay, logging, distributed tracing, and more.

Home Page:https://app.highlight.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'destroyed')

jgentes opened this issue · comments

Describe the bug
After running my Remix app (with Vite) I get a dump of code (not a stack, but minified code which fills up my terminal buffer, then:

TypeError: Cannot read properties of undefined (reading 'destroyed')
    at Timeout._onTimeout (D:\mixpoint\node_modules\@highlight-run\node\dist\index.cjs:1:416077)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)

Node.js v20.11.0

To Reproduce
Steps to reproduce the behavior:

I run yarn dev which produces:

 ➜  Local:   http://localhost:3000/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

And that will not exhibit the problem until I open a browser and it triggers the root loader:

LOADER root triggered - 2.07 ms

30 seconds after loading the root loader, the error occurs:
image

Expected behavior
It was working before. I had installed Bun and tried installing dependencies, but when that didn't work I blew away node_modules and went back to Yarn. That's the only major change I can think of.

Additional context
Root loader can be seen here: https://github.com/jgentes/mixpoint/blob/main/app/root.tsx

I took a crack at fixing this on Friday.

#8036

Try upgrading the @highlight-run/remix package to see if it helps.

I've been dealing with the same issue that you've described, but it's been erratic. I couldn't reproduce after my latest edits.

Thanks @deltaepsilon I was already on 2.0.22 so that didn't help unfortunately.

What's interesting is I have manualStart={Env === 'development'} which disables Highlight in dev, so it shouldn't even be initializing.

Observing the issue was related to the loader, I was able to workaround the issue by commenting out the use of HandleError in my entry.server.tsx file: https://github.com/jgentes/mixpoint/blob/main/app/entry.server.tsx

Hey @jgentes, could you try upgrade to the latest version of the SDK? A fix should have been released in #8039

Thanks for checking on that @vadim. It looks like we're up to v2.0.23 on Remix:
https://www.npmjs.com/package/@highlight-run/remix

I'd pushed the code for the fix, but I hadn't released it with the yarn changeset yet!

That appears to have fixed it, thanks!