-
Notifications
You must be signed in to change notification settings - Fork 5
Nextjs server side rendering deployed on custom server #7
Comments
Hey @mcAnastasiou, thanks for submitting an issue!
I will take a look at the example project in the coming days and setup a demo app with Next.js and see if I can get source maps working.
This is because of Next.js. Env variables that are to be consumed on the browser need to be prefixed with NEXT_PUBLIC. |
Thank you @subzero10 for the response. I am looking forward to your reply |
Hey @mcAnastasiou, I have some updates on this. I was able to get client errors reported mapped to the correct source files! Here is what I did:
Note: I did not have to set the Did you confirm that the source maps are indeed uploaded to Honeybadger? You can read more about this here. Make sure that you have matching Moving on to the server errors:
Basically, I can’t get @joshuap Any ideas about the server errors? |
Could this be related to #1? It's been a while since I worked with this, and tbh it seemed at the time that vercel was still working on ironing out some of these issues. I'll have to take a closer look. I do recall that it's important that the page is being loaded for the first time in a fresh tab for the server errors to be reported. |
Thank you both for your answers! Regarding the server side errors is it something that vercel team has to fix? |
Server-side errors should be automatically reported as far as I know (if they're not, there may be a configuration issue, or Vercel may have changed something and we need to update our example). I still need to do some digging on the server-side source maps issue. |
The server side errors are being reported correctly. The only issue is that source maps don't seem to work. I see the error for the minified js |
I had time to check out where I left off with the node-source-maps branch, and here's what I found:
Here's my
Here are the commands I ran:
Here's what the reported error looks like: Here's the node backtrace: Here's the application environment section: @mcAnastasiou could you try out the node-source-maps branch and see if you can get it to work in a test project? Note that you need to have this additional config for it to work properly. One last thing to note is that Next.js still appears to report some duplicate promise rejections (so you may get two error reports in some cases). You can disable reporting unhandled promise rejections with cc @subzero10 |
@joshuap I just tried the node-source-maps branch with I also tried changing this line
to
|
Just a quick update on this:
We haven't heard back from @mcAnastasiou in a while. I think I will close this issue in favor of https://github.com/honeybadger-io/docs/issues/190, which should also address the same concerns. |
Closing since I believe this issue is encompassed by https://github.com/honeybadger-io/docs/issues/190 and #8 |
We deploy the app not in Vercel but in our own custom server. I tried your project and i saw that server side source maps still don't work. I checked the issue and the solutions suggested there, but it seems that it doesn't work
Also it seems that for client error handling to work properly NEXT_PUBLIC_HONEYBADGER_API_KEY should be set instead of HONEYBADGER_API_KEY. Otherwise [Honeybadger] Unable to send error report: no API key has been configured is being displayed in console
The text was updated successfully, but these errors were encountered: