-
Notifications
You must be signed in to change notification settings - Fork 212
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
compatibility issue with nextjs 13.4 #1106
Comments
Hey @Musashi-Sakamoto, Thanks for reporting this issue. You can find a Next.js instruction in the Rollbar documentation. Can you check it out to see if it solves your problem? |
@rollbar-bborsits Thank you for getting back to me quickly. The document seems a bit outdated. I doubt Next13 works with things like |
@Musashi-Sakamoto I have just tested this on 13.4.4, using the pattern in your example to setup Rollbar. I tested both js and ts, but didn't get an error. I'm using the default tsconfig generated by If I do force an error, the output provides a stack trace with the error. May try |
@waltjones
|
Is there any updates on this? I'm having the same problem with Next 13.4.5. After some debugging, I discovered that the error is thrown when the rollbar instance is created. |
Okay, I have resolved it. I forgot to use the 'use client' directive. So any component that uses a rollbar instance should be marked with |
yeah, but that means you can't report error on server side components |
Yes, currently, I don't report errors on the server component. According to the Next13 app router documentation, any server errors are serialized and sent to the nearest error.js component (the sent error is digested for security reasons). So, I make the report there inside the useEffect. However, I'm still trying to figure out the proper way to interpret the digested/hashed error inside Rollbar. |
yeah, in that case, error.js component will be shown. For some cases, we want to catch errors on the server side components and do nothing but report errors... |
That's an excellent point. I haven't come up with a solution for that, at least not from the Next.js error handling perspective. I'm not sure if it's possible to make the Rollbar provider work on the server as well. |
I was able to install rollbar and use it on server component. not sure why it worked this time.. |
@Musashi-Sakamoto Which version of Nextjs and Rollbar did it work with? |
Facing the same issue after migration to NextJs 13.4 as @Musashi-Sakamoto, catching an error on the server but still want to send the error to rollbar. Did we have any updates on this? How can I get it working? |
Is there any updates or implementations on how to use rollbar in nextjs app router? |
I am trying to install
rollbar
module to handle server side error on my new nextjs 13.4.2 project.When I try to run
next build
, it shows the following error.utils/rollbar.ts
page.tsx
The text was updated successfully, but these errors were encountered: