-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
SyntaxError: Named export 'app' not found. Sentry + Electron + Next js #804
Comments
The Electron SDK uses the node SDK for the main process and browser SDK for the renderers. Importing from For this reason you should import from |
@timfish Thanks for the help!
then throwing an error
I can see the returned string but the error is not capgtured in the project. Also I tried to send the error using ipcMain protocol to use it from main process files and it worked but the error is not getting any context files.
This is how to error looks like |
Hm, I am not sure if our Next.js and Electron SDKs allow for interoperability like that... |
@lforst What to you recommend me to use it then ? |
@andirsun honestly I don't know. Gut feeling wise you should pick either or - probably electron. Ofc you're gonna miss out on some features but the two SDKs are not desinged to interoperate. Can you try using just the electron SDK first and see if that captures errors? Thanks! |
@idosun Still not working, is interesting because the sentry.captureException is not throwing any error and it seems like the error was sent but for some reason is not displayed on sentry dashboard (Errors from main process are being reported normally) This is my initialization code
And this is how I am throwing the error
|
@andirsun If the error is sent looking at the network tab, something else might be going on. Maybe you have filters in place or you are out of quota. |
Closing for clean-up. Please open a new issue if this still applies. Thanks! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Electron SDK Version
^4.15.1
Electron Version
27.1.0
What platform are you using?
MacOS
Link to Sentry event
No response
Steps to Reproduce
Context: I am using electron to run a Next js application loading static html + js files.
I am trying to setup Sentry on both main and rendered process, the main process was properly loaded with
And when I fired manually an error is properly visible in the sentry dashboard.
But I am having problems with setup for rendered process, as you know when you have a next js app + Sentry, you have a
sentry.client.config.js
file at the root of the folder where you have to load the sentry init function.So I am initializing my library there:
Project is being initialized but when I try to send an error from one of my next js files for example:
I am facing an error related to app entry
I dont know if I have to import the library differently for next js renderer process.
Expected Result
Capture errors from next js files
Actual Result
Already attached
The text was updated successfully, but these errors were encountered: