Description
What are the steps to reproduce this issue?
- Create a Next.js app with Next 14
- Run through the steps to install honeybadger within a Next.js project here.
- Also run
yarn add @honeybadger-io/js
to add honeybadger's js package - Create an error on the page, and observe a ton of errors showing up in Honeybadger when Honeybadger goes to run
client.notify()
in the browser.
What happens?
For Next.js projects, the docs only say to install @honeybadger-io/react and @honeybadger-io/nextjs npm packages, it subtly leaves off @honeybadger-io/js. However, to someone who's new to Honeybadger and getting it setup, this can be often be missed and assumed the @honeybadger-io/js package should also be installed (Next.js and React is all JavaScript after all, right?). However, when this package is installed and it's not the same version, we got a lot of very confusing errors, and ended up needing to pay extra since we exceeded our error quota for our package (over 100,000 errors). My theory is that when we are importing Honeybadger
from @honeybadger-io/js
it's importing from the wrong npm module version, and it causes a problem.
What were you expecting to happen?
No errors occur, or the Honeybadger package gives us a big warning saying we need to uninstall the @honeybadger-io/js package.
Any logs, error output, etc?
Our app got over 100,000 errors in a span of 24 hours, with an exception message that says UnhandledPromiseRejectionWarning: Object Not Found Matching Id:5, MethodName:update, ParamCount:4
.
What versions are you using?
Operating System: Fly.io app running on Alpine Linux v3.19, browser running on Ubuntu 23.03
Package Name: @honeybadger-io/js, @honeybadger-io/react, @honeybadger-io/nextjs
Package Version: "@honeybadger-io/js": "^6.2.0", "@honeybadger-io/nextjs": "^5.8.12", "@honeybadger-io/react": "^6.1.8",
Browser Version: Chrome 122.0.6261.94